[issue37095] [Feature Request]: Add zstd support in tarfile

2019-11-24 Thread Chih-Hsuan Yen
Change by Chih-Hsuan Yen : -- nosy: +yan12125 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35381] posixmodule: convert statically allocated types (DirEntryType & ScandirIteratorType) to heap-allocated types

2019-11-24 Thread Eddie Elizondo
Eddie Elizondo added the comment: PR with fix is out. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38803] test_wait3 and test_wait4 leaked references on x86 Gentoo Refleaks 3.x

2019-11-24 Thread Eddie Elizondo
Eddie Elizondo added the comment: Victor, the PR with the fix is out. Easy catch after running it with my leak detector! -- ___ Python tracker ___

[issue38803] test_wait3 and test_wait4 leaked references on x86 Gentoo Refleaks 3.x

2019-11-24 Thread Eddie Elizondo
Change by Eddie Elizondo : -- keywords: +patch pull_requests: +16856 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17373 ___ Python tracker ___

[issue38905] venv python reports wrong sys.executable in a subprocess on Windows

2019-11-24 Thread Tzu-ping Chung
Tzu-ping Chung added the comment: > If you don't use activate.bat, but just run the venv's python directly, what > do you see? I get: > What shell are you using? Above is with cmd.exe. I get the same result as activating (i.e. shows the base interpeter). All results in cmd.exe as well. > If

[issue38861] zipfile: Corrupts filenames containing non-UTF8 characters

2019-11-24 Thread John Goerzen
John Goerzen added the comment: I can tell you that the zip(1) on Unix systems has never done re-encoding to cp437; on a system that uses latin-1 (or any other latin-* for that matter) the filenames in the ZIP will be encoded in latin-1. Furthermore, this doesn't explain the corruption

[issue38625] SpooledTemporaryFile does not seek correctly after being rolled over

2019-11-24 Thread Inada Naoki
Inada Naoki added the comment: SpooledTemporaryFile has very serious bug which causes data corruption (#26730). Please don't use it with text mode until it is fixed. -- ___ Python tracker

[issue38861] zipfile: Corrupts filenames containing non-UTF8 characters

2019-11-24 Thread Jon Nalley
Jon Nalley added the comment: I think the Python implementation is adhering to the zip specification. >From the specification v6.3.6 (Revised: April 26, 2019): If general purpose bit 11 is unset, the file name and comment SHOULD conform to the original ZIP character encoding. If general

[issue38905] venv python reports wrong sys.executable in a subprocess on Windows

2019-11-24 Thread Eric V. Smith
Eric V. Smith added the comment: Your failing test case with 3.7 works for me. If you don't use activate.bat, but just run the venv's python directly, what do you see? I get: >py -m venv fooenv >fooenv\Scripts\python -V Python 3.7.0 >fooenv\Scripts\python -q >>> import subprocess >>>

[issue38901] Add a CLI flag to venv to use the pwd basename as the prompt

2019-11-24 Thread Julien Palard
Julien Palard added the comment: I like the idea and I think I will use it! As it's a bit long to type, I'm searching if other shorter variants could be usefull like: python3 -m venv --here python3 -m venv --cwd python3 -m venv --project being the equivalent of `python3 -m venv

[issue38547] test_pty fails when using setsid()

2019-11-24 Thread David Bolen
David Bolen added the comment: I think fixing the underlying pty issue should certainly be the goal, but the question is whether the process group change should remain active in the meantime, as its presence is causing a regression in the tests. I think such cases in the past are usually

[issue38901] Add a CLI flag to venv to use the pwd basename as the prompt

2019-11-24 Thread Vinay Sajip
Vinay Sajip added the comment: > Maybe it makes sense to add a `--basename-prompt` flag to set the prompt to > the current working directory's basename? What does this buy you beyond using --prompt $(basename $PWD) ? Perhaps I'm not understanding what you're getting at - how about an

[issue38870] Expose ast.unparse in the ast module

2019-11-24 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 27fc3b6f3fc49a36d3f962caac5c5495696d12ed by Pablo Galindo in branch 'master': bpo-38870: Expose a function to unparse an ast object in the ast module (GH-17302)

[issue38547] test_pty fails when using setsid()

2019-11-24 Thread STINNER Victor
STINNER Victor added the comment: Can't we fix test_pty? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38547] test_pty fails when using setsid()

2019-11-24 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > What do you mean by "limited"? I mean to deactivate it by default and make opt-in. > Process groups really help to prevent to leak grandchild processes in > multiprocessing tests, when tests are interrupted manually by CTRL+C or by a > timeout

[issue38547] test_pty fails when using setsid()

2019-11-24 Thread STINNER Victor
STINNER Victor added the comment: > I think this needs to be fixed or process groups in regrtest should be > limited or reverted. What do you mean by "limited"? Process groups really help to prevent to leak grandchild processes in multiprocessing tests, when tests are interrupted manually

[issue37292] _xxsubinterpreters: Can't unpickle objects defined in __main__

2019-11-24 Thread Lewis Gaul
Lewis Gaul added the comment: The relevant code for the multiprocessing example seems to be in Lib/multiprocessing/spawn.py. I think I get what it's doing, but I'm not sure whether we actually need something similar for subinterpreters. Any thoughts @eric.snow? --

[issue38862] IDLE: Include end newlines in whitespace fix.

2019-11-24 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 6bf644ec82f14cceae68278dc35bafb00875efae by Terry Jan Reedy in branch 'master': bpo-38862: IDLE Strip Trailing Whitespace fixes end newlines (GH-17366) https://github.com/python/cpython/commit/6bf644ec82f14cceae68278dc35bafb00875efae

[issue38862] IDLE: Include end newlines in whitespace fix.

2019-11-24 Thread miss-islington
Change by miss-islington : -- pull_requests: +16855 pull_request: https://github.com/python/cpython/pull/17371 ___ Python tracker ___

[issue38862] IDLE: Include end newlines in whitespace fix.

2019-11-24 Thread miss-islington
Change by miss-islington : -- pull_requests: +16854 pull_request: https://github.com/python/cpython/pull/17370 ___ Python tracker ___

[issue38876] pickle is raising KeyError insteat of pickle.UnpicklingError under certain conditions

2019-11-24 Thread Alexandre Vassalotti
Change by Alexandre Vassalotti : -- assignee: -> alexandre.vassalotti resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 3.7, Python 3.8 ___ Python tracker

[issue38603] inspect.getdoc could examine the __class__ cell for dynamically generated subclasses

2019-11-24 Thread Batuhan
Change by Batuhan : -- nosy: +yselivanov ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38906] copy2 doesn't copy metadata on Windows and MacOS

2019-11-24 Thread Eryk Sun
Change by Eryk Sun : -- nosy: +giampaolo.rodola ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38906] copy2 doesn't copy metadata on Windows and MacOS

2019-11-24 Thread Eryk Sun
Eryk Sun added the comment: In Windows, using CopyFileExW and CreateDirectoryExW (with a template directory, for copytree) doesn't agree with how shutil implements copying with separate copyfile and copymode/copystat functions. We'd have to extend copyfile() to support alternate data

[issue38625] SpooledTemporaryFile does not seek correctly after being rolled over

2019-11-24 Thread R. David Murray
R. David Murray added the comment: The docs currently say "The returned object is a file-like object whose _file attribute is either an io.BytesIO or io.StringIO object (depending on whether binary or text mode was specified) or a true file object, depending on whether rollover() has been

[issue38862] IDLE: Include end newlines in whitespace fix.

2019-11-24 Thread Terry J. Reedy
Terry J. Reedy added the comment: Currently, iomenu.IOBinding.fixnewlines makes sure that when a non-empty non-Shell file is saved (and possibly run), it ends with at least 1 newline. At one time, I believe, compile needed this, and it is still good practice. (Git diffs note the absence

[issue38876] pickle is raising KeyError insteat of pickle.UnpicklingError under certain conditions

2019-11-24 Thread miss-islington
miss-islington added the comment: New changeset 6f03b236c17c96bc9f8a004ffa7e7ae0542e9cac by Miss Islington (bot) (Claudiu Popa) in branch 'master': bpo-38876: Raise pickle.UnpicklingError when loading an item from memo for invalid input (GH-17335)

[issue38698] While parsing email message id: UnboundLocalError

2019-11-24 Thread R. David Murray
R. David Murray added the comment: Actually, the success path there should also check that value is empty, and if it is not register a defect for that as well. -- ___ Python tracker

[issue38672] mimetypes.init() fails if no access to one of known files

2019-11-24 Thread R. David Murray
R. David Murray added the comment: I haven't looked at this in detail, but here are my general thoughts: I think it would be reasonable to expect that the module would function even if the file permissions are screwed up, similar to how unix commands that try to read .netrc will (try to)

[issue38524] functools.cached_property is not supported for setattr

2019-11-24 Thread Tal Einat
Change by Tal Einat : -- versions: +Python 3.7, Python 3.9 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38698] While parsing email message id: UnboundLocalError

2019-11-24 Thread R. David Murray
R. David Murray added the comment: More tests are always good :) The "correct" solution here (as far as I remember, its has been a while since I've had time to even looked at the _header_value_parser code) would be to add a new 'invalid-msg-id' token, and do this: message_id =

[issue38546] test_concurrent_futures: reap_children() warnings on RHEL7 and RHEL8 buildbots

2019-11-24 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Ran 168 tests in 160.415s OK (skipped=3) Warning -- multiprocessing.process._dangling was modified by test_concurrent_futures Before: set() After: {} Another failure in AMD64 RHEL8 LTO + PGO 3.x

[issue38547] test_pty fails when using setsid()

2019-11-24 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Indeed, almost all buildbots have to repeat the test_pty. I think this needs to be fixed or process groups in regrtest should be limited or reverted. -- ___ Python tracker

[issue38547] test_pty fails when using setsid()

2019-11-24 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: This also happens when running the test suite with high parallelism: ./python -m test -j 20 This fails with: == Tests result: FAILURE == 398 tests OK. 2 tests failed: test_embed test_pty -- nosy: +pablogsal

[issue38907] Add IPv6 Dual-Stack control for http.server

2019-11-24 Thread JIanqiu Tao
JIanqiu Tao added the comment: "--no-dual-stack" seems to be a better argument name. "--ipv6-only" lead to ambiguity in a IPv4 only environment. -- ___ Python tracker ___

[issue38908] Troubles with @runtime_checkable protocols

2019-11-24 Thread Ivan Levkivskyi
New submission from Ivan Levkivskyi : The PEP 544 specifies that: A protocol can be used as a second argument in isinstance() and issubclass() only if it is explicitly opt-in by @runtime_checkable decorator. It is not specified exactly whether this should be enforced by static type checkers

[issue38907] Add IPv6 Dual-Stack control for http.server

2019-11-24 Thread JIanqiu Tao
New submission from JIanqiu Tao : In Python 3.8+, when we run the http.server in a PC that support IPv6, it will bind IPv6 socket normally. On Linux or some other platforms, it also bind IPv4, that's pretty good, but on Windows, it doesn't work and "--bind 0.0.0.0" have to be provided to

[issue38446] Ambiguous signature for builtins.__build_class__

2019-11-24 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue38804] Regular Expression Denial of Service in http.cookiejar

2019-11-24 Thread STINNER Victor
STINNER Victor added the comment: New changeset e6499033032d5b647e43a3b49da0c1c64b151743 by Victor Stinner in branch '2.7': bpo-38804: Fix REDoS in http.cookiejar (GH-17157) (GH-17345) https://github.com/python/cpython/commit/e6499033032d5b647e43a3b49da0c1c64b151743 --

[issue37063] Incorrect application of func.__defaults__ by inspect's signature APIs

2019-11-24 Thread Batuhan
Batuhan added the comment: As mentioned in docs, getfullargspec is based on signature() and signature objects doesnt keep record of all defaults. It tries to map defaults with parameters but if you have less default then total parameter amount it will discard rest of defaults. IMHO this

[issue38901] Add a CLI flag to venv to use the pwd basename as the prompt

2019-11-24 Thread Florian Dahlitz
Change by Florian Dahlitz : -- nosy: +DahlitzFlorian ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37095] [Feature Request]: Add zstd support in tarfile

2019-11-24 Thread lilydjwg
Change by lilydjwg : -- nosy: +lilydjwg ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue27873] multiprocessing.pool.Pool.map should take more than one iterable

2019-11-24 Thread AnLong
Change by AnLong : -- pull_requests: +16853 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/17367 ___ Python tracker ___

[issue37292] _xxsubinterpreters: Can't unpickle objects defined in __main__

2019-11-24 Thread Lewis Gaul
Lewis Gaul added the comment: Just to move the conversation from the subinterpreters project repo to here... I'm going to take a look at how this is done by subprocess using the example provided by Guido: import os from concurrent.futures import ProcessPoolExecutor from multiprocessing

[issue38834] TypedDict: no way to tell which (if any) keys are optional at runtime

2019-11-24 Thread Ivan Levkivskyi
Change by Ivan Levkivskyi : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue38906] copy2 doesn't copy metadata on Windows and MacOS

2019-11-24 Thread Gregg Tavares
New submission from Gregg Tavares : MacOS have extended file attributes. Windows has both extended file attributes and alternate streams. In both OSes copy/cp and of course the Finder and Windows Explorer copy all this data. Python copy2 does not. On Windows it seems like CopyFileW needs to

[issue38905] venv python reports wrong sys.executable in a subprocess on Windows

2019-11-24 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +eryksun ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38905] venv python reports wrong sys.executable in a subprocess on Windows

2019-11-24 Thread Tzu-ping Chung
Tzu-ping Chung added the comment: 3.6 works correctly on Windows: > py -3.6 -m venv test36 > test36\Scripts\activate.bat >>> import subprocess >>> print(subprocess.check_output(['python', '-c', 'import sys; >>> print(sys.executable)']))

[issue38905] venv python reports wrong sys.executable in a subprocess on Windows

2019-11-24 Thread Tzu-ping Chung
Tzu-ping Chung added the comment: Linux works correctly (Ubuntu with self-compiled Python 3.7.5) $ python3.7 -m venv fooenv $ . fooenv/bin/activate (fooenv) $ python -c "import sys; print(sys.executable)" /home/uranusjr/fooenv/bin/python (fooenv) $ python -q >>> import subprocess >>>

[issue38905] venv python reports wrong sys.executable in a subprocess on Windows

2019-11-24 Thread Tzu-ping Chung
New submission from Tzu-ping Chung : To reproduce: > py -m venv fooenv > fooenv\Scripts\activate.bat (fooenv) > python -c "import sys; print(sys.executable)" % This is correct C:\Users\uranusjr\Downloads\venvtest\Scripts\python.exe (fooenv) > python -q >>> import subprocess >>>