Eli Bendersky
2b6b73e7e1
Issue #14007 : implement doctype() method calling in XMLParser of _elementtree.
...
Includes exposing a doctype handler from expat through pyexpat.
2012-06-01 11:32:34 +03:00
Georg Brandl
8e0ed333b9
Post-release update.
2012-05-31 22:41:51 +02:00
Georg Brandl
f0397b9953
Bump version to 3.3.0a4.
2012-05-30 22:04:31 +02:00
Victor Stinner
d3f0882dfb
Issue #14744 : Use the new _PyUnicodeWriter internal API to speed up str%args and str.format(args)
...
* Formatting string, int, float and complex use the _PyUnicodeWriter API. It
avoids a temporary buffer in most cases.
* Add _PyUnicodeWriter_WriteStr() to restore the PyAccu optimization: just
keep a reference to the string if the output is only composed of one string
* Disable overallocation when formatting the last argument of str%args and
str.format(args)
* Overallocation allocates at least 100 characters: add min_length attribute
to the _PyUnicodeWriter structure
* Add new private functions: _PyUnicode_FastCopyCharacters(),
_PyUnicode_FastFill() and _PyUnicode_FromASCII()
The speed up is around 20% in average.
2012-05-29 12:57:52 +02:00
Richard Oudkerk
3e0a1eb889
Issue #14930 : Make memoryview objects weakrefable.
2012-05-28 21:35:09 +01:00
Eli Bendersky
e1f107e981
s/tabs/spaces, and clean trailing whitespace
2012-05-23 07:09:08 +03:00
Martin v. Löwis
cc10a37ef0
Widen ASDL sequences to Py_ssize_t lengths to better match PEP 353.
2012-05-15 14:45:03 +02:00
Benjamin Peterson
d5a1c44455
PEP 415: Implement suppression of __context__ display with an exception attribute
...
This replaces the original PEP 409 implementation. See #14133 .
2012-05-14 22:09:31 -07:00
Georg Brandl
85a2394467
Post-3.3a3 bump.
2012-05-06 11:20:09 +02:00
Larry Hastings
76ad59b7e8
Issue #14127 : Add ns= parameter to utime, futimes, and lutimes.
...
Removed futimens as it is now redundant.
Changed shutil.copystat to use st_atime_ns and st_mtime_ns from os.stat
and ns= parameter to utime--it once again preserves exact metadata on Linux!
2012-05-03 00:30:07 -07:00
Benjamin Peterson
49a69e4d48
strip is_ prefixes on clock_info fields
2012-05-01 09:38:34 -04:00
Georg Brandl
ab0ef20663
Bump to 3.3.0a3.
2012-05-01 09:35:18 +02:00
Brett Cannon
62228dbd6c
Issues #13959 , 14647: Re-implement imp.reload() in Lib/imp.py.
...
Thanks to Eric Snow for the patch.
2012-04-29 14:38:11 -04:00
Mark Dickinson
e383e82e04
Issue #14521 : Make result of float('nan') and float('-nan') more consistent across platforms. Further, don't rely on Py_HUGE_VAL for float('inf').
2012-04-29 15:31:56 +01:00
Victor Stinner
ec89539ccc
Issue #14428 , #14397 : Implement the PEP 418
...
* Rename time.steady() to time.monotonic()
* On Windows, time.monotonic() uses GetTickCount/GetTickCount64() instead of
QueryPerformanceCounter()
* time.monotonic() uses CLOCK_HIGHRES if available
* Add time.get_clock_info(), time.perf_counter() and time.process_time()
functions
2012-04-29 02:41:27 +02:00
Victor Stinner
d0880d57b0
Simplify and optimize formatlong()
...
* Remove _PyBytes_FormatLong(): inline it into formatlong()
* the input type is always a long, so remove the code for bool
* don't duplicate the string if the length does not change
* Use PyUnicode_DATA() instead of _PyUnicode_AsString()
2012-04-27 23:40:13 +02:00
Martin v. Loewis
4f2f3b6217
Account for shared keys in type's __sizeof__ ( #13903 ).
2012-04-24 19:13:57 +02:00
Victor Stinner
ece58deb9f
Close #14648 : Compute correctly maxchar in str.format() for substrin
2012-04-23 23:36:38 +02:00
Benjamin Peterson
7d95e40721
Implement PEP 412: Key-sharing dictionaries ( closes #13903 )
...
Patch from Mark Shannon.
2012-04-23 11:24:50 -04:00
Larry Hastings
6fe20b3aee
Issue #14127 : Add st_{cma}time_ns fields to os.stat() result object.
2012-04-19 15:07:49 -07:00
Martin v. Löwis
aa2efcb0bc
Issue #14098 : New functions PyErr_GetExcInfo and PyErr_SetExcInfo.
...
Patch by Stefan Behnel.
2012-04-19 14:33:43 +02:00
Brian Curtin
09b86d1196
Fix #14600 . Correct reference handling and naming of ImportError convenience function
2012-04-17 16:57:09 -05:00
Mark Dickinson
b0f00476a0
Issue #13889 : Merge fix from 3.2.
2012-04-15 15:12:37 +01:00
Mark Dickinson
18e3d81f96
Issue #13889 : On MSVC builds, set FPU control word at runtime for all string <-> float conversions. Patch by Samuel Iseli and Stefan Krah.
2012-04-15 15:10:56 +01:00
Brett Cannon
fd0741555b
Issue #2377 : Make importlib the implementation of __import__().
...
importlib._bootstrap is now frozen into Python/importlib.h and stored
as _frozen_importlib in sys.modules. Py_Initialize() loads the frozen
code along with sys and imp and then uses _frozen_importlib._install()
to set builtins.__import__() w/ _frozen_importlib.__import__().
2012-04-14 14:10:13 -04:00
Benjamin Peterson
633b32a7fa
put PyImportErrorObject with its brothers
2012-04-12 21:50:35 -04:00
Brett Cannon
79ec55e980
Issue #1559549 : Add 'name' and 'path' attributes to ImportError.
...
Currently import does not use these attributes as they are planned
for use by importlib (which will be another commit).
Thanks to Filip Gruszczyński for the initial patch and Brian Curtin
for refining it.
2012-04-12 20:24:54 -04:00
Georg Brandl
a51497ab86
Merge 3.2.3 release clone.
2012-04-11 12:46:24 +02:00
Georg Brandl
507776e787
Post-release update.
2012-04-11 12:45:12 +02:00
Georg Brandl
44036016b9
Bump to 3.2.3 final.
2012-04-10 19:28:09 +02:00
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
aa589b3ca7
Issue #14387 : undefine 'small' so that it doesn't clash with Windows headers.
2012-03-22 23:10:37 +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
Amaury Forgeot d'Arc
5e8260b09c
Issue #13727 : Add 3 macros to access PyDateTime_Delta members:
...
PyDateTime_DELTA_GET_DAYS, PyDateTime_DELTA_GET_SECONDS,
PyDateTime_DELTA_GET_MICROSECONDS.
Please use them instead of directly accessing PyDateTime_Delta struct members.
2012-01-17 21:31:50 +01:00
Benjamin Peterson
c0beabc2a5
move LINENO define to where it actually belongs
2012-01-16 17:29:05 -05:00
Meador Inge
da05f454e3
Issue #13629 : Renumber the tokens in token.h to match the _PyParser_TokenNames indexes.
2012-01-15 19:31:57 -06:00
Meador Inge
3388060127
Issue #13629 : Renumber the tokens in token.h to match the _PyParser_TokenNames indexes.
2012-01-15 19:15:36 -06:00
Gregory P. Smith
f5b62a9b31
Consolidate the occurrances of the prime used as the multiplier when hashing.
2012-01-14 15:45:13 -08:00
Gregory P. Smith
63e6c3222f
Consolidate the occurrances of the prime used as the multiplier when hashing
...
to a single #define instead of having several copies in several files.
This excludes the Modules/ tree (datetime and expat both have a copy
for their own purposes with no need for it to be the same).
2012-01-14 15:31:34 -08:00
Benjamin Peterson
d5890c8db5
add str.casefold() ( closes #13752 )
2012-01-14 13:23:30 -05:00
Benjamin Peterson
527c622926
make YieldFrom its own distinct from Yield ( closes #13780 )
2012-01-14 08:58:23 -05:00
Nick Coghlan
76e1bb0ef9
Fix indenting
2012-01-14 16:08:08 +10:00
Amaury Forgeot d'Arc
77b1ecf0ad
Silence compilation warnings on Windows
2012-01-13 22:12:37 +01:00
Nick Coghlan
1f7ce62bd6
Implement PEP 380 - 'yield from' ( closes #11682 )
2012-01-13 21:43:40 +10:00
Benjamin Peterson
b2bf01d824
use full unicode mappings for upper/lower/title case ( #12736 )
...
Also broaden the category of characters that count as lowercase/uppercase.
2012-01-11 18:17:06 -05:00
Victor Stinner
3fe553160c
Add a new PyUnicode_Fill() function
...
It is faster than the unicode_fill() function which was implemented in
formatter_unicode.c.
2012-01-04 00:33:50 +01:00
Antoine Pitrou
5b62942074
Issue #13577 : Built-in methods and functions now have a __qualname__.
...
Patch by sbt.
2011-12-23 12:40:16 +01:00
Victor Stinner
80bc72d5a2
fix PyCompactUnicodeObject doc (test)
2011-12-22 03:23:10 +01:00
Victor Stinner
52e2cc8604
backout 7876cd49300d: Move PyUnicode_WCHAR_KIND outside PyUnicode_Kind enum
2011-12-19 22:14:45 +01:00
Victor Stinner
0ba5af20c0
Move PyUnicode_WCHAR_KIND outside PyUnicode_Kind enum
2011-12-17 22:18:27 +01:00
Victor Stinner
1b57967b96
Issue #13560 : Locale codec functions use the classic "errors" parameter,
...
instead of surrogateescape
So it would be possible to support more error handlers later.
2011-12-17 05:47:23 +01:00
Victor Stinner
f2ea71fcc8
Issue #13560 : Add PyUnicode_EncodeLocale()
...
* Use PyUnicode_EncodeLocale() in time.strftime() if wcsftime() is not
available
* Document my last changes in Misc/NEWS
2011-12-17 04:13:41 +01:00
Victor Stinner
af02e1c85a
Add PyUnicode_DecodeLocaleAndSize() and PyUnicode_DecodeLocale()
...
* PyUnicode_DecodeLocaleAndSize() and PyUnicode_DecodeLocale() decode a string
from the current locale encoding
* _Py_char2wchar() writes an "error code" in the size argument to indicate
if the function failed because of memory allocation failure or because of a
decoding error. The function doesn't write the error message directly to
stderr.
* Fix time.strftime() (if wcsftime() is missing): decode strftime() result
from the current locale encoding, not from the filesystem encoding.
2011-12-16 23:56:01 +01:00
Antoine Pitrou
093ce9cd8c
Issue #6695 : Full garbage collection runs now clear the freelist of set objects.
...
Initial patch by Matthias Troffaes.
2011-12-16 11:24:27 +01:00
Benjamin Peterson
bfebb7b54a
improve abstract property support ( closes #11610 )
...
Thanks to Darren Dale for patch.
2011-12-15 15:34:02 -05:00
Antoine Pitrou
9d57481f04
Issue #13577 : various kinds of descriptors now have a __qualname__ attribute.
...
Patch by sbt.
2011-12-12 13:47:25 +01:00
Victor Stinner
16e6a80923
PyUnicode_Resize(): warn about canonical representation
...
Call also directly unicode_resize() in unicodeobject.c
2011-12-12 13:24:15 +01:00
Victor Stinner
b0a82a6a7f
Fix PyUnicode_Resize() for compact string: leave the string unchanged on error
...
Fix also PyUnicode_Resize() doc
2011-12-12 13:08:33 +01:00
Victor Stinner
bf6e560d0c
Make PyUnicode_Copy() private => _PyUnicode_Copy()
...
Undocument the function.
Make also decode_utf8_errors() as private (static).
2011-12-12 01:53:47 +01:00
Victor Stinner
7a9105a380
resize_copy() now supports legacy ready strings
2011-12-12 00:13:42 +01:00
Victor Stinner
24c74be9a3
PyUnicode_IS_ASCII() macro ensures that the string is ready
...
It has no sense to check if a not ready string is ASCII or not.
2011-12-12 01:24:20 +01:00
Barry Warsaw
04f6974d84
- Issue #11147 : Fix an unused argument in _Py_ANNOTATE_MEMORY_ORDER. (Fix
...
given by Campbell Barton).
2011-12-05 16:50:41 -05:00
Barry Warsaw
9f57135465
- Issue #11147 : Fix an unused argument in _Py_ANNOTATE_MEMORY_ORDER. (Fix
...
given by Campbell Barton).
2011-12-05 16:45:02 -05:00
Victor Stinner
551ac95733
Py_UNICODE_HIGH_SURROGATE() and Py_UNICODE_LOW_SURROGATE() macros
...
And use surrogates macros everywhere in unicodeobject.c
2011-11-29 22:58:13 +01:00
Jesus Cea
66f412e4dc
MERGE: Closes issue #13488 : Some old preprocessors have problem with #define not in the first column
2011-11-27 05:17:14 +01:00
Jesus Cea
6d47db31f0
Closes issue #13488 : Some old preprocessors have problem with #define not in the first column
2011-11-27 05:16:22 +01:00
Victor Stinner
0fdfceb782
Issue #12567 : The curses module uses Unicode functions for Unicode arguments
...
when it is linked to the ncurses library. It encodes also Unicode strings to
the locale encoding instead of UTF-8.
2011-11-25 22:10:02 +01:00
Antoine Pitrou
86a36b500a
PEP 3155 / issue #13448 : Qualified name for classes and functions.
2011-11-25 18:56:07 +01:00
Antoine Pitrou
6dd381eb62
Issue #12328 : Under Windows, refactor handling of Ctrl-C events and
...
make _multiprocessing.win32.WaitForMultipleObjects interruptible when
the wait_flag parameter is false. Patch by sbt.
2011-11-21 21:26:56 +01:00
Antoine Pitrou
ce4a9da705
Issue #13411 : memoryview objects are now hashable when the underlying object is hashable.
2011-11-21 20:46:33 +01:00
Victor Stinner
f3ae6208c7
PyUnicode_GET_SIZE() checks that PyUnicode_AsUnicode() succeed
...
using an assertion
2011-11-21 02:24:49 +01:00
Victor Stinner
77faf69ca1
_PyUnicode_CheckConsistency() also checks maxchar maximum value,
...
not only its minimum value
2011-11-20 18:56:05 +01:00
Victor Stinner
9343999597
Fix PyUnicode_CopyCharacters() doc
2011-11-20 18:29:14 +01:00
Victor Stinner
7c8bbbbb0c
Ensure that Py_UCS4 is 32 bits and Py_UCS2 is 16 bits
2011-11-20 18:28:29 +01:00
Petri Lehtinen
aadc519ceb
Merge branch 3.2 ( closes #13338 )
2011-11-19 22:04:33 +02:00
Petri Lehtinen
8d40f16a60
Issue #13338 : Handle all enumerations in _Py_ANNOTATE_MEMORY_ORDER
...
This allows compiling extension modules with -Wswitch-enum on gcc.
Initial patch by Floris Bruynooghe.
2011-11-19 22:03:10 +02:00
Antoine Pitrou
f34a0cdc6c
Issue #10227 : Add an allocation cache for a single slice object.
...
Patch by Stefan Behnel.
2011-11-18 20:14:34 +01:00
Victor Stinner
6f9568bb1f
Fix misused of "PyUnicodeObject" structure name in unicodeobject.h
2011-11-17 00:12:44 +01:00
Antoine Pitrou
9a812cbc89
Issue #13389 : Full garbage collection passes now clear the freelists for
...
list and dict objects. They already cleared other freelists in the
interpreter.
2011-11-15 00:00:12 +01:00
Martin v. Löwis
1db7c13be1
Port encoders from Py_UNICODE API to unicode object API.
2011-11-10 18:24:32 +01:00
Martin v. Löwis
d10759f6ed
Make _PyUnicode_FromId return borrowed references.
...
http://mail.python.org/pipermail/python-dev/2011-November/114347.html
2011-11-07 13:00:05 +01:00
Victor Stinner
e30c0a1014
Fix gdb/libpython.py for not ready Unicode strings
...
_PyUnicode_CheckConsistency() checks also hash and length value for not ready
Unicode strings.
2011-11-04 20:54:05 +01:00
Victor Stinner
7931d9a951
Replace PyUnicodeObject type by PyObject
...
* _PyUnicode_CheckConsistency() now takes a PyObject* instead of void*
* Remove now useless casts to PyObject*
2011-11-04 00:22:48 +01:00
Martin v. Löwis
23e275b3ad
Port UCS1 and charmap codecs to new API.
2011-11-02 18:02:51 +01:00
Nick Coghlan
de31b191e5
Issue 1294232: Fix errors in metaclass calculation affecting some cases of metaclass inheritance. Patch by Daniel Urban.
2011-10-23 22:04:16 +10:00
Martin v. Löwis
0d3072e98d
Drop Py_UCS4_ functions. Closes #13246 .
2011-10-31 08:40:56 +01:00
Victor Stinner
9db1a8b69f
Replace PyUnicodeObject* by PyObject* where it was irrevelant
...
A Unicode string can now be a PyASCIIObject, PyCompactUnicodeObject or
PyUnicodeObject. Aliasing a PyASCIIObject* or PyCompactUnicodeObject* to
PyUnicodeObject* is wrong
2011-10-23 20:04:37 +02:00
Nick Coghlan
9715d26305
Merge issue 1294232 patch from 3.2
2011-10-23 22:36:42 +10:00
Ezio Melotti
931b8aac80
#12753 : Add support for Unicode name aliases and named sequences.
2011-10-21 21:57:36 +03:00
Victor Stinner
55c7e00fc0
Simplify _PyUnicode_COMPACT_DATA() macro
2011-10-18 23:32:53 +02:00
Victor Stinner
3a50e7056e
Issue #12281 : Rewrite the MBCS codec to handle correctly replace and ignore
...
error handlers on all Windows versions. The MBCS codec is now supporting all
error handlers, instead of only replace to encode and ignore to decode.
2011-10-18 21:21:00 +02:00
Antoine Pitrou
e60698317d
Fix build under Windows
2011-10-15 16:38:20 +02:00
Martin v. Löwis
bd928fef42
Rename _Py_identifier to _Py_IDENTIFIER.
2011-10-14 10:20:37 +02:00
Victor Stinner
f5cff56a1b
Issue #13088 : Add shared Py_hexdigits constant to format a number into base 16
2011-10-14 02:13:11 +02:00
Victor Stinner
8813104e53
Simplify PyUnicode_MAX_CHAR_VALUE
...
Use PyUnicode_IS_ASCII instead of PyUnicode_IS_COMPACT_ASCII, so the following
test can be removed:
PyUnicode_DATA(op) == (((PyCompactUnicodeObject *)(op))->utf8)
2011-10-13 01:12:01 +02:00
Antoine Pitrou
6b4883dec0
PEP 3151 / issue #12555 : reworking the OS and IO exception hierarchy.
2011-10-12 02:54:14 +02:00
Victor Stinner
794d567b17
any_find_slice() doesn't use callbacks anymore
...
* Call directly the right find/rfind method: allow inlining functions
* Remove Py_LOCAL_CALLBACK (added for any_find_slice)
2011-10-10 03:21:36 +02:00
Martin v. Löwis
87da872c69
Drop extra semicolon.
2011-10-09 11:54:42 +02:00
Martin v. Löwis
afe55bba33
Add API for static strings, primarily good for identifiers.
...
Thanks to Konrad Schöbel and Jasper Schulz for helping with the mass-editing.
2011-10-09 10:38:36 +02:00
Martin v. Löwis
c47adb04b3
Change PyUnicode_KIND to 1,2,4. Drop _KIND_SIZE and _CHARACTER_SIZE.
2011-10-07 20:55:35 +02:00
Georg Brandl
db6c7f5c33
Update C API docs for PEP 393.
2011-10-07 11:19:11 +02:00
Antoine Pitrou
c61c8d7a5e
Issue #12911 : Fix memory consumption when calculating the repr() of huge tuples or lists.
...
This introduces a small private API for this common pattern.
The issue has been discovered thanks to Martin's huge-mem buildbot.
2011-10-06 19:04:12 +02:00
Antoine Pitrou
eeb7eea1f9
Issue #12911 : Fix memory consumption when calculating the repr() of huge tuples or lists.
...
This introduces a small private API for this common pattern.
The issue has been discovered thanks to Martin's huge-mem buildbot.
2011-10-06 18:57:27 +02:00
Victor Stinner
b066cc6aba
Fix PyUnicode_CHARACTER_SIZE and PyUnicode_KIND_SIZE
2011-10-06 15:54:53 +02:00
Antoine Pitrou
dbf697ae5c
Fix compilation warnings under 64-bit Windows
2011-10-06 15:34:41 +02:00
Éric Araujo
0f4ee93b06
Branch merge
2011-10-06 13:22:21 +02:00
Victor Stinner
1d4b35f4e5
rephrase PyUnicode_1BYTE_KIND documentation
2011-10-06 01:51:19 +02:00
Victor Stinner
fb9ea8c57e
Don't check for the maximum character when copying from unicodeobject.c
...
* Create copy_characters() function which doesn't check for the maximum
character in release mode
* _PyUnicode_CheckConsistency() is no more static to be able to use it
in _PyUnicode_FormatAdvanced() (in formatter_unicode.c)
* _PyUnicode_CheckConsistency() checks the string hash
2011-10-06 01:45:57 +02:00
Éric Araujo
80a348c0a0
Fix typo
2011-10-05 01:11:12 +02:00
Antoine Pitrou
310638ea81
Try to fix linking failures under Windows
2011-10-04 14:44:35 +02:00
Antoine Pitrou
36225c6a99
Try to fix linking failures under Windows
2011-10-04 14:43:47 +02:00
Victor Stinner
30134f53fc
Complete documentation of compact ASCII strings
2011-10-04 01:32:45 +02:00
Victor Stinner
a41463c203
Document utf8_length and wstr_length states
...
Ensure these states with assertions in _PyUnicode_CheckConsistency().
2011-10-04 01:05:08 +02:00
Victor Stinner
7f11ad4594
Unicode: document when the wstr pointer is shared with data
...
Add also related assertions to _PyUnicode_CheckConsistency().
2011-10-04 00:00:20 +02:00
Victor Stinner
8cfcbed4e3
Improve string forms and PyUnicode_Resize() documentation
...
Remove also the FIXME for resize_copy(): as discussed with Martin, copy the
string on resize if the string is not resizable is just fine.
2011-10-03 23:19:21 +02:00
Victor Stinner
c3cec7868b
Add asciilib: similar to ucs1, ucs2 and ucs4 library, but specialized to ASCII
...
ucs1, ucs2 and ucs4 libraries have to scan created substring to find the
maximum character, whereas it is not need to ASCII strings. Because ASCII
strings are common, it is useful to optimize ASCII.
2011-10-05 21:24:08 +02:00
Victor Stinner
4d0d54bcba
Document requierements of Unicode kinds
2011-10-05 01:31:05 +02:00
Georg Brandl
07de325672
More fixes.
2011-10-05 16:47:38 +02:00
Georg Brandl
c6bc4c6897
Fix a few typos in the unicode header.
2011-10-05 16:23:09 +02:00
Georg Brandl
4975a9b44d
Fix grammar.
2011-10-05 16:12:21 +02:00
Victor Stinner
b9275c104e
Speedup str[a:b] and PyUnicode_FromKindAndData
...
* str[a:b] doesn't scan the string for the maximum character if the string
is ascii only
* PyUnicode_FromKindAndData() stops if we are sure that we cannot use a
shorter character type. For example, _PyUnicode_FromUCS1() stops if we
have at least one character in range U+0080-U+00FF
2011-10-05 14:01:42 +02:00
Victor Stinner
85041a54bd
_PyUnicode_CheckConsistency() checks utf8 field consistency
2011-10-03 14:42:39 +02:00
Victor Stinner
a3b334da6d
PyUnicode_Ready() now sets ascii=1 if maxchar < 128
...
ascii=1 is no more reserved to PyASCIIObject. Use
PyUnicode_IS_COMPACT_ASCII(obj) to check if obj is a PyASCIIObject (as before).
2011-10-03 13:53:37 +02:00
Victor Stinner
910337b42e
Add _PyUnicode_CheckConsistency() macro to help debugging
...
* Document Unicode string states
* Use _PyUnicode_CheckConsistency() to ensure that objects are always
consistent.
2011-10-03 03:20:16 +02:00
Victor Stinner
37943769ef
PyUnicode_READ_CHAR() ensures that the string is ready
2011-10-02 20:33:18 +02:00
Victor Stinner
7a48ff7e06
Use Py_UCS1 instead of unsigned char in unicodeobject.h
2011-10-02 00:55:25 +02:00
Victor Stinner
cd9950fd09
PyUnicode_WriteChar() raises IndexError on invalid index
...
PyUnicode_WriteChar() raises also a ValueError if the string has more than 1
reference.
2011-10-02 00:34:53 +02:00
Victor Stinner
9f789e7f63
_PyUnicode_AsKind() is *not* part of the stable ABI
2011-10-01 03:57:28 +02:00
Victor Stinner
4584a5ba1a
PyUnicode_CHARACTER_SIZE(): add a reference to PyUnicode_KIND_SIZE()
2011-10-01 02:39:37 +02:00
Victor Stinner
034f6cf10c
Add PyUnicode_Copy() function, include it to the public API
2011-09-30 02:26:44 +02:00
Victor Stinner
d8f6510acc
_PyUnicode_Ready() cannot be used on ready strings anymore
...
* Change its prototype: PyObject* instead of PyUnicodeoObject*.
* Remove an old assertion, the result of PyUnicode_READY (_PyUnicode_Ready)
must be checked instead
2011-09-29 19:43:17 +02:00
Victor Stinner
bc8b81bc4e
Move _PyUnicode_UTF8() and _PyUnicode_UTF8_LENGTH() outside unicodeobject.h
...
Move these macros to unicodeobject.c
2011-09-29 19:31:34 +02:00
Victor Stinner
a0702ab1fe
Add a note in PyUnicode_CopyCharacters() doc: it doesn't write null character
...
Cleanup also the code (avoid the goto).
2011-09-29 14:14:38 +02:00
Victor Stinner
f0ddadcf2e
Rename Py_BUILD_ASSERT to Py_BUILD_ASSERT_EXPR
...
To make it clearer that Py_BUILD_ASSERT_EXPR(cond) cannot be used as
assert(cond).
2011-09-29 12:43:18 +02:00
Victor Stinner
573696a9ca
pymacro.h: Inline _Py_ARRAY_LENGTH_CHECK() and add http://ccodearchive.net/
2011-09-29 12:12:39 +02:00
Victor Stinner
dfb866d127
Enhance Py_ARRAY_LENGTH(): fail at build time if the argument is not an array
...
Move other various macros to pymcacro.h
Thanks Rusty Russell for having written these amazing C macros!
2011-09-29 01:12:24 +02:00
Victor Stinner
2bdc7f591b
Move code related to compile from Python.h to compile.h
2011-09-29 01:04:08 +02:00
Victor Stinner
f5ca1a21a5
PyUnicode_CopyCharacters() fails if 'to' has more than 1 reference
2011-09-28 23:54:59 +02:00
Ezio Melotti
2aa2b3b4d5
Clean up a few tabs that went in with PEP393.
2011-09-29 00:58:57 +03:00
Victor Stinner
17222160e7
Mark _PyUnicode_FindMaxCharAndNumSurrogatePairs() as private
2011-09-28 22:15:37 +02:00
Victor Stinner
157f83fcfc
Strip trailing spaces in unicodeobject.[ch]
2011-09-28 21:41:31 +02:00
Victor Stinner
be78eaf2de
PyUnicode_CopyCharacters() checks for buffer and character overflow
...
It now returns the number of written characters on success.
2011-09-28 21:37:03 +02:00
Victor Stinner
fb5f5f2420
Mark PyUnicode_CONVERT_BYTES as private
2011-09-28 21:39:49 +02:00
Georg Brandl
4cb0de246c
Rename new macros to conform to naming rules (function macros have "Py" prefix, not "PY").
2011-09-28 21:49:49 +02:00
Victor Stinner
5ce1b0dbc0
Set Py_UNICODE_REPLACEMENT_CHARACTER type to Py_UCS4, instead of Py_UNICODE
2011-09-28 20:29:27 +02:00
Martin v. Löwis
d63a3b8beb
Implement PEP 393.
2011-09-28 07:41:54 +02:00
Mark Dickinson
0390151100
Fix typo in comment: _PyHash_Double -> _Py_HashDouble.
2011-09-24 16:24:56 +01:00
Victor Stinner
f955eb210f
Merge 3.2: Fix PyUnicode_AsWideCharString() doc
...
- Fix PyUnicode_AsWideCharString() doc: size doesn't contain the null
character
- Fix spelling of the null character
2011-09-06 02:01:29 +02:00
Victor Stinner
d88d9836c5
Fix PyUnicode_AsWideCharString() doc: size doesn't contain the null character
...
Fix also spelling of the null character.
2011-09-06 02:00:05 +02:00
Georg Brandl
06ee020961
Post-release version bump.
2011-09-04 08:36:22 +02:00
Georg Brandl
3484a8771c
Merge with release clone.
2011-09-04 08:35:54 +02:00
Benjamin Peterson
e35dc5110f
merge 3.2
2011-09-01 16:33:56 -04:00
Benjamin Peterson
eff61f6927
make sure to initialize the method wrapper type
2011-09-01 16:32:31 -04:00
Charles-François Natali
ac7e9e058d
Issue #12287 : Fix a stack corruption in ossaudiodev module when the FD is
...
greater than FD_SETSIZE.
2011-08-28 18:10:27 +02:00
Charles-François Natali
aa26b27503
Issue #12287 : Fix a stack corruption in ossaudiodev module when the FD is
...
greater than FD_SETSIZE.
2011-08-28 17:51:43 +02:00
Georg Brandl
b0993bc78d
Bump to 3.2.2.
2011-09-03 11:17:55 +02:00
Ezio Melotti
8c9375bb59
#10542 : Add 4 macros to work with surrogates: Py_UNICODE_IS_SURROGATE, Py_UNICODE_IS_HIGH_SURROGATE, Py_UNICODE_IS_LOW_SURROGATE, Py_UNICODE_JOIN_SURROGATES.
2011-08-22 20:03:25 +03:00
Georg Brandl
666ed0b84d
Post-release steps.
2011-08-13 20:19:09 +02:00
Georg Brandl
b3f0ce4d1e
Bump version to 3.2.2rc1.
2011-08-13 11:34:58 +02:00
Brian Curtin
7d2f9e1342
Add Py_RETURN_NOTIMPLEMENTED macro. Fixes #12724 .
2011-08-10 20:05:21 -05:00
Benjamin Peterson
832bfe2ebd
add a AST validator ( closes #12575 )
2011-08-09 16:15:04 -05:00
Benjamin Peterson
450bb594c8
forgotten in f578ca44193d
2011-08-09 16:14:45 -05:00
Benjamin Peterson
e249841903
add a asdl bytes type, so Bytes.s be properly typechecked
2011-08-09 16:08:39 -05:00
Sandro Tosi
1e8d8fd01d
#10741 : merge with 3.2
2011-08-08 00:17:43 +02:00
Sandro Tosi
61baee0ee7
#10741 : add documentation for PyGILState_GetThisThreadState()
2011-08-08 00:16:54 +02:00
Benjamin Peterson
76f7f4d979
excise the remains of STOP_CODE, which hasn't done anything useful for years
2011-07-17 22:49:50 -05:00
Georg Brandl
bb9c7d0b91
Post-release steps for 3.2.1.
2011-07-09 10:56:06 +02:00
Georg Brandl
cd0dc16fdc
Bump version to 3.2.1.
2011-07-09 08:56:21 +02:00
Antoine Pitrou
370092071b
Issue #11863 : Remove support for legacy systems deprecated in Python 3.2
...
(following PEP 11). These systems are systems using Mach C Threads,
SunOS lightweight processes, GNU pth threads and IRIX threads.
2011-07-08 23:47:50 +02:00
Benjamin Peterson
ae10c0653e
add patchlevel to version string
2011-07-08 13:39:35 -05:00
Victor Stinner
99b9538636
Issue #9642 : Uniformize the tests on the availability of the mbcs codec
...
Add a new HAVE_MBCS define.
2011-07-04 14:23:54 +02:00
Georg Brandl
7d10a2d88a
Post-release steps.
2011-07-04 08:20:48 +02:00
Georg Brandl
d4fa7ed8db
Bump to 3.2.1rc2.
2011-07-03 09:41:27 +02:00
Benjamin Peterson
9003760991
map cells to arg slots at code creation time ( closes #12399 )
...
This removes nested loops in PyEval_EvalCodeEx.
2011-06-25 22:54:45 -05:00
Benjamin Peterson
acde6a0a40
onto 3.1.5
2011-06-11 11:33:01 -05:00
Benjamin Peterson
d858df20d0
bump to 3.1.4
2011-06-11 09:58:58 -05:00
Benjamin Peterson
9a63745273
bump to 3.1.4rc1
2011-05-29 16:06:00 -05:00
Benjamin Peterson
43af12b0b4
unify TryExcept and TryFinally ( closes #12199 )
2011-05-29 11:43:10 -05:00
Benjamin Peterson
bf1bbc1452
reflect with statements with multiple items in the AST ( closes #12106 )
2011-05-27 13:58:08 -05:00
Benjamin Peterson
04778a8150
make PyImport_ImportModuleLevel's first arg const like similiar functions ( closes #12173 )
2011-05-25 09:29:00 -05:00
Georg Brandl
d079367044
Set up branch to be rc2 next.
2011-05-21 17:36:20 +02:00
Georg Brandl
5673e27e72
Bump to 3.2.1rc1.
2011-05-15 17:52:42 +02:00
Georg Brandl
cd79cdc5e6
Bump to 3.2.1b1.
2011-05-08 09:03:36 +02:00
Antoine Pitrou
fc20b0c65c
Issue #1856 : Avoid crashes and lockups when daemon threads run while the
...
interpreter is shutting down; instead, these threads are now killed when
they try to take the GIL.
2011-05-04 20:04:29 +02:00
Antoine Pitrou
0d5e52d346
Issue #1856 : Avoid crashes and lockups when daemon threads run while the
...
interpreter is shutting down; instead, these threads are now killed when
they try to take the GIL.
2011-05-04 20:02:30 +02:00
Victor Stinner
d5c355ccc7
Issue #11223 : Replace threading._info() by sys.thread_info
2011-04-30 14:53:09 +02:00
Antoine Pitrou
9ea1c8d7d7
Issue #10517 : After fork(), reinitialize the TLS used by the PyGILState_*
...
APIs, to avoid a crash with the pthread implementation in RHEL 5. Patch
by Charles-François Natali.
2011-04-27 19:30:16 +02:00
Antoine Pitrou
0c759febb6
Issue #10517 : After fork(), reinitialize the TLS used by the PyGILState_*
...
APIs, to avoid a crash with the pthread implementation in RHEL 5. Patch
by Charles-François Natali.
2011-04-27 19:28:05 +02:00
Victor Stinner
3cbf14bfb1
Issue #10914 : Initialize correctly the filesystem codec when creating a new
...
subinterpreter to fix a bootstrap issue with codecs implemented in Python, as
the ISO-8859-15 codec.
Add fscodec_initialized attribute to the PyInterpreterState structure.
2011-04-27 00:24:21 +02:00
Victor Stinner
793b531756
Issue #10914 : Initialize correctly the filesystem codec when creating a new
...
subinterpreter to fix a bootstrap issue with codecs implemented in Python, as
the ISO-8859-15 codec.
Add fscodec_initialized attribute to the PyInterpreterState structure.
2011-04-27 00:24:21 +02:00
Victor Stinner
8e4d407818
PyGILState_Ensure(), PyGILState_Release(), PyGILState_GetThisThreadState() are
...
not available if Python is compiled without threads.
2011-04-26 23:34:58 +02:00
Jesus Cea
2fc8b87499
Port 5b607cd8c71b ( closes #11892 )
2011-04-20 22:26:57 +02:00
Victor Stinner
754851f456
Issue #11223 : Add threading._info() function providing informations about the
...
thread implementation.
Skip test_lock_acquire_interruption() and test_rlock_acquire_interruption() of
test_threadsignals if a thread lock is implemented using a POSIX mutex and a
POSIX condition variable. A POSIX condition variable cannot be interrupted by a
signal (e.g. on Linux, the futex system call is restarted).
2011-04-19 23:58:51 +02:00
Eli Bendersky
dd97fbb2dc
Issue #9904 : fix and clarify some comments + fix indentation in symtable code
2011-04-10 07:37:26 +03:00
Victor Stinner
7f2fee3640
Issue #10785 : Store the filename as Unicode in the Python parser.
2011-04-05 00:39:01 +02:00
Victor Stinner
fcb88c4503
Issue #11393 : _Py_DumpTraceback() writes the header even if there is no frame
2011-04-01 15:34:01 +02:00
Victor Stinner
024e37adcc
Issue #11393 : Add the new faulthandler module
2011-03-31 01:31:06 +02:00
Éric Araujo
be3bd57ba2
Remove traces of division_warning left over from Python 2 ( #10998 )
2011-03-26 01:55:15 +01:00
Victor Stinner
34ad2faf85
Closes #11210 : Remove PyErr_SetFromWindowsErrWithFilenameObject() of pyerrors.h
...
PyErr_SetFromWindowsErrWithFilenameObject() was never implemented.
2011-03-21 01:58:55 +01:00
Ezio Melotti
3b3499ba69
#11565 : Merge with 3.1.
2011-03-16 11:35:38 +02:00
Ezio Melotti
13925008dc
#11565 : Fix several typos. Patch by Piotr Kasprzyk.
2011-03-16 11:05:33 +02:00
Benjamin Peterson
274f5fa501
merge 3.1
2011-03-15 15:04:06 -05:00
Benjamin Peterson
ec4b44b2da
make this subversion artifact empty
2011-03-15 15:03:13 -05:00
Victor Stinner
fe93faf98c
Issue #3080 : Add PyImport_ImportModuleLevelObject() function
...
Use it for the builtin __import__ function.
2011-03-14 15:54:52 -04:00
Victor Stinner
db536afee1
Issue #3080 : Document the name attribute of the _inittab structure
...
The name is an ASCII encoded string.
2011-03-07 18:34:59 +01:00
Victor Stinner
9587286f98
Issue #3080 : Import builtins using Unicode strings
...
- is_builtin(), init_builtin(), load_builtin() and other builtin related
functions use Unicode strings, instead of byte strings
- Rename _PyImport_FixupExtensionUnicode() to _PyImport_FixupExtensionObject()
- Rename _PyImport_FindExtensionUnicode() to _PyImport_FindExtensionObject()
2011-03-07 18:20:56 +01:00
Victor Stinner
53dc735168
Issue #3080 : Add PyImport_ImportFrozenModuleObject()
...
find_frozen(), get_frozen_object(), is_frozen_package() and other functions
related to frozen modules use Unicode strings instead of byte strings.
2011-03-20 01:50:21 +01:00
Ezio Melotti
b88ed1549e
#11565 : Merge with 3.2.
2011-03-16 11:38:59 +02:00
Benjamin Peterson
485119eb1e
kill PY_PATCHLEVEL_REVISION
2011-03-15 15:07:20 -05:00
Benjamin Peterson
bb375d66b8
merge 3.2
2011-03-15 15:05:22 -05:00
Jesus Cea
736e7fc0f6
Issue #11495 : OSF support is eliminated. It was deprecated in Python 3.2
2011-03-14 17:36:54 +01:00
Georg Brandl
776e586114
Remove sys.subversion and svn build identification leftovers.
2011-03-06 10:35:42 +01:00
Georg Brandl
fe09a54280
Merge build identification to default branch.
2011-03-06 10:26:32 +01:00
Georg Brandl
13039c87f1
Merge build identification to 3.2 branch.
2011-03-06 10:13:00 +01:00
Georg Brandl
1ca2e7965c
Commit the hg build identification patch from the pymigr repo.
2011-03-05 20:51:24 +01:00
Victor Stinner
27ee089c35
Issue #3080 : Add PyImport_AddModuleObject() and PyImport_ExecCodeModuleObject()
2011-03-04 12:57:09 +00:00
Victor Stinner
0639b56672
Issue #3080 : Add PyModule_NewObject() function
2011-03-04 12:57:07 +00:00
Victor Stinner
f3fd733f92
Remove useless argument of _PyUnicode_AsDefaultEncodedString()
2011-03-02 01:03:11 +00:00
Victor Stinner
bd475115c4
Issue #3080 : Add PyModule_GetNameObject()
...
repr(module) uses %R to format module name and filenames, instead of '%s' and
'%U', so surrogates from undecodable bytes in a filename (PEP 383) are escaped.
2011-02-23 00:21:43 +00:00
Victor Stinner
501c09a754
Issue #3080 : Mark _PyImport_FindBuiltin() argument as constant
...
And as a consequence, mark also name argument of
_PyImport_FindExtensionUnicode() constant too. But I plan to change this
argument type to PyObject* later.
2011-02-23 00:02:00 +00:00
Victor Stinner
eda71c9ef1
Merged revisions 88517 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r88517 | victor.stinner | 2011-02-23 00:38:34 +0100 (mer., 23 févr. 2011) | 1 line
Issue #3080 : document encoding used by import functions
........
2011-02-22 23:43:57 +00:00
Victor Stinner
d7e76405c7
Issue #3080 : document encoding used by import functions
2011-02-22 23:38:34 +00:00
Brett Cannon
b94767ff44
Issue #8914 : fix various warnings from the Clang static analyzer v254.
2011-02-22 20:15:44 +00:00
Georg Brandl
0accdfa00b
Update in-development version.
2011-02-21 18:13:44 +00:00
Georg Brandl
3ebb6b3615
Bump trunk to 3.3 alpha 0.
2011-02-20 10:37:07 +00:00
Georg Brandl
260a788767
Version bump to 3.2 final.
2011-02-20 10:29:04 +00:00
Georg Brandl
d585218a75
Post-release updates.
2011-02-14 06:35:00 +00:00
Georg Brandl
a6d12ef048
Bump for 3.2rc3.
2011-02-13 10:00:57 +00:00
Martin v. Löwis
cc7e23ac15
Issue #11134 : Add missing fields to typeslots.h.
...
Reviewed by Georg Brandl.
2011-02-11 20:50:24 +00:00
Martin v. Löwis
6916806443
Issue #11135 : Remove redundant doc field from PyType_Spec.
...
Reviewed by Georg Brandl.
2011-02-11 20:47:49 +00:00
Martin v. Löwis
738236dbd6
Issue #11067 : Add PyType_GetFlags, to support PyUnicode_Check
...
in the limited ABI
2011-02-05 20:35:29 +00:00
Georg Brandl
6b449baa83
Post-release updates.
2011-01-31 10:39:57 +00:00
Georg Brandl
d6e19c3513
Bump version.
2011-01-30 14:03:33 +00:00
Georg Brandl
0c5036fdcd
Post-release updates.
2011-01-16 08:44:50 +00:00
Georg Brandl
3988ed8e6f
Bump to 3.2rc1.
2011-01-15 17:08:53 +00:00
Martin v. Löwis
189c091612
Drop bf_getbuffer/bf_releasebuffer from stable ABI,
...
see #10181 .
2011-01-06 19:28:31 +00:00
Martin v. Löwis
c83bc3c1fb
Remove buffer API from stable ABI for now, see #10181 .
2011-01-06 19:15:47 +00:00
Antoine Pitrou
23683ef26d
Issue #10333 : Remove ancient GC API, which has been deprecated since
...
Python 2.2.
2011-01-04 00:00:31 +00:00
Gregory P. Smith
60db46758f
post release bump
2011-01-01 21:18:46 +00:00
Georg Brandl
8aa7e999b5
Add sys.flags.quiet attribute for the new -q option, as noted missing by Eric in #1772833 .
2010-12-28 18:30:18 +00:00
Victor Stinner
b9cb21efc8
Issue #10780 : Remove commas at the end of the argument list
...
Forbidden in C, stupid language!
2010-12-28 00:59:03 +00:00
Victor Stinner
92be939695
Issue #10780 : PyErr_SetFromWindowsErrWithFilename() and
...
PyErr_SetExcFromWindowsErrWithFilename() decode the filename from the
filesystem encoding instead of UTF-8.
2010-12-28 00:28:21 +00:00
Victor Stinner
cb428f0162
Issue #10779 : PyErr_WarnExplicit() decodes the filename from the filesystem
...
encoding instead of UTF-8.
2010-12-27 20:10:36 +00:00
Victor Stinner
0d711169fa
Issue #9738 : Ooops, fix typos in my previous commit (r87506)
2010-12-27 02:39:20 +00:00
Victor Stinner
00676d1436
Issue #9738 : Document encodings of AST, compiler, parser and PyRun functions
2010-12-27 01:49:31 +00:00
Victor Stinner
dc2081f72b
Issue #9738 : document encodings of unicode functions
2010-12-27 01:49:29 +00:00
Victor Stinner
555a24f206
Issue #9738 : Document encodings of error and warning functions
2010-12-27 01:49:26 +00:00
Georg Brandl
8a60e94802
Bump to 3.2b2.
2010-12-19 10:30:28 +00:00
Antoine Pitrou
810023db3e
Issue #8844 : Regular and recursive lock acquisitions can now be interrupted
...
by signals on platforms using pthreads. Patch by Reid Kleckner.
2010-12-15 22:59:16 +00:00
Georg Brandl
b550308597
Take PyUnicode_TransformDecimalToASCII out of the limited API.
2010-12-05 11:40:48 +00:00
Georg Brandl
41ea8ae667
Bump to 3.2b1.
2010-12-04 19:09:24 +00:00
Martin v. Löwis
0d012f284b
Expose CompileString, not CompileStringFlags under the
...
limited API.
2010-12-04 12:00:49 +00:00
Georg Brandl
8334fd9285
Add an "optimize" parameter to compile() to control the optimization level, and provide an interface to it in py_compile, compileall and PyZipFile.
2010-12-04 10:26:46 +00:00
Alexander Belopolsky
942af5a9a4
Issue #10557 : Fixed error messages from float() and other numeric
...
types. Added a new API function, PyUnicode_TransformDecimalToASCII(),
which transforms non-ASCII decimal digits in a Unicode string to their
ASCII equivalents.
2010-12-04 03:38:46 +00:00
Martin v. Löwis
4d0d471a80
Merge branches/pep-0384.
2010-12-03 20:14:31 +00:00
Georg Brandl
71c23d4473
Include structseq.h in Python.h, and remove now-redundant includes in individual sources.
2010-11-30 09:30:54 +00:00
Benjamin Peterson
68eb3718d9
point in the general direction of 3.1.4
2010-11-28 04:50:12 +00:00
Benjamin Peterson
5757429130
3.1.3 final version bump
2010-11-27 14:46:13 +00:00
Georg Brandl
f65e25b626
Merged revisions 86134,86315-86316,86390,86424-86425,86428,86550,86561-86562,86564-86565,86705,86708,86713 via svnmerge from
...
svn+ssh://svn.python.org/python/branches/py3k
........
r86134 | georg.brandl | 2010-11-03 08:41:00 +0100 (Mi, 03 Nov 2010) | 1 line
A newline in lineno output breaks pyframe output.
........
r86315 | georg.brandl | 2010-11-08 12:05:18 +0100 (Mo, 08 Nov 2010) | 1 line
Fix latex conversion glitch in property/feature descriptions.
........
r86316 | georg.brandl | 2010-11-08 12:08:35 +0100 (Mo, 08 Nov 2010) | 1 line
Fix typo.
........
r86390 | georg.brandl | 2010-11-10 08:57:10 +0100 (Mi, 10 Nov 2010) | 1 line
Fix typo.
........
r86424 | georg.brandl | 2010-11-12 07:19:48 +0100 (Fr, 12 Nov 2010) | 1 line
Build a PDF of the FAQs too.
........
r86425 | georg.brandl | 2010-11-12 07:20:12 +0100 (Fr, 12 Nov 2010) | 1 line
#10008 : Fix duplicate index entry.
........
r86428 | georg.brandl | 2010-11-12 09:09:26 +0100 (Fr, 12 Nov 2010) | 1 line
Fix weird line block in table.
........
r86550 | georg.brandl | 2010-11-20 11:24:34 +0100 (Sa, 20 Nov 2010) | 1 line
Fix rst markup errors.
........
r86561 | georg.brandl | 2010-11-20 12:47:10 +0100 (Sa, 20 Nov 2010) | 1 line
#10460 : Update indent.pro to match PEP 7 better.
........
r86562 | georg.brandl | 2010-11-20 14:44:41 +0100 (Sa, 20 Nov 2010) | 1 line
#10439 : document PyCodec C APIs.
........
r86564 | georg.brandl | 2010-11-20 15:08:53 +0100 (Sa, 20 Nov 2010) | 1 line
#10460 : an even better indent.pro.
........
r86565 | georg.brandl | 2010-11-20 15:16:17 +0100 (Sa, 20 Nov 2010) | 1 line
socket.gethostbyname(socket.gethostname()) can fail when host name resolution is not set up correctly; do not fail test_socket if this is the case.
........
r86705 | georg.brandl | 2010-11-23 08:54:19 +0100 (Di, 23 Nov 2010) | 1 line
#10468 : document Unicode exception creation and access functions.
........
r86708 | georg.brandl | 2010-11-23 09:37:54 +0100 (Di, 23 Nov 2010) | 2 lines
#10511 : clarification of what heaps are; suggested by Johannes Hoff.
........
r86713 | georg.brandl | 2010-11-23 19:14:57 +0100 (Di, 23 Nov 2010) | 1 line
assert.h is also included. Thanks to Savio Sena.
........
2010-11-26 09:05:43 +00:00
Georg Brandl
bab3378f36
#10439 : document PyCodec C APIs.
2010-11-20 13:44:41 +00:00
Mark Dickinson
6646cd45be
Issue #10325 : Fix two issues in the fallback definitions of PY_LLONG_MAX and
...
PY_ULLONG_MAX in pyport.h. Thanks Hallvard B Furuseth for the patch.
2010-11-20 10:43:10 +00:00
David Malcolm
82e73cb951
Issue #9518 : Extend the PyModuleDef_HEAD_INIT macro to explicitly
...
zero-initialize all fields, fixing compiler warnings seen when building
extension modules with gcc with "-Wmissing-field-initializers" (implied
by "-W")
2010-11-17 21:20:18 +00:00
Alexander Belopolsky
9ec2c52817
Merged revisions 86478 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r86478 | alexander.belopolsky | 2010-11-16 09:29:01 -0500 (Tue, 16 Nov 2010) | 1 line
Issue #10413 : Updated comments to reflect code changes
........
2010-11-16 16:10:44 +00:00
Georg Brandl
9b0034d040
Post-release bumps.
2010-11-16 15:15:56 +00:00
Alexander Belopolsky
83283c270a
Issue #10413 : Updated comments to reflect code changes
2010-11-16 14:29:01 +00:00
Benjamin Peterson
650db5bd68
prepare for final
2010-11-13 23:34:41 +00:00
Benjamin Peterson
5889129571
bump to 3.1.3rc1
2010-11-13 17:28:56 +00:00
Georg Brandl
24854cac99
Bump to 3.2a4.
2010-11-13 06:39:58 +00:00
Victor Stinner
2f02a51135
PyUnicode_EncodeFS() raises an exception if _Py_wchar2char() fails
...
* Add error_pos optional argument to _Py_wchar2char()
* PyUnicode_EncodeFS() raises a UnicodeEncodeError or MemoryError if
_Py_wchar2char() fails
2010-11-08 22:43:46 +00:00
David Malcolm
9696088b6d
Issue #10288 : The deprecated family of "char"-handling macros
...
(ISLOWER()/ISUPPER()/etc) have now been removed: use Py_ISLOWER() etc
instead.
2010-11-05 17:23:41 +00:00
Antoine Pitrou
aeb6ceead7
Issue #10293 : Remove obsolete field in the PyMemoryView structure,
...
unused undocumented value PyBUF_SHADOW, and strangely-looking code in
PyMemoryView_GetContiguous.
2010-11-04 20:30:33 +00:00
Antoine Pitrou
98e2b45297
Merged revisions 85896 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r85896 | antoine.pitrou | 2010-10-29 00:56:58 +0200 (ven., 29 oct. 2010) | 4 lines
Issue #5437 : A preallocated MemoryError instance should not hold traceback
data (including local variables caught in the stack trace) alive infinitely.
........
2010-10-28 23:06:57 +00:00
Antoine Pitrou
07e20ef50b
Issue #5437 : A preallocated MemoryError instance should not hold traceback
...
data (including local variables caught in the stack trace) alive infinitely.
2010-10-28 22:56:58 +00:00
Victor Stinner
09f24bb408
Issue #8761 : Mangle PyUnicode_CompareWithASCIIString function name for
...
narrow/wide unicode build.
2010-10-24 20:38:25 +00:00
Georg Brandl
08be72d0aa
Add a new warning gategory, ResourceWarning, as discussed on python-dev. It is silent by default,
...
except when configured --with-pydebug.
Emit this warning from the GC shutdown procedure, rather than just printing to stderr.
2010-10-24 15:11:22 +00:00
Benjamin Peterson
8035bc5c04
follow up to #9778 : define and use an unsigned hash type
2010-10-23 16:20:50 +00:00
Antoine Pitrou
9583cac633
Issue #10089 : Add support for arbitrary -X options on the command-line.
...
They can be retrieved through a new attribute `sys._xoptions`.
2010-10-21 13:42:28 +00:00
R. David Murray
fd6a55ec41
Merged revisions 85675 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r85675 | r.david.murray | 2010-10-17 20:15:31 -0400 (Sun, 17 Oct 2010) | 4 lines
#4499 : silence compiler warning on AIX.
Patch from ActiveState.
........
2010-10-18 00:18:46 +00:00
R. David Murray
051176fde8
#4499 : silence compiler warning on AIX.
...
Patch from ActiveState.
2010-10-18 00:15:31 +00:00
Benjamin Peterson
8f67d0893f
make hashes always the size of pointers; introduce Py_hash_t #9778
2010-10-17 20:54:53 +00:00
Victor Stinner
49d3f2514b
_PyImport_FixupExtension() and _PyImport_FindExtension() uses FS encoding
...
* Rename _PyImport_FindExtension() to _PyImport_FindExtensionUnicode():
the filename becomes a Unicode object instead of byte string
* Rename _PyImport_FixupExtension() to _PyImport_FixupExtensionUnicode():
the filename becomes a Unicode object instead of byte string
2010-10-17 01:24:53 +00:00
Victor Stinner
168e117e0a
Add an optional size argument to _Py_char2wchar()
...
_Py_char2wchar() callers usually need the result size in characters. Since it's
trivial to compute it in _Py_char2wchar() (O(1) whereas wcslen() is O(n)), add
an option to get it.
2010-10-16 23:16:16 +00:00
Victor Stinner
f3170ccef8
Use locale encoding if Py_FileSystemDefaultEncoding is not set
...
* PyUnicode_EncodeFSDefault(), PyUnicode_DecodeFSDefaultAndSize() and
PyUnicode_DecodeFSDefault() use the locale encoding instead of UTF-8 if
Py_FileSystemDefaultEncoding is NULL
* redecode_filenames() functions and _Py_code_object_list (issue #9630 )
are no more needed: remove them
2010-10-15 12:04:23 +00:00
Victor Stinner
5d1e3438cd
Mark _Py_char2wchar() input argument as constant
2010-10-15 11:15:54 +00:00
Georg Brandl
8349031934
Post-release bumps.
2010-10-12 12:38:48 +00:00
Georg Brandl
002fa2de90
Bump to 3.2a3.
2010-10-10 09:40:34 +00:00
Victor Stinner
257d38ffdd
Issue #9738 : Document PyErr_SetString() and PyErr_SetFromErrnoWithFilename()
...
encodings
2010-10-09 10:12:11 +00:00
Victor Stinner
015f4d87ab
_Py_wrealpath() requires the size of the output buffer
2010-10-07 22:29:53 +00:00
Victor Stinner
a4a759515e
_Py_stat() and _Py_fopen(): avoid PyUnicode_AsWideCharString() on Windows
...
On Windows, Py_UNICODE is wchar_t, so we can avoid the expensive Py_UNICODE*
=> wchar_t* conversion.
2010-10-07 22:23:10 +00:00
Victor Stinner
b306d7594f
Fix fileutils for Windows
...
* Don't define _Py_wstat() on Windows, Windows has its own _wstat() function
with a different API (the stat buffer has another type)
* Include windows.h
2010-10-07 22:09:40 +00:00
Victor Stinner
4e31443c4d
Create fileutils.c/.h
...
* _Py_fopen() and _Py_stat() come from Python/import.c
* (_Py)_wrealpath() comes from Python/sysmodule.c
* _Py_char2wchar(), _Py_wchar2char() and _Py_wfopen() come from Modules/main.c
* (_Py)_wstat(), (_Py)_wgetcwd(), _Py_wreadlink() come from Modules/getpath.c
2010-10-07 21:45:39 +00:00
Victor Stinner
beb4135b8c
PyUnicode_AsWideCharString() takes a PyObject*, not a PyUnicodeObject*
...
All unicode functions uses PyObject* except PyUnicode_AsWideChar(). Fix the
prototype for the new function PyUnicode_AsWideCharString().
2010-10-07 01:02:42 +00:00
Georg Brandl
c7b6908bb1
Merged revisions 82262,82269,82434,82480-82481,82484-82485,82487-82488,82594,82599,82615 via svnmerge from
...
svn+ssh://svn.python.org/python/branches/py3k
................
r82262 | georg.brandl | 2010-06-27 12:17:12 +0200 (So, 27 Jun 2010) | 1 line
#9078 : fix some Unicode C API descriptions, in comments and docs.
................
r82269 | georg.brandl | 2010-06-27 12:59:19 +0200 (So, 27 Jun 2010) | 1 line
Wording fix.
................
r82434 | georg.brandl | 2010-07-02 09:41:51 +0200 (Fr, 02 Jul 2010) | 9 lines
Merged revisions 82433 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r82433 | georg.brandl | 2010-07-02 09:33:50 +0200 (Fr, 02 Jul 2010) | 1 line
Grammar and markup fixes.
........
................
r82480 | georg.brandl | 2010-07-03 12:21:50 +0200 (Sa, 03 Jul 2010) | 1 line
Wrap and use the correct directive.
................
r82481 | georg.brandl | 2010-07-03 12:22:10 +0200 (Sa, 03 Jul 2010) | 1 line
Use the right role.
................
r82484 | georg.brandl | 2010-07-03 12:26:17 +0200 (Sa, 03 Jul 2010) | 9 lines
Recorded merge of revisions 82474 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r82474 | georg.brandl | 2010-07-03 10:40:13 +0200 (Sa, 03 Jul 2010) | 1 line
Fix role name.
........
................
r82485 | georg.brandl | 2010-07-03 12:26:54 +0200 (Sa, 03 Jul 2010) | 9 lines
Merged revisions 82483 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r82483 | georg.brandl | 2010-07-03 12:25:54 +0200 (Sa, 03 Jul 2010) | 1 line
Add link to bytecode docs.
........
................
r82487 | georg.brandl | 2010-07-03 12:33:26 +0200 (Sa, 03 Jul 2010) | 1 line
Fix markup.
................
r82488 | georg.brandl | 2010-07-03 12:41:33 +0200 (Sa, 03 Jul 2010) | 1 line
Remove the need for a "()" empty argument list after opcodes.
................
r82594 | georg.brandl | 2010-07-05 22:13:41 +0200 (Mo, 05 Jul 2010) | 1 line
Update Vec class constructor, remove indirection via function, use operator module.
................
r82599 | alexander.belopolsky | 2010-07-05 23:44:05 +0200 (Mo, 05 Jul 2010) | 1 line
"Modernized" the demo a little.
................
r82615 | georg.brandl | 2010-07-07 00:58:50 +0200 (Mi, 07 Jul 2010) | 1 line
Fix typo.
................
2010-10-06 08:08:40 +00:00
Victor Stinner
c39211f51e
Issue #9630 : Redecode filenames when setting the filesystem encoding
...
Redecode the filenames of:
- all modules: __file__ and __path__ attributes
- all code objects: co_filename attribute
- sys.path
- sys.meta_path
- sys.executable
- sys.path_importer_cache (keys)
Keep weak references to all code objects until initfsencoding() is called, to
be able to redecode co_filename attribute of all code objects.
2010-09-29 16:35:47 +00:00
Victor Stinner
137c34c027
Issue #9979 : Create function PyUnicode_AsWideCharString().
2010-09-29 10:25:54 +00:00
Antoine Pitrou
3e1fd27b74
Issue #9090 : When a socket with a timeout fails with EWOULDBLOCK or EAGAIN,
...
retry the select() loop instead of bailing out. This is because select()
can incorrectly report a socket as ready for reading (for example, if it
received some data with an invalid checksum).
2010-09-28 21:23:11 +00:00
Kristján Valur Jónsson
3b69db27d7
issue 9910
...
Add a Py_SetPath api to override magic path computations when starting up python.
2010-09-27 05:32:54 +00:00
Benjamin Peterson
d4efd9eb15
add column offset to all syntax errors
2010-09-20 23:02:10 +00:00
Benjamin Peterson
2c53971b37
add PyErr_SyntaxLocationEx, to support adding a column offset
2010-09-20 22:42:10 +00:00
Daniel Stutzbach
bd63a9976d
Merged revisions 84810 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r84810 | daniel.stutzbach | 2010-09-14 11:02:01 -0500 (Tue, 14 Sep 2010) | 1 line
Remove pointers to a FAQ entry that no longer exists. Incorporate some text from the old FAQ into the docs
........
2010-09-14 16:07:54 +00:00
Daniel Stutzbach
38615993b0
Remove pointers to a FAQ entry that no longer exists. Incorporate some text from the old FAQ into the docs
2010-09-14 16:02:01 +00:00
Antoine Pitrou
1df1536fb9
Issue #9828 : Destroy the GIL in Py_Finalize(), so that it gets properly
...
re-created on a subsequent call to Py_Initialize(). The problem (a crash)
wouldn't appear in 3.1 or 2.7 where the GIL's structure is more trivial.
2010-09-13 14:16:46 +00:00