Commit Graph

268 Commits

Author SHA1 Message Date
Victor Stinner d6debb24e0 bpo-29919: Remove unused imports found by pyflakes (#137)
Make also minor PEP8 coding style fixes on modified imports.
2017-03-27 16:05:26 +02:00
Serhiy Storchaka aefa7ebf0f bpo-6532: Make the thread id an unsigned integer. (#781)
* bpo-6532: Make the thread id an unsigned integer.

From C API side the type of results of PyThread_start_new_thread() and
PyThread_get_thread_ident(), the id parameter of
PyThreadState_SetAsyncExc(), and the thread_id field of PyThreadState
changed from "long" to "unsigned long".

* Restore a check in thread_get_ident().
2017-03-23 14:48:39 +01:00
Serhiy Storchaka 5bb8b9134b Issue #18896: Python function can now have more than 255 parameters.
collections.namedtuple() now supports tuples with more than 255 elements.
2016-12-16 19:19:02 +02:00
Victor Stinner d6958ac6c0 Add sys.getandroidapilevel()
Issue #28740: Add sys.getandroidapilevel(): return the build time
API version of Android as an integer.

Function only available on Android.
2016-12-02 01:13:46 +01:00
Victor Stinner a1fd0789ed Try to fix sizeof unit tests on dict
Issue #28056 and issue #26058.
2016-09-09 21:51:19 -07:00
Yury Selivanov eb6364557f Issue #28003: Implement PEP 525 -- Asynchronous Generators. 2016-09-08 22:01:51 -07:00
Eric Snow 4f29e75289 Issue #24254: Drop cls.__definition_order__. 2016-09-08 15:11:11 -07:00
Victor Stinner 3b6a6b4215 Add a new private version to the builtin dict type
Issue #26058: Add a new private version to the builtin dict type, incremented
at each dictionary creation and at each dictionary change.

Implementation of the PEP 509.
2016-09-08 12:51:24 -07:00
Steve Dower e58571b7ea Fixes tests broken by issue #27781. 2016-09-08 11:11:13 -07:00
Victor Stinner 742da040db Implement compact dict
Issue #27350: `dict` implementation is changed like PyPy. It is more compact
and preserves insertion order.

_PyDict_Dummy() function has been removed.

Disable test_gdb: python-gdb.py is not updated yet to the new structure of
compact dictionaries (issue #28023).

Patch written by INADA Naoki.
2016-09-07 17:40:12 -07:00
Benjamin Peterson 46d3a595fd fix expected layout of code objects 2016-09-07 14:56:15 -07:00
Eric Snow 92a6c170e6 Issue #24254: Preserve class attribute definition order. 2016-09-05 14:50:11 -07:00
Serhiy Storchaka a793037d80 Issue #19527: Fixed tests with defined COUNT_ALLOCS. 2016-07-03 22:27:26 +03:00
Serhiy Storchaka 6a7b3a77b4 Issue #26778: Fixed "a/an/and" typos in code comment and documentation. 2016-04-17 08:32:47 +03:00
Serhiy Storchaka fc43511867 Issue #25339: PYTHONIOENCODING now has priority over locale in setting the
error handler for stdin and stdout.
2016-04-10 14:34:13 +03:00
Serhiy Storchaka 5185597a69 Fixed sizeof tests for dict and type (they were passed by accident).
Added tests for dict views iterators.
2015-12-20 11:39:14 +02:00
Serhiy Storchaka aaf69aca45 Don't create non-needed file. 2015-12-20 09:37:52 +02:00
Serhiy Storchaka 9c297e43bf Use correct PyGC_Head size in tests for issue #25421. 2015-12-19 22:49:29 +02:00
Serhiy Storchaka 5c4064e8bd Issue #25421: __sizeof__ methods of builtin types now use dynamic basic size.
This allows sys.getsize() to work correctly with their subclasses with
__slots__ defined.
2015-12-19 20:05:25 +02:00
Victor Stinner 50856d5ae7 sys.setrecursionlimit() now raises RecursionError
Issue #25274: sys.setrecursionlimit() now raises a RecursionError if the new
recursion limit is too low depending at the current recursion depth. Modify
also the "lower-water mark" formula to make it monotonic. This mark is used to
decide when the overflowed flag of the thread state is reset.
2015-10-13 00:11:21 +02:00
Victor Stinner 87bddbac9d (Merge 3.4) Issue #25274: test_recursionlimit_recovery() of test_sys now checks
sys.gettrace() when the test is executed, not when the module is loaded.

sys.settrace() may be after after the test is loaded.
2015-10-01 08:56:27 +02:00
Victor Stinner 3f18f10f39 Issue #25274: test_recursionlimit_recovery() of test_sys now checks
sys.gettrace() when the test is executed, not when the module is loaded.

sys.settrace() may be after after the test is loaded.
2015-10-01 08:55:33 +02:00
Yury Selivanov f488fb422a Issue #19235: Add new RecursionError exception. Patch by Georg Brandl. 2015-07-03 01:04:23 -04:00
Yury Selivanov 7544508f02 PEP 0492 -- Coroutines with async and await syntax. Issue #24017. 2015-05-11 22:57:16 -04:00
Berker Peksag ce643913a9 Issue #9517: Move script_helper to the support package.
Patch by Christie Wilson.
2015-05-06 06:33:17 +03:00
Antoine Pitrou 63afdaa110 Issue #23629: Fix the default __sizeof__ implementation for variable-sized objects. 2015-03-10 22:35:24 +01:00
Antoine Pitrou a654510150 Issue #23629: Fix the default __sizeof__ implementation for variable-sized objects. 2015-03-10 22:32:00 +01:00
Benjamin Peterson bcf527e0d6 merge 3.4 2015-02-02 14:22:19 -05:00
Benjamin Peterson f5f9c13551 adjust for py3k module renaming 2015-02-02 14:22:13 -05:00
Benjamin Peterson 5e69419ee4 merge 3.4 2015-02-02 14:06:29 -05:00
Benjamin Peterson 3356a2e2f0 _clear_type_cache is cpython-only 2015-02-02 14:06:11 -05:00
Stefan Krah f5324d7074 Closes #22668: Merge from 3.4. 2015-01-29 14:29:51 +01:00
Raymond Hettinger 93035c44fd Issue #23119: Simplify setobject by inlining the special case for unicode equality testing. 2015-01-25 16:12:49 -08:00
Raymond Hettinger 1202a4733e Issue 23261: Clean-up the hack to store the set.pop() search finger in a hash field instead of the setobject. 2015-01-18 13:12:42 -08:00
Antoine Pitrou 5db1bb81ff Issue #22696: Add function :func:`sys.is_finalizing` to know about interpreter shutdown. 2014-12-07 01:28:27 +01:00
Serhiy Storchaka 42826566f5 Issue #22193: Fixed integer overflow error in sys.getsizeof().
Fixed an error in _PySys_GetSizeOf declaration.
2014-11-15 13:22:27 +02:00
Serhiy Storchaka 030e92d1a5 Issue #22193: Fixed integer overflow error in sys.getsizeof().
Fixed an error in _PySys_GetSizeOf declaration.
2014-11-15 13:21:37 +02:00
Victor Stinner cddaa1bd62 (Merge 3.4) Closes #22205: sys._debugmallocstats is a cpython specific feature,
so test_debugmallocstats should be marked as such. Patch written by Martin
Matusiak.
2014-08-16 14:11:14 +02:00
Victor Stinner 8e7966b00e Closes #22205: sys._debugmallocstats is a cpython specific feature, so
test_debugmallocstats should be marked as such. Patch written by Martin
Matusiak.
2014-08-16 14:11:01 +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
Victor Stinner 7db27c8ed6 Issue #21205: Fix unit tests 2014-06-16 16:21:57 +02:00
Antoine Pitrou 3a74ce2088 Issue #13204: Calling sys.flags.__new__ would crash the interpreter, now it raises a TypeError. 2014-04-28 13:08:28 +02:00
Antoine Pitrou 871dfc41d3 Issue #13204: Calling sys.flags.__new__ would crash the interpreter, now it raises a TypeError. 2014-04-28 13:07:06 +02: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 97f17a784a Issue #19977: Enable test_c_locale_surrogateescape() on Windows
Only test the error handler. The encoding is not ASCII on Windows: it may the
OEM or ANSI code page.
2014-03-18 02:28:10 +01:00
Victor Stinner 7143029d43 Issue #19977: When the ``LC_TYPE`` locale is the POSIX locale (``C`` locale),
:py:data:`sys.stdin` and :py:data:`sys.stdout` are now using the
``surrogateescape`` error handler, instead of the ``strict`` error handler.
2014-03-18 01:18:21 +01:00
Zachary Ware 1d7ba5cd7b Issue #20510: Merge with 3.3 2014-02-19 10:46:05 -06:00
Zachary Ware 1f9e601765 Issue #20510: Confirm that the code attribute of the SystemExit
exception raised by sys.exit is None when no code is given.

As suggested by Serhiy Storchaka.
2014-02-19 10:44:47 -06:00
Zachary Ware c36e504c53 Issue #20510: Merge with 3.3. 2014-02-18 08:41:21 -06:00
Zachary Ware cefe6b34de Issue #20510: Rewrote test_exit in test_sys to match existing comments
and to modernize.  Patch by Gareth Rees.
2014-02-18 08:39:04 -06:00