Serhiy Storchaka
83cf99d733
Issue #20335 : bytes constructor now raises TypeError when encoding or errors
...
is specified with non-string argument. Based on patch by Renaud Blanch.
2014-12-02 09:24:06 +02:00
Serhiy Storchaka
133b11b566
Issue #22975 : Close block at right place.
2014-12-01 18:56:28 +02:00
Benjamin Peterson
e823933f9f
remove tautological condition ( closes #22954 )
2014-11-26 23:03:11 -06:00
Serhiy Storchaka
92bf919ed0
Issue #22581 : Use more "bytes-like object" throughout the docs and comments.
2014-12-05 22:26:10 +02:00
Serhiy Storchaka
0b2cacb42a
Issue #20335 : bytes constructor now raises TypeError when encoding or errors
...
is specified with non-string argument. Based on patch by Renaud Blanch.
2014-12-02 09:26:14 +02:00
Serhiy Storchaka
407249c62b
Issue #22975 : Close block at right place.
2014-12-01 18:56:54 +02:00
Benjamin Peterson
0a59d5563e
merge 3.4 ( #22954 )
2014-11-26 23:03:34 -06:00
Nick Coghlan
d600951748
Issue #22869 : Split pythonrun into two modules
...
- interpreter startup and shutdown code moved to a new
pylifecycle.c module
- Py_OptimizeFlag moved into the new module with the other
global flags
2014-11-20 21:39:37 +10:00
Victor Stinner
3aa979e0cd
Issue #20948 : Inline makefmt() in unicode_fromformat_arg()
2014-11-18 21:40:51 +01:00
Antoine Pitrou
2a40e36739
Issue #22847 : Improve method cache efficiency.
2014-11-15 00:56:27 +01:00
Antoine Pitrou
8a03896cac
Issue #22335 : Fix crash when trying to enlarge a bytearray to 0x7fffffff bytes on a 32-bit platform.
2014-11-02 18:41:56 +01:00
Antoine Pitrou
cc23154d02
Issue #22335 : Fix crash when trying to enlarge a bytearray to 0x7fffffff bytes on a 32-bit platform.
2014-11-02 18:40:09 +01:00
Georg Brandl
b8fa289152
merge with 3.4
2014-10-31 13:13:09 +01:00
Georg Brandl
e1d26f377e
Closes #22772 : fix __ifloordiv__ and __itruediv__ docstring.
2014-10-31 13:12:57 +01:00
Antoine Pitrou
bc92bbd4d2
Issue #22653 : Fix an assertion failure in debug mode when doing a reentrant dict insertion in debug mode.
2014-10-18 00:35:44 +02:00
Antoine Pitrou
d696732025
Issue #22653 : Fix an assertion failure in debug mode when doing a reentrant dict insertion in debug mode.
2014-10-18 00:35:00 +02:00
Benjamin Peterson
fa5021699a
Merge 3.3
2014-10-15 23:58:32 -04:00
Antoine Pitrou
b6dc9b7554
Fixed signed/unsigned comparison warning
2014-10-15 23:14:53 +02:00
Antoine Pitrou
4e334241b7
Fixed signed/unsigned comparison warning
2014-10-15 23:14:53 +02:00
Benjamin Peterson
736982d36d
merge 3.4 ( closes #22643 )
2014-10-15 12:17:47 -04:00
Benjamin Peterson
9c422f3c3d
merge 3.3
2014-10-15 12:17:33 -04:00
Benjamin Peterson
1e211ff10d
it suffices to check for PY_SSIZE_T_MAX overflow ( #22643 )
2014-10-15 12:17:21 -04:00
Benjamin Peterson
315aa40403
Merge 3.4
2014-10-15 11:51:17 -04:00
Benjamin Peterson
60d7a73194
Merge 3.3
2014-10-15 11:51:12 -04:00
Benjamin Peterson
c0e64f5027
make sure length is unsigned
2014-10-15 11:51:05 -04:00
Benjamin Peterson
6925264334
merge 3.4 ( #22643 )
2014-10-15 11:49:15 -04:00
Benjamin Peterson
1cbb3fe775
merge 3.3 ( #22643 )
2014-10-15 11:48:41 -04:00
Benjamin Peterson
e1bd38c03c
fix integer overflow in unicode case operations ( closes #22643 )
2014-10-15 11:47:36 -04:00
Larry Hastings
dfbeb160de
Issue #22615 : Argument Clinic now supports the "type" argument for the
...
int converter. This permits using the int converter with enums and
typedefs.
2014-10-13 10:39:41 +01:00
Antoine Pitrou
759920c5cb
Issue #22604 : Fix assertion error in debug mode when dividing a complex number by (nan+0j).
2014-10-10 23:51:04 +02:00
Antoine Pitrou
9086f9260f
Issue #22604 : Fix assertion error in debug mode when dividing a complex number by (nan+0j).
2014-10-10 23:49:32 +02:00
R David Murray
861470c836
#16518 : Bring error messages in harmony with docs ("bytes-like object")
...
Some time ago we changed the docs to consistently use the term 'bytes-like
object' in all the contexts where bytes, bytearray, memoryview, etc are used.
This patch (by Ezio Melotti) completes that work by changing the error
messages that previously reported that certain types did "not support the
buffer interface" to instead say that a bytes-like object is required. (The
glossary entry for bytes-like object references the discussion of the buffer
protocol in the docs.)
2014-10-05 11:47:01 -04:00
Georg Brandl
72b8a80e59
Closes #22540 : speed up PyObject_IsInstance and PyObject_IsSubclass in the common case that the second argument has metaclass "type".
2014-10-03 09:26:37 +02:00
Gregory P. Smith
8486f9b134
Fix "warning: comparison between signed and unsigned integer expressions"
...
-Wsign-compare warnings in unicodeobject.c. These were all a result
of sizeof() being unsigned and being compared to a Py_ssize_t.
Not actual problems.
2014-09-30 00:33:24 -07:00
Benjamin Peterson
fd97a6fb2d
merge 3.4 ( #22520 )
2014-09-29 23:02:56 -04:00
Benjamin Peterson
43030ee780
merge 3.3 ( #22520 )
2014-09-29 23:02:35 -04:00
Benjamin Peterson
736b8012b4
prevent overflow in unicode_repr ( closes #22520 )
2014-09-29 23:02:15 -04:00
Benjamin Peterson
cdfb7691dd
merge 3.4
2014-09-29 19:12:44 -04:00
Benjamin Peterson
c2cfa8ddd8
merge 3.3
2014-09-29 19:12:37 -04:00
Benjamin Peterson
d48bc9468f
these variables ought to be Py_ssize_t
2014-09-29 19:12:26 -04:00
Benjamin Peterson
36a24f3f43
merge 3.4 ( #22519 )
2014-09-29 19:11:05 -04:00
Benjamin Peterson
18f836fb65
merge 3.3 ( closes #22519 )
2014-09-29 19:09:49 -04:00
Benjamin Peterson
42ff105539
fix overflow checking in PyBytes_Repr ( closes #22519 )
2014-09-29 19:01:18 -04:00
Benjamin Peterson
10e4b2545e
merge 3.4 ( closes #22518 )
2014-09-29 18:53:58 -04:00
Benjamin Peterson
2b76ce6d27
merge 3.3 ( closes #22518 )
2014-09-29 18:50:06 -04:00
Benjamin Peterson
a1c1be4e03
cleanup overflowing handling in unicode_decode_call_errorhandler and unicode_encode_ucs1 ( closes #22518 )
2014-09-29 18:18:57 -04:00
Serhiy Storchaka
20b39b27d9
Removed redundant casts to `char *`.
...
Corresponding functions now accept `const char *` (issue #1772673 ).
2014-09-28 11:27:24 +03:00
Serhiy Storchaka
d8a1447c99
Issue #22215 : Now ValueError is raised instead of TypeError when str or bytes
...
argument contains not permitted null character or byte.
2014-09-06 20:07:17 +03:00
Victor Stinner
8f4ec8d3ef
Issue #22290 : PyObject_Call() now fails with an assertion error when called
...
with an exception set. This new assertion helps to understand if the exception
was already set before calling the function or raised by the function.
2014-09-05 01:10:29 +02:00
Benjamin Peterson
48ad7c0b01
use __qualname__ to compute bound method repr ( closes #21389 )
...
Patch from Steven Barker.
2014-08-20 18:41:57 -05:00
Victor Stinner
049e509a9f
Issue #22207 : Fix "comparison between signed and unsigned integers" warning in
...
test checking for integer overflow on Py_ssize_t type: cast explicitly to
size_t.
2014-08-17 22:20:00 +02:00
Victor Stinner
88d146b7b9
Optimize PyBytes_FromObject(): only overallocate when size=0 to not get the
...
empty string singleton
2014-08-17 21:12:18 +02:00
Victor Stinner
12174a5dca
Issue #22156 : Fix "comparison between signed and unsigned integers" compiler
...
warnings in the Objects/ subdirectory.
PyType_FromSpecWithBases() and PyType_FromSpec() now reject explicitly negative
slot identifiers.
2014-08-15 23:17:38 +02:00
Antoine Pitrou
b349e4c929
Issue #22116 : C functions and methods (of the 'builtin_function_or_method' type) can now be weakref'ed. Patch by Wei Wu.
2014-08-06 19:31:40 -04:00
Terry Jan Reedy
ffff1440d1
Issue #22077 : Improve index error messages for bytearrays, bytes, lists, and
...
tuples by adding 'or slices'. Added ', not <typename' for bytearrays.
Original patch by Claudiu Popa.
2014-08-02 01:30:37 -04:00
Victor Stinner
f6a271ae98
Issue #18395 : Rename ``_Py_char2wchar()`` to :c:func:`Py_DecodeLocale`, rename
...
``_Py_wchar2char()`` to :c:func:`Py_EncodeLocale`, and document these
functions.
2014-08-01 12:28:48 +02:00
Martin v. Löwis
0efea322a9
Rerun AC, silence pointer conversion warnings.
2014-07-27 17:29:17 +02:00
Martin v. Löwis
7252a6e81e
Issue #20179 : Apply Argument Clinic to bytes and bytearray.
...
Patch by Tal Einat.
2014-07-27 16:25:09 +02:00
Victor Stinner
331a726b38
Issue #22082 : Fix a compiler warning (function is not a prototype)
2014-07-27 16:11:30 +02:00
Martin v. Löwis
996b671446
Issue #22082 : Clear interned strings in slotdefs.
2014-07-26 16:44:07 +02:00
Martin v. Löwis
5b5615006c
slotdefs is no longer sorted.
2014-07-26 15:25:04 +02:00
Victor Stinner
e1f17c6c0b
unicodeobject.c: fix a compiler warning on Windows 64 bits
2014-07-25 14:03:03 +02:00
Nick Coghlan
973fe0ba7a
Issue #18093 : Factor out the programs that embed the runtime
2014-07-25 21:52:14 +10:00
Benjamin Peterson
a819105fdd
merge 3.4 ( #22036 )
2014-07-23 21:39:59 -07:00
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