[issue27145] long_add and long_sub might return a new int where _ints[x] could be returned

2019-11-25 Thread Inada Naoki
Change by Inada Naoki : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue27145] long_add and long_sub might return a new int where _ints[x] could be returned

2019-11-25 Thread Inada Naoki
Inada Naoki added the comment: New changeset 036fe85bd3e6cd01093d836d71792a1966f961e8 by Inada Naoki (HongWeipeng) in branch 'master': bpo-27145: small_ints[x] could be returned in long_add and long_sub (GH-15716)

[issue38897] Example in socket documentation uses deprecated array.fromstring

2019-11-25 Thread miss-islington
Change by miss-islington : -- keywords: +patch pull_requests: +16868 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17386 ___ Python tracker ___

[issue38913] Py_BuildValue("(s#O)", ...) segfaults if entered with exception raised

2019-11-25 Thread danielen
New submission from danielen : The following code results in a segmentation fault in CPython 3.8 while executes fines (raises a SystemError) in CPython 3.7. PyObject* debug(PyObject *self, PyObject *args) { const char * debug = "debug"; PyErr_SetString(PyExc_ValueError,

[issue38328] Speed up the creation time of constant list and set literals.

2019-11-25 Thread Inada Naoki
Change by Inada Naoki : -- nosy: -inada.naoki resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue38328] Speed up the creation time of constant list and set literals.

2019-11-25 Thread Inada Naoki
Inada Naoki added the comment: New changeset 6dd9b64770af8905bef293c81d541eaaf8d8df52 by Inada Naoki (Brandt Bucher) in branch 'master': bpo-38328: Speed up the creation time of constant list and set display. (GH-17114)

[issue38295] test_relative_path of test_py_compile fails on macOS 10.15 Catalina

2019-11-25 Thread Bo Anderson
Bo Anderson added the comment: For what it's worth, this is having an impact on some real code: https://github.com/Homebrew/homebrew-core/pull/45110 Perhaps a simpler way to reproduce is: % cd /tmp % python3 -c 'import os; open(os.path.relpath("/tmp/test.txt"), "w")' Traceback (most recent

[issue34716] MagicMock.__divmod__ should return a pair

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

[issue38910] AssertionError: ElementTree not initialized, missing root

2019-11-25 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: This seems more like an issue with lxml. -- nosy: +scoder, xtreak ___ Python tracker ___

[issue38895] performance degradation creating a mock object (by factor 7-8)

2019-11-25 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: > This is already done in master branch ;) Thanks, I noticed the speed improvement in master and 3.7 but assumed it's due to some other optimisation in master. > Do you mind if I create PR for it? I would like to start contributing to > CPython

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

2019-11-25 Thread John Goerzen
John Goerzen added the comment: Hi Jon, I've read your article in the gist, the ZIP spec, and the article you linked to. As the article you linked to (https://marcosc.com/2008/12/zip-files-and-encoding-i-hate-you/) states, "Implementers just encode file names however they want (usually

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

2019-11-25 Thread Tzu-ping Chung
Tzu-ping Chung added the comment: >> not enough since it’d break `flit install --python=py` because that’s give >> you the location of py.exe, not the actual interperter. > This would be fine if you still run the process to get its sys.executable. But then I need two separate workflows based

[issue36375] PEP 499 implementation: "python -m foo" binds the main module as both __main__ and foo in sys.modules

2019-11-25 Thread Cameron Simpson
Cameron Simpson added the comment: On 25Nov2019 17:38, Python Bug Reports wrote: >Eric Snow added the comment: > >FWIW, I have some feedback on the PEP. (See msg357448.) Can we discuss here >or should I open a mailing list thread? Let's discuss it here unless it looks like we need wider

[issue38911] include __del__ in Generator ABC

2019-11-25 Thread Guido van Rossum
Guido van Rossum added the comment: I wouldn't have use a Generator subclass for that. Let's not destabilize the Generator class. -- resolution: -> wont fix stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue38911] include __del__ in Generator ABC

2019-11-25 Thread Matt McEwen
Matt McEwen added the comment: My interpretation of issue 24018 was that the Generator ABC was trying to follow the PEP as much as possible, so that users were able to produce a custom generator object and have it behave just like a builtin generator object. I know that subclassing

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

2019-11-25 Thread Benjamin Peterson
Benjamin Peterson added the comment: New changeset e4db1f05e9a5828f6b287f99067362fa0e5732e8 by Benjamin Peterson (Eddie Elizondo) in branch 'master': closes bpo-38803: Fix leak in posixmodule. (GH-17373) https://github.com/python/cpython/commit/e4db1f05e9a5828f6b287f99067362fa0e5732e8

[issue26730] SpooledTemporaryFile doesn't correctly preserve data for text (non-binary) SpooledTemporaryFile objects when Unicode characters are written

2019-11-25 Thread Graham Coster
Graham Coster added the comment: This may be a silly question, however, does SpooledTemporaryFile need to exist at all? >From some testing on macOS, SpooledTemporaryFile appeared to never have a >performance advantage over OS file caching, but with max_size greater than >4GB, it was a

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

2019-11-25 Thread Graham Coster
Graham Coster added the comment: This may be a silly question, however, does SpooledTemporaryFile need to exist at all? >From some testing on macOS, SpooledTemporaryFile appeared to never have a >performance advantage over OS file caching, but with max_size greater than >4GB, it was a

[issue38911] include __del__ in Generator ABC

2019-11-25 Thread Guido van Rossum
Guido van Rossum added the comment: The PEP does not specify collections.Generator at all, so this is not just a matter of interpreting the PEP. The presence of a __del__ method can cause subtle behavior changes to the GC, so I worry that adding __del__ to that class now is going to break

[issue29167] Race condition in enum.py:_decompose()

2019-11-25 Thread Ethan Furman
Ethan Furman added the comment: The latest patch from issue38045 should make race-conditions non-existent. -- ___ Python tracker ___

[issue38912] test_asyncio altered the execution environment

2019-11-25 Thread Pablo Galindo Salgado
New submission from Pablo Galindo Salgado : https://buildbot.python.org/all/#/builders/260/builds/60/steps/5/logs/stdio 0:05:06 load avg: 6.65 [131/423] test_contextlib_async passed -- running: test_signal (1 min 53 sec), test_concurrent_futures (4 min 11 sec), test_zipfile (47.5 sec),

[issue38911] include __del__ in Generator ABC

2019-11-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: Guido should decide this one. The PEP isn't entirely clear whether __del__ is a CPython implementation detail, nor is it clear whether the intent was for the isinstance() to insist on __del__ being present. Also, at one time __del__ interfered with

[issue1812] doctest _load_testfile function -- newline handling seems incorrect

2019-11-25 Thread Peter Donis
Change by Peter Donis : -- versions: +Python 3.9 -Python 2.7, Python 3.4, Python 3.5 ___ Python tracker ___ ___ Python-bugs-list

[issue1812] doctest _load_testfile function -- newline handling seems incorrect

2019-11-25 Thread Peter Donis
Peter Donis added the comment: I have submitted pull request #17385 regarding this issue: https://github.com/python/cpython/pull/17385 -- ___ Python tracker ___

[issue1812] doctest _load_testfile function -- newline handling seems incorrect

2019-11-25 Thread Peter Donis
Change by Peter Donis : -- pull_requests: +16867 pull_request: https://github.com/python/cpython/pull/17385 ___ Python tracker ___

[issue38911] include __del__ in Generator ABC

2019-11-25 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch pull_requests: +16866 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17384 ___ Python tracker ___

[issue38911] include __del__ in Generator ABC

2019-11-25 Thread Matt McEwen
New submission from Matt McEwen : The Generator ABC in the standard library lets users define objects that follow the Generator specification given in PEP342, and which can be used in the place of builtin generator objects. This was originally added in issue 24018 The ABC enforces that the

[issue38910] AssertionError: ElementTree not initialized, missing root

2019-11-25 Thread Joseph Reagle
Joseph Reagle added the comment: Here's the error: ``` Traceback (most recent call last): File "", line 1, in File "src/lxml/etree.pyx", line 2291, in lxml.etree._ElementTree.xpath File "src/lxml/etree.pyx", line 1869, in lxml.etree._ElementTree._assertHasRoot AssertionError:

[issue38910] AssertionError: ElementTree not initialized, missing root

2019-11-25 Thread Joseph Reagle
New submission from Joseph Reagle : I've attached a simple XHTML file with which the 3.8 interpreter throws an error on the following code, but 3.7 does not. (You'll have to change the path in the code below.) ``` from io import StringIO, BytesIO from lxml import etree import os import

[issue38884] __import__ is not thread-safe on Python 3

2019-11-25 Thread Valentyn Tymofieiev
Valentyn Tymofieiev added the comment: @brett.cannon, looks like I inadvertently dropped you from nosy list, so in case you missed the updates - please take a look at issue38884.zip. Thank you. -- ___ Python tracker

[issue38884] __import__ is not thread-safe on Python 3

2019-11-25 Thread Valentyn Tymofieiev
Change by Valentyn Tymofieiev : -- nosy: +brett.cannon, eric.snow, ncoghlan ___ Python tracker ___ ___ Python-bugs-list mailing

[issue38884] __import__ is not thread-safe on Python 3

2019-11-25 Thread Valentyn Tymofieiev
Change by Valentyn Tymofieiev : -- nosy: +Valentyn Tymofieiev -brett.cannon ___ Python tracker ___ ___ Python-bugs-list mailing

[issue38884] __import__ is not thread-safe on Python 3

2019-11-25 Thread Valentyn Tymofieiev
Change by Valentyn Tymofieiev : -- nosy: +brett.cannon -Valentyn Tymofieiev ___ Python tracker ___ ___ Python-bugs-list mailing

[issue21063] Touch up one-line descriptions of modules for module index

2019-11-25 Thread miss-islington
miss-islington added the comment: New changeset 089387ed1f47d9443b5f28bb1863294eeac2de08 by Miss Islington (bot) in branch '3.8': bpo-21063: Improve module synopsis for distutils (GH-17363) https://github.com/python/cpython/commit/089387ed1f47d9443b5f28bb1863294eeac2de08 -- nosy:

[issue21063] Touch up one-line descriptions of modules for module index

2019-11-25 Thread miss-islington
Change by miss-islington : -- pull_requests: +16865 pull_request: https://github.com/python/cpython/pull/17383 ___ Python tracker ___

[issue21063] Touch up one-line descriptions of modules for module index

2019-11-25 Thread Brett Cannon
Change by Brett Cannon : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue21063] Touch up one-line descriptions of modules for module index

2019-11-25 Thread miss-islington
Change by miss-islington : -- pull_requests: +16864 pull_request: https://github.com/python/cpython/pull/17382 ___ Python tracker ___

[issue21063] Touch up one-line descriptions of modules for module index

2019-11-25 Thread miss-islington
Change by miss-islington : -- pull_requests: +16863 pull_request: https://github.com/python/cpython/pull/17381 ___ Python tracker ___

[issue21063] Touch up one-line descriptions of modules for module index

2019-11-25 Thread Brett Cannon
Brett Cannon added the comment: New changeset f8a6316778faff3991144c3aec4fa92d7b30a72b by Brett Cannon (Sanchit Khurana) in branch 'master': bpo-21063: Improve module synopsis for distutils (GH-17363) https://github.com/python/cpython/commit/f8a6316778faff3991144c3aec4fa92d7b30a72b

[issue38500] Provide a way to get/set PyInterpreterState.frame_eval without needing to access interpreter internals

2019-11-25 Thread STINNER Victor
STINNER Victor added the comment: Fabio: "I don't really see a problem in breaking the API in major releases (so, having access for it in the internal API but without a backwards-compatibility guarantee seems like a good fit for me)." In Python, the internal C API now means that you have to

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

2019-11-25 Thread Steve Dower
Steve Dower added the comment: > Perhaps generalize this as splitext(basename(sys.executable))[0] in > order to support names other than "python" and "pythonw". It would have > to handle quoting enough to ignore an initial double quote when parsing > the executable name out of an args string,

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

2019-11-25 Thread Terry J. Reedy
Change by Terry J. Reedy : -- pull_requests: +16862 pull_request: https://github.com/python/cpython/pull/17380 ___ Python tracker ___

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

2019-11-25 Thread Terry J. Reedy
Change by Terry J. Reedy : -- pull_requests: +16861 pull_request: https://github.com/python/cpython/pull/17379 ___ Python tracker ___

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

2019-11-25 Thread Eryk Sun
Eryk Sun added the comment: > Possibly we could handle "python[.exe]" literals by substituting > sys.executable transparently? Perhaps generalize this as splitext(basename(sys.executable))[0] in order to support names other than "python" and "pythonw". It would have to handle quoting

[issue38890] A subprocess.Popen created with creationFlags=DETACHED_PROCESS on Windows should not emit a ResourceWarning

2019-11-25 Thread Eryk Sun
Eryk Sun added the comment: > Didn't we clean up this warning completely on Windows recently? It > apparently matters on POSIX to join() the child process, but on > Windows you aren't going to leak any resources by just forgetting > about it, so I thought we stopped tracking them entirely.

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

2019-11-25 Thread Steve Dower
Steve Dower added the comment: > `shutil.which` could be a direction, but still not enough since it’d break > `flit install --python=py` because that’s give you the location of py.exe, > not the actual interperter. This would be fine if you still run the process to get its sys.executable.

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

2019-11-25 Thread Tzu-ping Chung
Tzu-ping Chung added the comment: To provide concrete context, the problem I’m facing is with how Flit resolves `flit install --python`: https://github.com/takluyver/flit/blob/7e65ffc7a540d76b96de0df473d3edff6f97c26c/flit/__init__.py#L18-L28 Generally the setup is to install Flit into a

[issue38890] A subprocess.Popen created with creationFlags=DETACHED_PROCESS on Windows should not emit a ResourceWarning

2019-11-25 Thread Steve Dower
Steve Dower added the comment: Didn't we clean up this warning completely on Windows recently? It apparently matters on POSIX to join() the child process, but on Windows you aren't going to leak any resources by just forgetting about it, so I thought we stopped tracking them entirely.

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

2019-11-25 Thread Steve Dower
Steve Dower added the comment: As a general statement (I haven't taken the time yet to understand all the intricacies of this particular issue), I would prefer to see CopyFile used everywhere on Windows for the performance and reliability benefits. Perfect POSIX emulation here doesn't seem

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

2019-11-25 Thread Steve Dower
Steve Dower added the comment: Yeah, this definitely relates to how Windows handles unqualified argv[0] in CreateProcess. Though I thought we checked that out in another issue and decided that "most" people are correctly using sys.executable here? (Or decided that it was documented well

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

2019-11-25 Thread Brett Cannon
Brett Cannon added the comment: @Vinay you got exactly what I mean. I had to actually teach a ton of people that shell trick with basename and pwd on Twitter, that trick doesn't seem to be something people know about, and yet a ton of people seem to be creating virtual environments with

[issue38890] A subprocess.Popen created with creationFlags=DETACHED_PROCESS on Windows should not emit a ResourceWarning

2019-11-25 Thread Eryk Sun
Change by Eryk Sun : -- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware ___ Python tracker ___ ___

[issue38890] A subprocess.Popen created with creationFlags=DETACHED_PROCESS on Windows should not emit a ResourceWarning

2019-11-25 Thread Eryk Sun
Eryk Sun added the comment: For a console application, normally the system connects to either the console that's inherited from the parent or, if no console is inherited, a newly allocated console. The creation flag DETACHED_PROCESS sets the initial console handle in the child to a special

[issue38895] performance degradation creating a mock object (by factor 7-8)

2019-11-25 Thread Marcel Zięba
Marcel Zięba added the comment: "It seems creating the signature of NonCallableMock.__init__ per mock creation is expensive and since it doesn't change can we just create the signature once and set it as a module level attribute? There might still be room for some more optimisations here to

[issue36375] PEP 499 implementation: "python -m foo" binds the main module as both __main__ and foo in sys.modules

2019-11-25 Thread Eric Snow
Eric Snow added the comment: FWIW, I have some feedback on the PEP. (See msg357448.) Can we discuss here or should I open a mailing list thread? -- nosy: +eric.snow ___ Python tracker

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

2019-11-25 Thread Eric Snow
Eric Snow added the comment: In the meantime that leaves the workarounds that @crusaderky originally identified. You could also: * manually run __main__ in the subinterpreter first (sort of like multiprocessing does automatically); this works because the namespace of __main__ is not reset

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

2019-11-25 Thread Eric Snow
Eric Snow added the comment: Yeah, the case of pickle + __main__ is an awkward one. [1] However, the approach taken by multiprocessing isn't the right one for subinterpreters. Multiprocessing operates under 2 design points that do not apply to subinterpreters: * every process is running

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

2019-11-25 Thread Jon Nalley
Jon Nalley added the comment: Please see a detailed explanation of the behavior here: https://gist.github.com/jnalley/cec21bca2d865758bc5e23654df28bd5 -- ___ Python tracker

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

2019-11-25 Thread JIanqiu Tao
Change by JIanqiu Tao : -- keywords: +patch pull_requests: +16860 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17378 ___ Python tracker ___

[issue38909] module name 'stat.py'

2019-11-25 Thread Zachary Ware
Zachary Ware added the comment: It's not clear what you're reporting here, but it looks like the classic issue that naming your module the same as one in the standard library will cause things to break. There are numerous other issues about that; please find the active one if you have

[issue38909] module name 'stat.py'

2019-11-25 Thread da-dada
New submission from da-dada : well, call your module 'stat.py' and python takes over full ownership: it's somewhat all public.. -- components: Windows messages: 357444 nosy: da-dada, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title:

[issue20928] xml.etree.ElementInclude does not include nested xincludes

2019-11-25 Thread Stefan Behnel
Stefan Behnel added the comment: I think setting "xml:base" from ElementInclude is worth another ticket. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.9 -Python 3.8 ___ Python tracker

[issue38576] CVE-2019-18348: CRLF injection via the host part of the url passed to urlopen()

2019-11-25 Thread Riccardo Schirone
Riccardo Schirone added the comment: The glibc issue mentioned in the first comment is CVE-2016-10739 . -- ___ Python tracker ___

[issue20928] xml.etree.ElementInclude does not include nested xincludes

2019-11-25 Thread Stefan Behnel
Stefan Behnel added the comment: New changeset c6a7bdb356835c9d7513b1ea6846683d446fe6c3 by Stefan Behnel in branch 'master': bpo-20928: support base-URL and recursive includes in etree.ElementInclude (#5723) https://github.com/python/cpython/commit/c6a7bdb356835c9d7513b1ea6846683d446fe6c3

[issue38870] Expose ast.unparse in the ast module

2019-11-25 Thread Batuhan
Change by Batuhan : -- pull_requests: +16859 pull_request: https://github.com/python/cpython/pull/17377 ___ Python tracker ___ ___

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

2019-11-25 Thread Eryk Sun
Eryk Sun added the comment: > "running an unqualified python and expecting a PATH search to pick up > the same executable as the parent shell would is not supported and may > produce unexpected results" CreateProcessW finds "python.exe" in __APPDIR__ before it even searches PATH. I expect

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

2019-11-25 Thread Paul Moore
Paul Moore added the comment: I presume there's also the option of setting up the environment (or however it's done now - I know the details changed as the feature was developed) so that the "base" python.exe pretends to be the venv one, exactly as the wrapper does. However, that may well

[issue38870] Expose ast.unparse in the ast module

2019-11-25 Thread miss-islington
miss-islington added the comment: New changeset dedfbc33011dd39b7b1c86a5adfacc4943f3 by Miss Islington (bot) (Pablo Galindo) in branch 'master': bpo-38870: Remove dependency on contextlib to avoid performance regression on import (GH-17376)

[issue38870] Expose ast.unparse in the ast module

2019-11-25 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +16858 pull_request: https://github.com/python/cpython/pull/17376 ___ Python tracker ___

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

2019-11-25 Thread Eryk Sun
Eryk Sun added the comment: > whens searching for executables, Windows gives "exes that are in the > same directory as the currently executing code" priority over PATH. That subprocess lets CreateProcessW use a platform-dependent search that prioritizes the application directory has come up

[issue38881] unexpected behaviour of random.choices with zero weights

2019-11-25 Thread Iza Romanowska
Iza Romanowska added the comment: Many thanks for patching it! Much appreciated. -- ___ Python tracker ___ ___ Python-bugs-list

[issue38895] performance degradation creating a mock object (by factor 7-8)

2019-11-25 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Another point is that _spec_asyncs is a list of attributes that pass asyncio.iscoroutinefunction which could be also little expensive [0]. The check is made for the attribute to be async only when the child mock is created to return an AsyncMock

[issue38893] broken container/selinux integration

2019-11-25 Thread Leif Middelschulte
Leif Middelschulte added the comment: For the sake of completeness, the content of `/tmp/test.py`: ``` #!/usr/bin/env python3 from shutil import copy2 copy2('/tmp/some_file', '/relabel_bug/failure') ``` -- ___ Python tracker

[issue38893] broken container/selinux integration

2019-11-25 Thread Leif Middelschulte
Leif Middelschulte added the comment: > Could you please provide name and value of the setxattr() call? I bet it's > trying to setxattr 'security.selinux' extended file attribute. (Pdb) bt full /usr/lib64/python3.7/pdb.py(1701)main() -> pdb._runscript(mainpyfile)

[issue38854] Decorator breaks inspect.getsource

2019-11-25 Thread PCManticore
PCManticore added the comment: Thanks for the report! Turns out this was a bug in ``inspect.BlockFinder`` which is responsible for extracting out the source code from a given block. This class was considering ")" inside a decorator call as closing the decorator itself, even when the

[issue38854] Decorator breaks inspect.getsource

2019-11-25 Thread PCManticore
Change by PCManticore : -- keywords: +patch pull_requests: +16857 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17374 ___ Python tracker ___

[issue38895] performance degradation creating a mock object (by factor 7-8)

2019-11-25 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Thanks Marcel for the pointer. I can confirm the performance impact. This occurs in the common case where not being an AsyncMock the signature of NonCallableMock.__init__ is created every time and then bind_partial is used to detect the spec being

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

2019-11-25 Thread Paul Moore
Paul Moore added the comment: Yes, it does. I think we'd need input from Steve Dower here, as these changes were made (I believe) in support of the Windows Store build of Python, so any changes would need to be considered in the light of how they would affect that. I do, however, consider

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

2019-11-25 Thread Tzu-ping Chung
Tzu-ping Chung added the comment: I tested the following in various versions (all 64-bit) in a VM. All installations are 64-bit per-user. > py -m venv testenv > testenv\Scripts\python.exe -c "import subprocess; > print(subprocess.check_output(['python', '-c', 'import sys; >

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

2019-11-25 Thread Paul Moore
Paul Moore added the comment: The behaviour in this area is different between 3.7.0, 3.7.2, and 3.7.3 (at least). I have reproduced the issue with 3.7.3. Steve Dower made changes to the way the python executable works in venvs in the point releases of 3.7 - see