Danny Lin
ea3259fba7
Optimize code
2025-06-01 14:11:43 +08:00
Danny Lin
2b23d46d95
Add memory usage test
2025-05-30 22:42:11 +08:00
Danny Lin
e1caea9b30
Adjust method names
2025-05-30 20:59:52 +08:00
Danny Lin
c80d21bf99
Strip only entries immediately following a referenced entry
...
- The previous implementation might cause [archive decryption header] and/or [archive extra data record] preceeding [central directory] be stripped.
2025-05-30 20:57:36 +08:00
Danny Lin
f8fade17a0
Introduce _scan_data_descriptor_no_sig_by_decompression
2025-05-30 20:56:31 +08:00
Danny Lin
fbf75888fc
Rename methods and parameters
2025-05-28 11:46:48 +08:00
Danny Lin
3ef72c68be
Add tearDown for tests
2025-05-28 11:45:47 +08:00
Danny Lin
93f4c25d39
Fix bad test code
2025-05-27 07:57:28 +08:00
Danny Lin
e76f9a1bc1
Fix bytes between entries be removed when removed is passed
2025-05-27 00:20:40 +08:00
Danny Lin
926338cbc1
Support repack(removed)
2025-05-26 23:46:17 +08:00
Danny Lin
4c35eb262d
Check testzip() after zip file closed
2025-05-26 23:00:08 +08:00
Danny Lin
8a448e452b
Add test for bytes between file entries
2025-05-26 22:45:20 +08:00
Danny Lin
95fde316ab
Fix typo
2025-05-26 22:43:58 +08:00
Danny Lin
ae01b8cd69
Raise on overlapping file blocks
2025-05-25 21:09:12 +08:00
Danny Lin
8f0a504b20
Fix and improve validation tests
...
- Separate individual validation tests.
- Check underlying repacker not called in validation.
- Use `unlink` to prevent FileNotFoundError.
- Fix mode 'x' test.
2025-05-25 16:18:56 +08:00
Danny Lin
0d971d81b5
Add strict_descriptor option
2025-05-25 10:19:06 +08:00
Danny Lin
236cd06084
Optimize _calc_initial_entry_offset by introducing cache
2025-05-25 10:09:18 +08:00
Danny Lin
a4b410b9f6
Add tests for mode w and x for remove()
2025-05-24 23:03:43 +08:00
Danny Lin
72c2a6678f
Handle common setups with setUpClass
2025-05-24 22:43:12 +08:00
Danny Lin
80ab2e27e4
Fix and optimize test code
2025-05-24 22:22:28 +08:00
Danny Lin
6aed859ade
Add remove() and repack() to ZipFile
2025-05-24 18:54:06 +08:00
Seth Michael Larson
47f1161d3a
gh-128840: Limit the number of parts in IPv6 address parsing (GH-128841)
...
GH-128840: Limit the number of parts in IPv6 address parsing
Limit length of IP address string to 39
---------
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
2025-05-24 02:57:13 +00:00
Emma Smith
f478331f98
gh-132983: Slightly tweak error messages for _zstd compressor/decompressor options dict ( #134601 )
...
Slightly tweak error messages for options dict
2025-05-23 14:51:41 -07:00
Eric Snow
8a793c4a36
gh-134557: Revert "gh-132775: Use _PyCode GetScriptXIData()" (gh-134599)
...
This reverts commit 09e72cf091 , AKA gh-134511.
We are reverting due to refleaks on free-threaded builds.
2025-05-23 20:04:20 +00:00
Jiucheng(Oliver)
9a2346df86
gh-134381: Fix RuntimeError when starting not-yet started Thread after fork (gh-134514)
2025-05-23 15:22:14 -04:00
Serhiy Storchaka
393773ae87
gh-134565: Use ExceptionGroup to handle multiple errors in unittest.doModuleCleanups() (GH-134566)
2025-05-23 21:07:49 +03:00
Serhiy Storchaka
77eade39f9
gh-134578: Mark more slow tests (GH-134579)
2025-05-23 19:59:10 +03:00
Serhiy Storchaka
fc0c9c2412
gh-133454: Reduce the number of threads in test_racing_getbuf_and_releasebuf (GH-133458)
...
The original reproducer only used 10 threads.
2025-05-23 19:58:34 +03:00
Emma Smith
8dbc119719
gh-133885: Use locks instead of critical sections for _zstd (gh-134289)
...
Move from using critical sections to locks for the (de)compression methods.
Since the methods allow other threads to run, we should use a lock rather
than a critical section.
2025-05-22 23:30:10 -04:00
Brett Cannon
ad42dc1909
GH-130397: remove special-casing of C stack depth for WASI ( #134469 )
...
Removed special-casing for WASI when setting C stack depth limits. Since WASI has its own C stack checking this isn't a security risk.
Also disabled some tests that stopped passing. They all happened to have already been disabled under Emscripten.
2025-05-22 14:08:44 -07:00
Tomas R.
484e00379b
GH-131798: Optimize away isinstance calls in the JIT (GH-134369)
2025-05-22 12:52:47 -04:00
Duprat
fade146cfb
gh-134322: Fix repr(threading.RLock) ( #134389 )
...
Fix the `__repr__` value of `threading.RLock` from `_thread` module, when just created.
2025-05-22 16:46:57 +00:00
Brandt Bucher
ec736e7dae
GH-131798: Optimize cached class attributes and methods in the JIT (GH-134403)
2025-05-22 11:15:03 -04:00
Eric Snow
09e72cf091
gh-132775: Use _PyCode GetScriptXIData() (gh-134511)
2025-05-22 08:40:33 -06:00
Nadeshiko Manju
8c5e5557c6
GH-131798: Turn _LOAD_SMALL_INT into _LOAD_CONST_INLINE_BORROW in the JIT (GH-134406)
2025-05-22 09:54:57 -04:00
Duprat
3effede97c
gh-134323: Fix the new threading.RLock.locked method ( #134368 )
...
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2025-05-22 13:48:24 +00:00
Eric Snow
d0eedfa10e
gh-132775: Use _PyObject_GetXIData (With Fallback) (gh-134440)
...
This change includes some semi-related refactoring of queues and channels.
2025-05-22 06:50:06 -06:00
Serhiy Storchaka
2602d8ae98
gh-71339: Use new assertion methods in tests (GH-129046)
2025-05-22 13:17:22 +03:00
Sergey Miryanov
7309eb60c0
gh-131357: Add some extra tests for empty bytes and bytearray ( #134458 )
2025-05-22 09:01:46 +02:00
Gregory P. Smith
296a66051e
gh-127840: Revert "gh-127840: pass flags and address from send_fds (GH-127841)" ( #134482 )
...
Revert "gh-127840: pass flags and address from send_fds (GH-127841)"
This reverts commit 518c95b552 .
2025-05-22 03:38:44 +00:00
Mike Salvatore
f3fc0c16e0
gh-134062: Fix hash collisions in IPv4Network and IPv6Network (GH-134063)
...
gh-134062: Fix hash collisions in IPv4Network and IPv6Network
gh-134062: Add hash collision regression test
2025-05-21 19:48:10 -07:00
Marcin Bachry
518c95b552
gh-127840: pass flags and address from send_fds (GH-127841)
...
socket: pass flags and address from send_fds
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2025-05-21 19:38:01 -07:00
Yuichiro Tachibana (Tsuchiya)
b1b8962443
gh-127960 Fix the REPL to set the correct namespace by setting the correct __main__ module (gh-134275)
...
The `__main__` module imported in the `_pyrepl` module points to the `_pyrepl` module itself when the interpreter was launched without `-m` option and didn't execute a module,
while it's an unexpected behavior that `__main__` can be `_pyrepl` and relative imports such as `from . import *` works based on the `_pyrepl` module.
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2025-05-22 02:18:00 +02:00
Eric Snow
a66bae8bb5
gh-132775: Use _PyFunction_VerifyStateless() and _PyCode_VerifyStateless() (gh-134439)
2025-05-21 14:16:55 -06:00
Cody Maloney
5b0e827521
gh-133982: Run unclosed file test on all io implementations (gh-134165)
...
Update `test_io` `_check_warn_on_dealloc` to use `self.` to dispatch to
different I/O implementations.
Update the `_pyio` implementation to match expected behavior, using the
same `_dealloc_warn` design as the C implementation uses to report the
topmost `__del__` object.
The FileIO one now matches all the others, so can use IOBase. There was
a missing check on closing (self._fd must be valid), add that check
2025-05-21 16:51:56 +02:00
Cody Maloney
06eaf4055c
gh-71253: Match _io exception in _pyio (gh-133985)
...
Test was only testing _io, expanded to cover _pyio.
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2025-05-21 16:45:00 +02:00
Cody Maloney
84d5f8d799
gh-133982: Update test_bufio to use self.open (gh-133983)
2025-05-21 16:40:50 +02:00
Christian Harries
109f7597d2
gh-90871: fix connection backlog offset in asyncio (gh-134392)
...
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2025-05-21 15:59:09 +02:00
Eric Snow
88f8102a8f
gh-132775: Support Fallbacks in _PyObject_GetXIData() (gh-133482)
...
It now supports a "full" fallback to _PyFunction_GetXIData() and then `_PyPickle_GetXIData()`. There's also room for other fallback modes if that later makes sense.
2025-05-21 07:23:48 -06:00
Peter Bierma
b8998fe2d8
gh-131185: Use a proper thread-local for cached thread states (gh-132510)
...
Switches over to a _Py_thread_local in place of autoTssKey, and also fixes a few other checks regarding PyGILState_Ensure after finalization.
Note that this doesn't fix concurrent use of PyGILState_Ensure with Py_Finalize; I'm pretty sure zapthreads doesn't work at all, and that needs to be fixed seperately.
2025-05-21 07:01:25 -06:00