Commit Graph

4907 Commits

Author SHA1 Message Date
Victor Stinner 1194ea020c Issue #21118: Use _PyUnicodeWriter API in str.translate() to simplify and
factorize the code
2014-04-04 19:37:40 +02:00
Victor Stinner d129eeb303 Issue #21118: Fix _PyUnicodeTranslateError_Create(), add missing format
character for the "end" parameter
2014-04-04 20:59:44 +02:00
Benjamin Peterson d818fc9205 merge 3.4 (#21134) 2014-04-02 12:16:55 -04:00
Benjamin Peterson 9b09ba1234 bail in unicode error's __str__ methods if the objects are not properly initialized (closes #21134) 2014-04-02 12:15:06 -04:00
Antoine Pitrou 3fec24ef13 Issue #21073: explain why Py_ReprEnter() allows for a missing thread state. 2014-03-31 22:05:02 +02:00
Antoine Pitrou 04d17d30b4 Issue #21073: explain why Py_ReprEnter() allows for a missing thread state. 2014-03-31 22:04:38 +02:00
Benjamin Peterson 00ced0f4c7 merge 3.4 2014-03-30 19:52:50 -04:00
Benjamin Peterson d455ce4fd4 merge 3.3 2014-03-30 19:52:39 -04:00
Benjamin Peterson 0ad6098b67 merge 3.2 2014-03-30 19:52:22 -04:00
Benjamin Peterson 23cf403ca1 fix expandtabs overflow detection to be consistent and not rely on signed overflow 2014-03-30 19:47:57 -04:00
Ethan Furman 9ab748013b Issue19995: more informative error message; spelling corrections; use operator.mod instead of __mod__ 2014-03-21 06:38:46 -07:00
Ethan Furman 38d872ee5d Issue19995: passing a non-int to %o, %c, %x, or %X now raises an exception 2014-03-19 08:38:52 -07:00
Victor Stinner 7d00cc1a64 Issue #20574: Implement incremental decoder for cp65001 code
(Windows code page 65001, Microsoft UTF-8).
2014-03-17 23:08:06 +01:00
Benjamin Peterson df813791db correct the fix for #20637; allow slot descriptor inheritance to take place before creating cached keys 2014-03-17 15:57:17 -05:00
Benjamin Peterson af9049ebbc merge 3.3 2014-03-15 12:21:47 -05:00
Benjamin Peterson 4a42cd48d5 avoid referencing past the bounds of an array 2014-03-15 12:21:28 -05:00
Benjamin Peterson 1aca78da62 merge 3.3 2014-03-14 21:54:41 -05:00
Benjamin Peterson ef87f8cb57 avoid referencing out-of-bounds memory 2014-03-14 21:54:31 -05:00
Benjamin Peterson 45c9dceb56 fix c89 declaration order 2014-03-14 21:53:51 -05:00
Benjamin Peterson dfa822811a merge 3.3 2014-03-14 21:47:36 -05:00
Benjamin Peterson 041c38a790 don't do pointer arithmetic with signed numbers 2014-03-14 21:47:23 -05:00
Kristján Valur Jónsson 25dded041f Make the various iterators' "setstate" sliently and consistently clip the
index.  This avoids the possibility of setting an iterator to an invalid
state.
2014-03-05 13:47:57 +00:00
Kristján Valur Jónsson 4ca688edeb Fix pickling of rangeiter. rangeiter_setstate would not allow setting it
to the exhausted state.
2014-03-04 23:19:24 +00:00
Kristján Valur Jónsson c5cc5011ac Make the various iterators' "setstate" sliently and consistently clip the
index.  This avoids the possibility of setting an iterator to an invalid
state.
2014-03-05 15:23:07 +00:00
Kristján Valur Jónsson 25ea45db81 Merge with 3.3 2014-03-04 23:22:15 +00:00
Yury Selivanov 056e265491 Issue #20786: Fix signatures for dict.__delitem__ and property.__delete__ 2014-03-02 12:25:27 -05:00
Serhiy Storchaka 94ee389308 Issue #19619: Blacklist non-text codecs in method API
str.encode, bytes.decode and bytearray.decode now use an
internal API to throw LookupError for known non-text encodings,
rather than attempting the encoding or decoding operation and
then throwing a TypeError for an unexpected output type.

The latter mechanism remains in place for third party non-text
encodings.

Backported changeset d68df99d7a57.
2014-02-24 14:43:03 +02:00
Antoine Pitrou f0b5a7c0f6 Issue #20637: Key-sharing now also works for instance dictionaries of subclasses. Patch by Peter Ingebretson. 2014-02-23 16:50:07 +01:00
Benjamin Peterson e686c5c3e8 look up __getnewargs__ and __getnewargs_ex__ on the object type (#16251) 2014-02-16 13:49:16 -05:00
Benjamin Peterson 4267869ad8 merge 3.3 (#20507) 2014-02-15 13:03:20 -05:00
Benjamin Peterson 9743b2c2b5 give non-iterable TypeError a message (closes #20507) 2014-02-15 13:02:52 -05:00
Serhiy Storchaka 226c57100c Issue #19255: Clear error after failed PyDict_SetItem() on shutdown.
This silences a Coverity complain.
2014-02-12 09:55:45 +02:00
Serhiy Storchaka 1f9d11b986 Issue #19255: Clear error after failed PyDict_SetItem() on shutdown.
This silences a Coverity complain.
2014-02-12 09:55:01 +02:00
Serhiy Storchaka 87a5c515d0 Issue #19255: The builtins module is restored to initial value before
cleaning other modules.  The sys and builtins modules are cleaned last.
2014-02-10 18:21:34 +02:00
Larry Hastings 8f9f0f12e8 Issue #20517: Removed unnecessary new (short-lived) functions from PyErr. 2014-02-10 03:43:57 -08:00
Larry Hastings 69a2547cd5 Issue #20530: The signatures for slot builtins have been updated
to reflect the fact that they only accept positional-only arguments.
2014-02-09 22:22:38 -08:00
Larry Hastings b082731fbb Issue #20517: Functions in the os module that accept two filenames
now register both filenames in the exception on failure.
This required adding new C API functions allowing OSError exceptions
to reference two filenames instead of one.
2014-02-09 22:05:19 -08:00
Serhiy Storchaka dfe98a102e Issue #20437: Fixed 22 potential bugs when deleting objects references. 2014-02-09 13:46:20 +02:00
Serhiy Storchaka 505ff755d7 Issue #20437: Fixed 21 potential bugs when deleting objects references. 2014-02-09 13:33:53 +02:00
Larry Hastings 2623c8c23c Issue #20530: Argument Clinic's signature format has been revised again.
The new syntax is highly human readable while still preventing false
positives.  The syntax also extends Python syntax to denote "self" and
positional-only parameters, allowing inspect.Signature objects to be
totally accurate for all supported builtins in Python 3.4.
2014-02-08 22:15:29 -08:00
Nick Coghlan d979e4335d Close #20500: Don't trigger PyObject_Str assertion at shutdown 2014-02-09 10:43:21 +10:00
Serhiy Storchaka 6cbf151032 Issue #20538: UTF-7 incremental decoder produced inconsistant string when
input was truncated in BASE64 section.
2014-02-08 14:06:33 +02:00
Serhiy Storchaka 016a3f33a5 Issue #20538: UTF-7 incremental decoder produced inconsistant string when
input was truncated in BASE64 section.
2014-02-08 14:01:29 +02:00
Victor Stinner 1ea4e4174b Issue #17162: Fix compilation, replace non-breaking space with an ASCII space 2014-02-04 09:49:14 +01:00
Martin v. Löwis ca7b04644c Issue #17162: Add PyType_GetSlot. 2014-02-04 09:33:05 +01:00
Larry Hastings 581ee3618c Issue #20326: Argument Clinic now uses a simple, unique signature to
annotate text signatures in docstrings, resulting in fewer false
positives.  "self" parameters are also explicitly marked, allowing
inspect.Signature() to authoritatively detect (and skip) said parameters.

Issue #20326: Argument Clinic now generates separate checksums for the
input and output sections of the block, allowing external tools to verify
that the input has not changed (and thus the output is not out-of-date).
2014-01-28 05:00:08 -08:00
Nick Coghlan 77b286b2cc Close #20105: set __traceback__ when chaining exceptions in C 2014-01-27 00:53:38 +10:00
Larry Hastings c20472640c Issue #20390: Small fixes and improvements for Argument Clinic. 2014-01-25 20:43:29 -08:00
Larry Hastings 5c66189e88 Issue #20189: Four additional builtin types (PyTypeObject,
PyMethodDescr_Type, _PyMethodWrapper_Type, and PyWrapperDescr_Type)
have been modified to provide introspection information for builtins.
Also: many additional Lib, test suite, and Argument Clinic fixes.
2014-01-24 06:17:25 -08:00
Serhiy Storchaka 8f8ec92de8 Issue #19936: Added executable bits or shebang lines to Python scripts which
requires them.  Disable executable bits and shebang lines in test and
benchmark files in order to prevent using a random system python, and in
source files of modules which don't provide command line interface.  Fixed
shebang lines in the unittestgui and checkpip scripts.
2014-01-16 17:33:23 +02:00