Benjamin Peterson
1cc9520327
s/stringobject/bytesobject/ ( closes #22036 )
...
Patch by Martin Matusiak.
2014-07-23 21:39:37 -07:00
Antoine Pitrou
667f545e03
Issue #21938 : simplify gen_iternext()
2014-07-08 18:43:23 -04:00
Antoine Pitrou
1eee8e5207
Issue #21803 : remove macro indirections in complexobject.h
2014-07-07 18:49:30 -04:00
Benjamin Peterson
3032ed7cb1
upgrade to unicode 7.0.0
2014-07-06 13:04:20 -07:00
Antoine Pitrou
a93342b8b2
Issue #21897 : Fix a crash with the f_locals attribute with closure variables when frame.clear() has been called.
2014-07-04 20:26:22 -04:00
Antoine Pitrou
acc8cf2cfa
Issue #21897 : Fix a crash with the f_locals attribute with closure variables when frame.clear() has been called.
2014-07-04 20:24:13 -04:00
Victor Stinner
c68b7fba86
(Merge 3.4) Issue #21892 , #21893 : Partial revert of changeset 4f55e802baf0,
...
PyErr_Format() uses "%zd" for Py_ssize_t, not PY_FORMAT_SIZE_T
2014-07-04 22:50:13 +02:00
Victor Stinner
a33bce0945
Issue #21892 , #21893 : Partial revert of changeset 4f55e802baf0, PyErr_Format()
...
uses "%zd" for Py_ssize_t, not PY_FORMAT_SIZE_T
2014-07-04 22:47:46 +02:00
Victor Stinner
9f43505f3d
(Merge 3.4) Closes #21892 , #21893 : Use PY_FORMAT_SIZE_T instead of %zi or %zu
...
to format C size_t, because %zi/%u is not supported on all platforms.
2014-07-01 08:57:54 +02:00
Victor Stinner
293f3f526d
Closes #21892 , #21893 : Use PY_FORMAT_SIZE_T instead of %zi or %zu to format C
...
size_t, because %zi/%u is not supported on all platforms.
2014-07-01 08:57:10 +02:00
Benjamin Peterson
3cbae68de6
merge 3.4
2014-06-26 23:29:19 -07:00
Benjamin Peterson
1791c224dd
use NULL not 0
2014-06-26 23:29:13 -07:00
Victor Stinner
40ee30181f
Issue #21205 : Add a new ``__qualname__`` attribute to generator, the qualified
...
name, and use it in the representation of a generator (``repr(gen)``). The
default name of the generator (``__name__`` attribute) is now get from the
function instead of the code. Use ``gen.gi_code.co_name`` to get the name of
the code.
2014-06-16 15:59:28 +02:00
Nick Coghlan
26171993fe
Merge issue #21669 from 3.4
2014-06-16 19:49:12 +10:00
Nick Coghlan
5b1fdc1e37
Issue #21669 : Special case print & exec syntax errors
2014-06-16 19:48:02 +10:00
Victor Stinner
2bc4d95bb6
Issue #21233 : Revert bytearray(int) optimization using calloc()
2014-06-02 22:22:42 +02:00
Victor Stinner
d8f0d922d5
Issue #21233 : Rename the C structure "PyMemAllocator" to "PyMemAllocatorEx" to
...
make sure that the code using it will be adapted for the new "calloc" field
(instead of crashing).
2014-06-02 21:57:10 +02:00
Victor Stinner
5a1bb4e080
Initialize base types before child types
...
object (PyBaseObject_Type) is the base type of type (PyType_Type), int
(PyLong_Type) is the base type of bool (PyBool_Type).
2014-06-02 14:10:59 +02:00
Raymond Hettinger
426d9958a2
Add development comments to setobject.c
2014-05-18 21:40:20 +01:00
Stefan Krah
bcaf5999e6
Issue #20186 : memoryobject.c: add function signatures.
2014-05-18 00:35:09 +02:00
Victor Stinner
45e8e2f218
Issue #21490 : Add new C macros: Py_ABS() and Py_STRINGIFY()
...
Keep _Py_STRINGIZE() in PC/pyconfig.h to not introduce a dependency between
pyconfig.h and pymacros.h.
2014-05-14 17:24:35 +02:00
Victor Stinner
470cf8dfbe
(Merge 3.4) Issue #21418 : Fix a crash in the builtin function super() when
...
called without argument and without current frame (ex: embedded Python).
2014-05-13 01:32:54 +02:00
Victor Stinner
1c6970fac9
Issue #21418 : Fix a crash in the builtin function super() when called without
...
argument and without current frame (ex: embedded Python).
2014-05-13 01:32:36 +02:00
Zachary Ware
bca9694ac1
Issue #21442 : Fix MSVC compiler warning introduced by issue21377.
2014-05-06 11:42:37 -05:00
Victor Stinner
3080d926af
Issue #21233 : Fix _PyObject_Alloc() when compiled with WITH_VALGRIND defined
2014-05-06 11:32:29 +02:00
Raymond Hettinger
4b74fba62f
Issue 21101: Internal API for dict getitem and setitem where the hash value is known.
2014-05-03 16:32:11 -07:00
Victor Stinner
af8fc645af
Issue #21233 : Oops, Fix _PyObject_Alloc(): initialize nbytes before going to
...
redirect.
2014-05-02 23:26:03 +02:00
Victor Stinner
db067af12a
Issue #21233 : Add new C functions: PyMem_RawCalloc(), PyMem_Calloc(),
...
PyObject_Calloc(), _PyObject_GC_Calloc(). bytes(int) and bytearray(int) are now
using ``calloc()`` instead of ``malloc()`` for large objects which is faster
and use less memory (until the bytearray buffer is filled with data).
2014-05-02 22:31:14 +02:00
Antoine Pitrou
161d695fb0
Issue #21377 : PyBytes_Concat() now tries to concatenate in-place when the first argument has a reference count of 1.
...
Patch by Nikolaus Rath.
2014-05-01 14:36:20 +02:00
Benjamin Peterson
027ce16691
sprinkle some _PyId goodness around moduleobject.c
2014-04-24 19:39:18 -04:00
Benjamin Peterson
1184e266b9
do not override errors from descriptors on modules
2014-04-24 19:29:23 -04:00
Ethan Furman
7b9ff0e6da
Issue8297: module attribute lookup failures now include module name in error message.
2014-04-24 14:47:47 -07:00
Zachary Ware
715ef02ddc
Fix a typo in the docstring of nb_index.
2014-04-18 09:23:14 -05:00
Zachary Ware
ea42b4cc80
Fix a typo in the signature for object.__ge__
2014-04-18 09:14:31 -05:00
Zachary Ware
9996a7d21b
Merge typo fix from 3.4
2014-04-18 09:23:35 -05:00
Zachary Ware
07b4c5e1f6
Merge typo fix from 3.4
2014-04-18 09:17:04 -05:00
Mark Dickinson
0c346d827d
Issue #21193 : Make (e.g.,) pow(2, -3, 5) raise ValueError rather than TypeError. Patch by Josh Rosenberg.
2014-04-11 14:34:40 -04:00
Benjamin Peterson
d51374ed78
PEP 465: a dedicated infix operator for matrix multiplication ( closes #21176 )
2014-04-09 23:55:56 -04:00
Victor Stinner
4dd25256e2
Issue #21118 : PyLong_AS_LONG() result type is long
...
Even if PyLong_AS_LONG() cannot fail, I prefer to use the right type.
2014-04-08 09:14:21 +02:00
Benjamin Peterson
1365de764e
fix reference leaks in the translate fast path ( closes #21175 )
...
Patch by Josh Rosenberg.
2014-04-07 20:15:41 -04:00
Victor Stinner
872b291b96
Issue #21118 : Optimize also str.translate() for ASCII => ASCII deletion
2014-04-05 14:27:07 +02:00
Victor Stinner
4ff33af257
Issue #21118 : Add unit test for invalid character replacement (code point higher than U+10ffff)
2014-04-05 11:56:37 +02:00
Victor Stinner
89a76abf20
Issue #21118 : Optimize str.translate() for ASCII => ASCII translation
2014-04-05 11:44:04 +02:00
Victor Stinner
8a4422e78d
Issue #21118 : Remove unused variable
2014-04-05 00:15:52 +02:00
Victor Stinner
69598d4ccf
Issue #21118 : Fix _PyUnicodeTranslateError_Create(), add missing format
...
character for the "end" parameter
2014-04-04 20:59:44 +02:00
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
Serhiy Storchaka
b992a0e102
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 line to use python3 executable in the unittestgui script.
2014-01-16 17:15:49 +02:00
Meador Inge
e02de8c2ad
Fix minor bug in dict.__contains__ docstring.
...
When dict got clinicized in 8fde1a2c94dc for Issue #16612 an erroneous
trailing quote was left in the clinic docstring summary line.
2014-01-14 16:48:31 -06:00
Eric V. Smith
6ba5665fc7
Fix typo in comment.
2014-01-14 08:15:03 -05:00
Ethan Furman
a70805e1fa
Issue19995: fixed typo; switched from test.support.check_warnings to assertWarns
2014-01-12 08:42:35 -08:00
Ethan Furman
f9bba9c67f
Issue19995: issue deprecation warning for non-integer values to %c, %o, %x, %X
2014-01-11 23:20:58 -08:00