Commit graph

1977 commits

Author SHA1 Message Date
Eli Bendersky
0069bab115 Reformat by replacing tabs with 4-spaces. Makes the code more PEP-7 compliant
and gets rid of some gross formatting on tab=4-space-configured editors.
2012-04-05 06:42:48 +03:00
Antoine Pitrou
a701388de1 Rename _PyIter_GetBuiltin to _PyObject_GetBuiltin, and do not include it in the stable ABI. 2012-04-05 00:04:20 +02:00
Kristján Valur Jónsson
31668b8f7a Issue #14288: Serialization support for builtin iterators. 2012-04-03 10:49:41 +00:00
Georg Brandl
d3fca8e07f Post-release update. 2012-04-02 07:51:45 +02:00
Georg Brandl
50af011ca6 Bump to 3.3.0a2. 2012-04-01 13:49:21 +02:00
Victor Stinner
3c1e48176e Issue #14383: Add _PyDict_GetItemId() and _PyDict_SetItemId() functions
These functions simplify the usage of static constant Unicode strings.
Generalize the usage of _Py_Identifier in ceval.c and typeobject.c.
2012-03-26 22:10:51 +02:00
Kristján Valur Jónsson
192195a4fc Merge with 3.2 (Issue #14387) 2012-03-22 23:13:48 +00:00
Kristján Valur Jónsson
b81e5388b6 Issue #14387 : undefine 'small' so that it doesn't clash with Windows headers. 2012-03-22 23:10:37 +00:00
Antoine Pitrou
d0acb411ef Issue #14387: Do not include accu.h from Python.h. 2012-03-22 14:42:18 +01:00
Antoine Pitrou
0197ff97d0 Issue #14387: Do not include accu.h from Python.h. 2012-03-22 14:38:16 +01:00
Benjamin Peterson
b7f1da5a3c make _PyNumber_ConvertIntegralToInt static, since it's only used in abstract.c 2012-03-21 14:44:43 -04:00
Stefan Krah
1919b7e72b Issue #7652: Integrate the decimal floating point libmpdec library to speed
up the decimal module. Performance gains of the new C implementation are
between 12x and 80x, depending on the application.
2012-03-21 18:25:23 +01:00
Georg Brandl
3187749646 Merge 3.2.3rc2 from release clone. 2012-03-18 20:37:43 +01:00
Georg Brandl
1eb0f9de99 Post-release updates for 3.2.3rc2. 2012-03-18 08:36:53 +01:00
Georg Brandl
226af70a59 Bump to 3.2.3rc2. 2012-03-18 07:34:49 +01:00
Benjamin Peterson
2afe6aeae8 perform yield from delegation by repeating YIELD_FROM opcode (closes #14230)
This allows generators that are using yield from to be seen by debuggers. It
also kills the f_yieldfrom field on frame objects.

Patch mostly from Mark Shannon with a few tweaks by me.
2012-03-15 15:37:39 -05:00
Matthias Klose
5ce31cc4fc merge 3.2 2012-03-14 23:17:31 +01:00
Matthias Klose
d83be23689 merge 3.1 2012-03-14 23:14:35 +01:00
Matthias Klose
0f4c16e29c - rename configure.in to configure.ac
- change references from configure.in to configure.ac
2012-03-14 23:10:15 +01:00
Victor Stinner
5d272cc6a2 Close #14180: Factorize code to convert a number of seconds to time_t, timeval or timespec
time.ctime(), gmtime(), time.localtime(), datetime.date.fromtimestamp(),
datetime.datetime.fromtimestamp() and datetime.datetime.utcfromtimestamp() now
raises an OverflowError, instead of a ValueError, if the timestamp does not fit
in time_t.

datetime.datetime.fromtimestamp() and datetime.datetime.utcfromtimestamp() now
round microseconds towards zero instead of rounding to nearest with ties going
away from zero.
2012-03-13 13:35:55 +01:00
Antoine Pitrou
b4a92376f8 Fix regression after c8d1df9ac987
(PPC buildbot)
2012-03-10 23:43:12 +01:00
Larry Hastings
064474134c Fix a comment: PySequence_Fast() creates a list, not a tuple. 2012-03-05 22:59:13 -08:00
Georg Brandl
ab8f392ff0 3.3.0a1 is done. 2012-03-05 08:54:46 +01:00
Georg Brandl
6c8850d94d Bump to 3.3.0a1. 2012-03-04 16:23:53 +01:00
Victor Stinner
c9590ad745 Close #14085: remove assertions from PyUnicode_WRITE macro
Add checks in PyUnicode_WriteChar() and convert PyUnicode_New() assertion to a
test raising a Python exception.
2012-03-04 01:34:37 +01:00
Victor Stinner
643cd68ea4 Issue #13964: signal.sigtimedwait() timeout is now a float instead of a tuple
Add a private API to convert an int or float to a C timespec structure.
2012-03-02 22:54:03 +01:00
Brett Cannon
efb00c0cc1 Issue #14153 Create _Py_device_encoding() to prevent _io from having to import
the os module.
2012-02-29 18:31:31 -05:00
Benjamin Peterson
9bd126a1c4 the days of pre-standard C compilers are gone 2012-02-26 15:54:47 -05:00
Nick Coghlan
ab7bf2143e Close issue #6210: Implement PEP 409 2012-02-26 17:49:52 +10:00
Georg Brandl
48605a65b5 3.2.3rc1 done 2012-02-25 18:30:26 +01:00
Stefan Krah
9a2d99e28a - Issue #10181: New memoryview implementation fixes multiple ownership
and lifetime issues of dynamically allocated Py_buffer members (#9990)
  as well as crashes (#8305, #7433). Many new features have been added
  (See whatsnew/3.3), and the documentation has been updated extensively.
  The ndarray test object from _testbuffer.c implements all aspects of
  PEP-3118, so further development towards the complete implementation
  of the PEP can proceed in a test-driven manner.

  Thanks to Nick Coghlan, Antoine Pitrou and Pauli Virtanen for review
  and many ideas.

- Issue #12834: Fix incorrect results of memoryview.tobytes() for
  non-contiguous arrays.

- Issue #5231: Introduce memoryview.cast() method that allows changing
  format and shape without making a copy of the underlying memory.
2012-02-25 12:24:21 +01:00
Victor Stinner
41a863cb81 Issue #13706: Fix format(int, "n") for locale with non-ASCII thousands separator
* Decode thousands separator and decimal point using PyUnicode_DecodeLocale()
   (from the locale encoding), instead of decoding them implicitly from latin1
 * Remove _PyUnicode_InsertThousandsGroupingLocale(), it was not used
 * Change _PyUnicode_InsertThousandsGrouping() API to return the maximum
   character if unicode is NULL
 * Replace MIN/MAX macros by Py_MIN/Py_MAX
 * stringlib/undef.h undefines STRINGLIB_IS_UNICODE
 * stringlib/localeutil.h only supports Unicode
2012-02-24 00:37:51 +01:00
Georg Brandl
afe05bd494 Bump version to 3.2.3rc1. 2012-02-23 21:14:12 +01:00
Benjamin Peterson
36a6558891 version now 3.1.5rc1 2012-02-23 10:45:48 -05:00
Antoine Pitrou
528b54b263 Fix test failure in test_cmd_line by initializing the hash secret at the earliest point. 2012-02-21 19:08:26 +01:00
Antoine Pitrou
86838b02f0 Fix test failure in test_cmd_line by initializing the hash secret at the earliest point. 2012-02-21 19:03:47 +01:00
Benjamin Peterson
d9a3591ed1 merge 3.2 2012-02-21 11:12:14 -05:00
Benjamin Peterson
e249dcab7a merge 3.2 2012-02-21 11:09:13 -05:00
Benjamin Peterson
69e9727657 ensure no one tries to hash things before the random seed is found 2012-02-21 11:08:50 -05:00
Georg Brandl
2fb477c0f0 Merge 3.2: Issue #13703 plus some related test suite fixes. 2012-02-21 00:33:36 +01:00
Georg Brandl
09a7c72cad Merge from 3.1: Issue #13703: add a way to randomize the hash values of basic types (str, bytes, datetime)
in order to make algorithmic complexity attacks on (e.g.) web apps much more complicated.

The environment variable PYTHONHASHSEED and the new command line flag -R control this
behavior.
2012-02-20 21:31:46 +01:00
Georg Brandl
2daf6ae249 Issue #13703: add a way to randomize the hash values of basic types (str, bytes, datetime)
in order to make algorithmic complexity attacks on (e.g.) web apps much more complicated.

The environment variable PYTHONHASHSEED and the new command line flag -R control this
behavior.
2012-02-20 19:54:16 +01:00
Benjamin Peterson
8eb1269c34 add generic implementation of a __dict__ descriptor for C types 2012-02-19 19:59:10 -05:00
Victor Stinner
4195b5caea Backout f8409b3d6449: the PEP 410 is not accepted yet 2012-02-08 23:03:19 +01:00
Victor Stinner
ccd5715a14 PEP 410 2012-02-08 14:31:50 +01:00
Victor Stinner
ed27785b32 Issue #13706: Add assertions to detect bugs earlier 2012-02-01 00:22:23 +01:00
Antoine Pitrou
7ab4af0427 Issue #13848: open() and the FileIO constructor now check for NUL characters in the file name.
Patch by Hynek Schlawack.
2012-01-29 18:43:36 +01:00
Antoine Pitrou
1334884ff2 Issue #13848: open() and the FileIO constructor now check for NUL characters in the file name.
Patch by Hynek Schlawack.
2012-01-29 18:36:34 +01:00
Benjamin Peterson
ce79852077 use the static identifier api for looking up special methods
I had to move the static identifier code from unicodeobject.h to object.h in
order for this to work.
2012-01-22 11:24:29 -05:00
Meador Inge
fa21bf015d Issue #12705: Raise SyntaxError when compiling multiple statements as single interactive statement 2012-01-19 01:08:41 -06:00