summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_marshal.py
Commit message (Collapse)AuthorAgeFilesLines
* gh-127146: Resolve some minor problems in Emscripten tests (#127565)Hood Chatham2024-12-041-2/+2
| | | | Adjusts some Emscripten test exclusions regarding strftime, fma, and stack depth.
* gh-125063: marshal: Add version 5, improve documentation (GH-126829)Petr Viktorin2024-11-151-3/+24
| | | | | | | | | | * Document that slices can be marshalled * Deduplicate and organize the list of supported types in docs * Organize the type code list in marshal.c, to make it more obvious that this is a versioned format * Back-fill some historical info Co-authored-by: Michael Droettboom <mdboom@gmail.com>
* gh-116303: Skip tests if C recursion limit is unavailable (GH-117368)Erlend E. Aasland2024-04-081-1/+1
| | | | | The test suite fetches the C recursion limit from the _testcapi extension module. Test extension modules can be disabled using the --disable-test-modules configure option.
* gh-114099: Add test exclusions to support running the test suite on iOS ↵Russell Keith-Magee2024-02-051-2/+2
| | | | | | | | | | | | | (#114889) Add test annotations required to run the test suite on iOS (PEP 730). The majority of the change involve annotating tests that use subprocess, but are skipped on Emscripten/WASI for other reasons, and including iOS/tvOS/watchOS under the same umbrella as macOS/darwin checks. `is_apple` and `is_apple_mobile` test helpers have been added to identify *any* Apple platform, and "any Apple platform except macOS", respectively.
* gh-113626: Add allow_code parameter in marshal functions (GH-113648)Serhiy Storchaka2024-01-161-0/+26
| | | | | Passing allow_code=False prevents serialization and de-serialization of code objects which is incompatible between Python versions.
* gh-99934: test_marshal.py: add more elements in test_deterministic_sets ↵Alexander Kanavin2022-12-031-1/+1
| | | | | | (GH-99935) Existing elements do produce different output on x86_64, but they do not on x86. Let's make the data longer to ensure it differs.
* gh-98925: Lower marshal recursion depth for WASI (GH-98938)Brett Cannon2022-11-011-0/+2
| | | | | For wasmtime 2.0, the stack depth cost is 6% higher. This causes the default max `marshal` recursion depth to blow the stack. As the default marshal depth is 2000 and Windows is set to 1000, split the difference and choose 1500 for WASI to be safe.
* GH-91079: Decouple C stack overflow checks from Python recursion checks. ↵Mark Shannon2022-10-051-1/+2
| | | | (GH-96510)
* gh-69443: Add test.support.Py_DEBUG constant (#93226)Victor Stinner2022-05-251-1/+1
|
* GH-88116: Use a compact format to represent end line and column offsets. ↵Mark Shannon2022-04-211-5/+5
| | | | | | | | | | | | (GH-91666) * Stores all location info in linetable to conform to PEP 626. * Remove column table from code objects. * Remove end-line table from code objects. * Document new location table format
* Handle different string hash algorithms correctly (#28147)Brandt Bucher2021-09-041-6/+9
|
* bpo-37596: Make `set` and `frozenset` marshalling deterministic (GH-27926)Brandt Bucher2021-08-251-0/+25
|
* Remove __cleanenv from PEP-657 tests (GH-27060)Ammar Askar2021-07-071-2/+1
|
* bpo-43950: Add option to opt-out of PEP-657 (GH-27023)Ammar Askar2021-07-071-1/+28
| | | | | Co-authored-by: Pablo Galindo <Pablogsal@gmail.com> Co-authored-by: Batuhan Taskaya <batuhanosmantaskaya@gmail.com> Co-authored-by: Ammar Askar <ammar@ammaraskar.com>
* bpo-40275: Use new test.support helper submodules in tests (GH-21317)Hai Shi2020-07-061-36/+37
|
* bpo-40521: Empty frozenset is no longer a singleton (GH-21085)Raymond Hettinger2020-06-231-7/+0
| | | | | | | | | * Revert "bpo-40521: Make the empty frozenset per interpreter (GH-21068)" This reverts commit 261cfedf7657a515e04428bba58eba2a9bb88208. * bpo-40521: Empty frozensets are no longer singletons * Complete the removal of the frozenset singleton
* Add more tests for preserving identity in marshal. (GH-13736)Serhiy Storchaka2019-06-021-18/+51
|
* Fix fuzz testing for marshal.loads(). (GH-8106)Serhiy Storchaka2018-07-051-4/+5
|
* bpo-33720: Improve tests for the stack overflow in marshal.loads(). (GH-7336)Serhiy Storchaka2018-07-051-6/+17
|
* bpo-33720: Reduces maximum marshal recursion depth on release builds. (GH-7401)Steve Dower2018-06-041-1/+4
|
* bpo-32011: Revert "Issue #15480: Remove the deprecated and unused TYPE_INT64 ↵Serhiy Storchaka2017-11-151-0/+23
| | | | | | | code from marshal." (#4381) Simplify the reverted code. This reverts commit e9bbe8b87ba2874efba0474af5cc7d5941dbf742.
* Issue #26146: marshal.loads() now uses the empty frozenset singletonVictor Stinner2016-01-231-0/+7
|
* Issue #23392: Added tests for marshal C API that works with FILE*.Serhiy Storchaka2015-02-061-12/+87
|\
| * Issue #23392: Added tests for marshal C API that works with FILE*.Serhiy Storchaka2015-02-061-12/+87
| |
* | #22734 marshal needs a lower stack depth for debug builds on WindowsSteve Dower2014-11-011-1/+1
|/
* Issue #19936: Added executable bits or shebang lines to Python scripts whichSerhiy Storchaka2014-01-161-2/+0
|\ | | | | | | | | | | | | 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.
| * Issue #19936: Added executable bits or shebang lines to Python scripts whichSerhiy Storchaka2014-01-161-2/+0
| | | | | | | | | | | | | | 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.
* | Issue #19886: Use better estimated memory requirements for bigmem tests.Serhiy Storchaka2014-01-101-5/+5
|\ \ | |/ | | | | Incorrect requirements can cause memory swapping.
| * Issue #19886: Use better estimated memory requirements for bigmem tests.Serhiy Storchaka2014-01-101-5/+5
| | | | | | | | Incorrect requirements can cause memory swapping.
* | Issue #19219: Speed up marshal.loads(), and make pyc files slightly (5% to ↵Antoine Pitrou2013-10-121-4/+4
| | | | | | | | 10%) smaller.
* | Issue #17872: Fix a segfault in marshal.load() when input stream returnsSerhiy Storchaka2013-07-111-0/+12
|\ \ | |/ | | | | more bytes than requested.
| * Issue #17872: Fix a segfault in marshal.load() when input stream returnsSerhiy Storchaka2013-07-111-0/+12
| | | | | | | | more bytes than requested.
* | Fix misindent. This would test half less possibilities.Antoine Pitrou2013-04-131-1/+1
| |
* | Issue #15480: Remove the deprecated and unused TYPE_INT64 code from marshal.Antoine Pitrou2013-04-131-27/+3
| | | | | | | | Initial patch by Daniel Riti.
* | Issue #16475 : Correctly handle the EOF when reading marshal streams.Kristján Valur Jónsson2013-03-201-0/+5
| |
* | Issue #16475: Support object instancing, recursion and interned stringsKristján Valur Jónsson2013-03-201-1/+121
|/ | | | in marshal
* Cleanup a test for issue #5308.Serhiy Storchaka2013-02-131-2/+1
|
* Issue #5308: Raise ValueError when marshalling too large object (a sequenceSerhiy Storchaka2013-02-131-7/+54
|\ | | | | | | with size >= 2**31), instead of producing illegal marshal data.
| * Issue #5308: Raise ValueError when marshalling too large object (a sequenceSerhiy Storchaka2013-02-131-7/+54
| | | | | | | | with size >= 2**31), instead of producing illegal marshal data.
* | - Issue #14177: marshal.loads() now raises TypeError when given an unicodeAntoine Pitrou2012-03-031-1/+6
|\ \ | |/ | | | | string. Patch by Guilherme Gonçalves.
| * Issue #14177: marshal.loads() now raises TypeError when given an unicode string.Antoine Pitrou2012-03-031-1/+6
| | | | | | | | Patch by Guilherme Gonçalves.
* | Issue #14172: Fix reference leak when marshalling a buffer-like object ↵Antoine Pitrou2012-03-021-0/+23
|\ \ | |/ | | | | (other than a bytes object).
| * Issue #14172: Fix reference leak when marshalling a buffer-like object ↵Antoine Pitrou2012-03-021-0/+23
| | | | | | | | (other than a bytes object).
* | Closes #12291 for 3.3 - merged fix from 3.2.Vinay Sajip2011-07-021-0/+24
|\ \ | |/
| * Closes #12291: Fixed bug which was found when doing multiple loads from one ↵Vinay Sajip2011-07-021-0/+24
| | | | | | | | stream.
* | try to use the same str object for all code filenames when compiling or ↵Benjamin Peterson2011-05-271-0/+17
|/ | | | | | unmarshalling (#12190) This should reduce memory usage.
* #11565: Merge with 3.1.Ezio Melotti2011-03-161-1/+1
|\
| * #11565: Fix several typos. Patch by Piotr Kasprzyk.Ezio Melotti2011-03-161-1/+1
| |
| * Merged revisions 86596 via svnmerge fromEzio Melotti2010-11-211-2/+2
| | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r86596 | ezio.melotti | 2010-11-20 21:04:17 +0200 (Sat, 20 Nov 2010) | 1 line #9424: Replace deprecated assert* methods in the Python test suite. ........
| * Merged revisions 75145 via svnmerge fromMark Dickinson2009-09-291-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@www.python.org/python/branches/py3k ................ r75145 | mark.dickinson | 2009-09-29 20:21:35 +0100 (Tue, 29 Sep 2009) | 10 lines Merged revisions 75141 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r75141 | mark.dickinson | 2009-09-29 20:01:06 +0100 (Tue, 29 Sep 2009) | 3 lines Issue #7019: Unmarshalling of bad long data could produce unnormalized PyLongs. Raise ValueError instead. ........ ................