Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
eed2413
GH-94398: TaskGroup: Fail create_task() during shutdown
gvanrossum Jun 29, 2022
0453e5e
📜🤖 Added by blurb_it.
blurb-it[bot] Jun 29, 2022
35b5645
Shorter sleep (even though it's aborted)
gvanrossum Jun 29, 2022
193623f
Use :class:`asyncio.TaskGroup` in Blurb.
ambv Jun 30, 2022
41302b0
gh-82006: IDLE doc improvements (#94349)
terryjreedy Jun 27, 2022
8699848
GH-89988: Fix memory leak in pickle.Pickler dispatch_table lookup (GH…
kumaraditya303 Jun 28, 2022
fee1b9f
gh-94208: Add more TLS version/protocol checks for FreeBSD (GH-94347)
tiran Jun 28, 2022
01f25f3
gh-86404: [doc] Fix missing space in idle documentation. (GH-94366)
JulienPalard Jun 28, 2022
4c130ea
Generalize build_msi GitHub action (GH-94201)
arhadthedev Jun 28, 2022
8603119
gh-94199: Remove hashlib.pbkdf2_hmac() Python implementation (GH-94200)
vstinner Jun 28, 2022
98082d0
gh-87995: Make MappingProxyType hashable (GH-94252)
serhiy-storchaka Jun 28, 2022
0282cf9
Add docs for decorated object and field specifier params (GH-94354)
debonte Jun 28, 2022
5e9d3b6
gh-94018: Remove trailing spaces in _sanitize_windows_name (GH-94040)
Rygone Jun 28, 2022
b5942e9
gh-61585: Clarify import scope in modules tutorial (GH-93455)
slateny Jun 28, 2022
8e1bce0
gh-94172: Remove ssl.PROTOCOL_SSLv2 dead code (#94312)
vstinner Jun 28, 2022
3daebfe
gh-93939: Create and install scripts in Makefile (GH-94324)
tiran Jun 28, 2022
7613609
gh-88116: Avoid undefined behavior when decoding varints in code obje…
pablogsal Jun 28, 2022
e2a0a60
Fix typos in comments (#94305)
yutotnh Jun 28, 2022
975a0cf
gh-94395: Remove unneeded module state from mmap (#94396)
erlend-aasland Jun 29, 2022
bf43498
gh-94404: makesetup: use correct CFLAGS and macOS workaround (GH-94405)
tiran Jun 29, 2022
2e919ba
gh-94026: Buffer regrtest worker stdout in temporary file (GH-94253)
tiran Jun 29, 2022
3fa27d3
gh-86404: [doc] Two 'make suspicious' false positives. (GH-94407)
JulienPalard Jun 29, 2022
1479a39
gh-94401: Remove unneeded overlapped module state (#94403)
Jun 29, 2022
6e77150
gh-94404: Use module CFLAGS before PY_STDMODULE_CFLAGS (GH-94413)
tiran Jun 29, 2022
c172b62
Delete unused PC/empty.c (GH-94418)
arhadthedev Jun 29, 2022
26a62e4
gh-94401: Remove unneeded bz2 module state (#94402)
Jun 29, 2022
be02d89
Docs: Update SyntaxError message in REPL example for list comprehensi…
csabella Jun 29, 2022
6a6b87d
bpo-92336: [doc] clarify that the dfile is read by the traceback disp…
iritkatriel Jun 29, 2022
9771d0a
gh-92336: linecache.getline should not raise exceptions on decoding e…
iritkatriel Jun 30, 2022
b966d66
gh-94332: make it safe to call assemble_free when assemble_init has n…
iritkatriel Jun 30, 2022
25c5af5
Delete DOS-only PC/testpy.py (GH-94419)
arhadthedev Jun 30, 2022
2d55fea
GH-94329: Don't raise on excessive stack consumption (GH-94421)
markshannon Jun 30, 2022
6a5a45f
gh-89038: [doc] update dis.findlinestarts documentation for changes r…
iritkatriel Jun 30, 2022
c9920dd
gh-91719: Reload opcode on unknown error so that C can optimize the d…
neonene Jun 30, 2022
9eb94f3
gh-93491: Fix PEP 11 tier detection for FreeBSD (GH-94441)
tiran Jun 30, 2022
159a057
GH-90908: Document asyncio.TaskGroup (GH-94359)
gvanrossum Jun 30, 2022
5b9817d
Document the new behavior
gvanrossum Jun 30, 2022
32cfb35
Merge branch 'main' into task-group-abort
gvanrossum Jun 30, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
gh-94018: Remove trailing spaces in _sanitize_windows_name (GH-94040)
Closes #94018.

Co-authored-by: Sam Ezeh <sam.z.ezeh@gmail.com>
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Co-authored-by: Zachary Ware <zachary.ware@gmail.com>
  • Loading branch information
4 people authored and gvanrossum committed Jun 30, 2022
commit 5e9d3b6afc32d423495ea0ee7d9b40e45e4888f4
2 changes: 2 additions & 0 deletions Lib/test/test_zipfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -1440,6 +1440,8 @@ def test_sanitize_windows_name(self):
self.assertEqual(san(r',,?,C:,foo,bar/z', ','), r'_,C_,foo,bar/z')
self.assertEqual(san(r'a\b,c<d>e|f"g?h*i', ','), r'a\b,c_d_e_f_g_h_i')
self.assertEqual(san('../../foo../../ba..r', '/'), r'foo/ba..r')
self.assertEqual(san(' / /foo / /ba r', '/'), r'foo/ba r')
self.assertEqual(san(' . /. /foo ./ . /. ./ba .r', '/'), r'foo/ba .r')

def test_extract_hackers_arcnames_common_cases(self):
common_hacknames = [
Expand Down
4 changes: 2 additions & 2 deletions Lib/zipfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -1685,8 +1685,8 @@ def _sanitize_windows_name(cls, arcname, pathsep):
table = str.maketrans(illegal, '_' * len(illegal))
cls._windows_illegal_name_trans_table = table
arcname = arcname.translate(table)
# remove trailing dots
arcname = (x.rstrip('.') for x in arcname.split(pathsep))
# remove trailing dots and spaces
arcname = (x.rstrip(' .') for x in arcname.split(pathsep))
# rejoin, removing empty parts.
arcname = pathsep.join(x for x in arcname if x)
return arcname
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
:mod:`zipfile` will now remove trailing spaces from path components when extracting files on Windows.