Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | gh-126992: Change pickle code to base 10 for load_long and load_int (GH-127042) | Justin Applegate | 2024-12-11 | 1 | -0/+20 |
| | | | Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> | ||||
* | gh-126991: Add tests for unpickling bad object state (GH-127031) | Serhiy Storchaka | 2024-11-20 | 1 | -0/+35 |
| | | | This catches a memory leak in loading the BUILD opcode. | ||||
* | gh-53203: Improve tests for strptime() (GH-125090) | Serhiy Storchaka | 2024-10-08 | 1 | -2/+2 |
| | | | | | | | | | | Run them with different locales and different date and time. Add the @run_with_locales() decorator to run the test with multiple locales. Improve the run_with_locale() context manager/decorator -- it now catches only expected exceptions and reports the test as skipped if no appropriate locale is available. | ||||
* | Bump Ruff to 0.6.7 (#124384) | Alex Waygood | 2024-09-23 | 1 | -1/+3 |
| | |||||
* | gh-77894: Fix a crash when the GC breaks a loop containing a memoryview ↵ | Serhiy Storchaka | 2024-09-11 | 1 | -3/+1 |
| | | | | | | | (GH-123898) Now a memoryview object can only be cleared if there are no buffers that refer it. | ||||
* | gh-122213: Add notes for pickle serialization errors (GH-122214) | Serhiy Storchaka | 2024-09-09 | 1 | -20/+197 |
| | | | | This allows to identify the source of the error. | ||||
* | Fix typos (#123775) | algonell | 2024-09-09 | 1 | -1/+1 |
| | |||||
* | gh-122311: Improve and unify pickle errors (GH-122771) | Serhiy Storchaka | 2024-09-09 | 1 | -108/+105 |
| | | | | | | | | | | | | | * Raise PicklingError instead of UnicodeEncodeError, ValueError and AttributeError in both implementations. * Chain the original exception to the pickle-specific one as __context__. * Include the error message of ImportError and some AttributeError in the PicklingError error message. * Unify error messages between Python and C implementations. * Refer to documented __reduce__ and __newobj__ callables instead of internal methods (e.g. save_reduce()) or pickle opcodes (e.g. NEWOBJ). * Include more details in error messages (what expected, what got). * Avoid including a potentially long repr of an arbitrary object in error messages. | ||||
* | gh-123431: Harmonize extension code checks in pickle (GH-123434) | Serhiy Storchaka | 2024-08-29 | 1 | -0/+51 |
| | | | | | | | | | This checks are redundant in normal circumstances and can only work if the extension registry was intentionally broken. * The Python implementation now raises exception for the extension code with false boolean value. * Simplify the C code. RuntimeError is now raised in explicit checks. * Add many tests. | ||||
* | gh-122459: Optimize pickling by name objects without __module__ (GH-122460) | Serhiy Storchaka | 2024-08-05 | 1 | -1/+1 |
| | |||||
* | gh-122311: Add more tests for error messages in pickle (GH-122373) | Serhiy Storchaka | 2024-07-29 | 1 | -50/+185 |
| | |||||
* | gh-122311: Fix some error messages in pickle (GH-122386) | Serhiy Storchaka | 2024-07-29 | 1 | -1/+3 |
| | |||||
* | gh-122311: Add more tests for pickle (GH-122376) | Serhiy Storchaka | 2024-07-28 | 1 | -128/+642 |
| | |||||
* | gh-82951: Fix serializing by name in pickle protocols < 4 (GH-122149) | Serhiy Storchaka | 2024-07-25 | 1 | -0/+12 |
| | | | | | | Serializing objects with complex __qualname__ (such as unbound methods and nested classes) by name no longer involves serializing parent objects by value in pickle protocols < 4. | ||||
* | gh-120380: fix Python implementation of `pickle.Pickler` for `bytes` and ↵ | Bénédikt Tran | 2024-06-21 | 1 | -6/+43 |
| | | | | `bytearray` objects in protocol version 5. (GH-120422) | ||||
* | GH-111802: set a low recursion limit for `test_bad_getattr()` in ↵ | Brett Cannon | 2024-01-12 | 1 | -1/+1 |
| | | | | `test.pickletester` (GH-113996) | ||||
* | gh-113028: Correctly memoize str in pickle when escapes added (GH-113436) | Jeff Allen | 2023-12-24 | 1 | -0/+8 |
| | | | | | | This fixes a divergence between the Python and C implementations of pickle for protocol 0, such that it pickle.py fails to re-use the first pickled representation of strings involving characters that have to be escaped. | ||||
* | gh-82565: Add tests for pickle and unpickle with bad files (GH-16606) | Zackery Spytz | 2023-12-01 | 1 | -0/+78 |
| | |||||
* | gh-93627: Align Python implementation of pickle with C implementation of ↵ | Pieter Eendebak | 2023-09-10 | 1 | -0/+59 |
| | | | | | pickle (GH-103035) If a method like __reduce_ex_ or __reduce__ is set to None, a TypeError is raised. | ||||
* | gh-108416: Mark slow test methods with @requires_resource('cpu') (GH-108421) | Serhiy Storchaka | 2023-09-02 | 1 | -0/+1 |
| | | | | Only mark tests which spend significant system or user time, by itself or in subprocesses. | ||||
* | gh-100129: Add tests for pickling all builtin types and functions (GH-100142) | Serhiy Storchaka | 2022-12-21 | 1 | -0/+29 |
| | |||||
* | gh-95196: Disable incorrect pickling of the C implemented classmethod ↵ | Serhiy Storchaka | 2022-10-05 | 1 | -0/+18 |
| | | | | descriptors (GH-96383) | ||||
* | gh-92930: _pickle.c: Acquire strong references before calling save() (GH-92931) | Dennis Sweeney | 2022-06-11 | 1 | -0/+61 |
| | |||||
* | bpo-40280: Detect missing threading on WASM platforms (GH-32352) | Christian Heimes | 2022-04-07 | 1 | -0/+1 |
| | | | Co-authored-by: Brett Cannon <brett@python.org> | ||||
* | bpo-26579: Add object.__getstate__(). (GH-2821) | Serhiy Storchaka | 2022-04-06 | 1 | -1/+3 |
| | | | | | | | Copying and pickling instances of subclasses of builtin types bytearray, set, frozenset, collections.OrderedDict, collections.deque, weakref.WeakSet, and datetime.tzinfo now copies and pickles instance attributes implemented as slots. | ||||
* | bpo-30570: Fix segfault on buildbots caused by stack overflow from recursion ↵ | Dennis Sweeney | 2021-10-28 | 1 | -1/+2 |
| | | | | | | | in tests (GH-29258) * Don't stackoveflow on debug builds * Also catch the pickletester case | ||||
* | Fix typos in the Lib directory (GH-28775) | Christian Clauss | 2021-10-06 | 1 | -2/+2 |
| | | | | | Fix typos in the Lib directory as identified by codespell. Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu> | ||||
* | bpo-45229: Make pickle tests discoverable (GH-28467) | Serhiy Storchaka | 2021-09-20 | 1 | -9/+9 |
| | |||||
* | bpo-43907: add missing memoize call in pure python pickling of bytearray ↵ | Carl Friedrich Bolz-Tereick | 2021-04-23 | 1 | -0/+8 |
| | | | | (GH-25501) | ||||
* | bpo-42809: Improve pickle tests for recursive data. (GH-24060) | Serhiy Storchaka | 2021-01-02 | 1 | -87/+253 |
| | |||||
* | bpo-41052: Fix pickling heap types implemented in C with protocols 0 and 1 ↵ | Serhiy Storchaka | 2020-10-24 | 1 | -0/+18 |
| | | | | (GH-22870) | ||||
* | bpo-41288: Fix a crash in unpickling invalid NEWOBJ_EX. (GH-21458) | Serhiy Storchaka | 2020-07-13 | 1 | -0/+18 |
| | | | Automerge-Triggered-By: @tiran | ||||
* | bpo-40275: Use new test.support helper submodules in tests (GH-21314) | Hai Shi | 2020-07-06 | 1 | -5/+8 |
| | |||||
* | bpo-41003: Fix test_copyreg when numpy is installed (GH-20935) | Victor Stinner | 2020-06-17 | 1 | -5/+11 |
| | | | | | | | | Fix test_copyreg when numpy is installed: test.pickletester now saves/restores warnings.filters when importing numpy, to ignore filters installed by numpy. Add the save_restore_warnings_filters() function to the test.support.warnings_helper module. | ||||
* | bpo-40275: Adding threading_helper submodule in test.support (GH-20263) | Hai Shi | 2020-05-27 | 1 | -2/+3 |
| | |||||
* | bpo-39681: Fix C pickle regression with minimal file-like objects (#18592) | Antoine Pitrou | 2020-02-23 | 1 | -4/+21 |
| | | | | Fix a regression where the C pickle module wouldn't allow unpickling from a file-like object that doesn't expose a readinto() method. | ||||
* | bpo-39492: Fix a reference cycle between reducer_override and a Pickler ↵ | Pierre Glaser | 2020-02-02 | 1 | -0/+24 |
| | | | | | | | | | | | | instance (GH-18266) This also needs a backport to 3.8 https://bugs.python.org/issue39492 Automerge-Triggered-By: @pitrou | ||||
* | bpo-38876: Raise pickle.UnpicklingError when loading an item from memo for ↵ | Claudiu Popa | 2019-11-24 | 1 | -1/+3 |
| | | | | | | | | | | | | | | | invalid input (GH-17335) The previous code was raising a `KeyError` for both the Python and C implementation. This was caused by the specified index of an invalid input which did not exist in the memo structure, where the pickle stores what objects it has seen. The malformed input would have caused either a `BINGET` or `LONG_BINGET` load from the memo, leading to a `KeyError` as the determined index was bogus. https://bugs.python.org/issue38876 https://bugs.python.org/issue38876 | ||||
* | Don't skip pickle check_frame_opcodes() (GH-15025) | Neil Schemenauer | 2019-07-30 | 1 | -1/+0 |
| | | | | This looks like the only place that proto 4 framing gets exercised so leave it as part of the PGO task. | ||||
* | bpo-37707: Exclude expensive unit tests from PGO task (GH-15009) | Neil Schemenauer | 2019-07-30 | 1 | -0/+3 |
| | | | | | Mark some individual tests to skip when --pgo is used. The tests marked increase the PGO task time significantly and likely don't help improve optimization of the final executable. | ||||
* | bpo-37502: handle default parameter for buffers argument of pickle.loads ↵ | Markus Mohrhard | 2019-07-25 | 1 | -0/+5 |
| | | | | correctly (GH-14593) | ||||
* | bpo-31829: Make protocol 0 pickles be loadable in text mode in Python 2. ↵ | Serhiy Storchaka | 2019-05-31 | 1 | -4/+15 |
| | | | | | | (GH-11859) Escape ``\r``, ``\0`` and ``\x1a`` (end-of-file on Windows) in Unicode strings. | ||||
* | bpo-36785: PEP 574 implementation (GH-7076) | Antoine Pitrou | 2019-05-26 | 1 | -12/+411 |
| | |||||
* | bpo-35900: Enable custom reduction callback registration in _pickle (GH-12499) | Pierre Glaser | 2019-05-08 | 1 | -0/+68 |
| | | | | Enable custom reduction callback registration for functions and classes in _pickle.c, using the new Pickler's attribute ``reducer_override``. | ||||
* | bpo-35900: Add a state_setter arg to save_reduce (GH-12588) | Pierre Glaser | 2019-05-08 | 1 | -1/+39 |
| | | | | | Allow reduction methods to return a 6-item tuple where the 6th item specifies a custom state-setting method that's called instead of the regular ``__setstate__`` method. | ||||
* | bpo-36766: Typos in docs and code comments (GH-13116) | penguindustin | 2019-05-06 | 1 | -1/+1 |
| | |||||
* | Clean up code which checked presence of os.{stat,lstat,chmod} (#11643) | Anthony Sottile | 2019-02-25 | 1 | -5/+4 |
| | |||||
* | bpo-34572: change _pickle unpickling to use import rather than retrieving ↵ | tjb900 | 2019-02-18 | 1 | -1/+66 |
| | | | | | from sys.modules (GH-9047) Fix C implementation of pickle.loads to use importlib's locking mechanisms, and thereby avoid using partially-loaded modules. | ||||
* | bpo-33209: End framing at the end of C implementation of ↵ | Serhiy Storchaka | 2018-04-03 | 1 | -17/+18 |
| | | | | pickle.Pickler.dump(). (GH-6363) | ||||
* | bpo-32503: Avoid creating too small frames in pickles. (#5127) | Serhiy Storchaka | 2018-01-20 | 1 | -37/+45 |
| |