[issue38893] broken container/selinux integration

2019-11-21 Thread Christian Heimes
Christian Heimes added the comment: >From the Github bug: copy2() fails while copying extended attributes. # python3 Python 3.7.4 (default, Aug 12 2019, 14:45:07) [GCC 9.1.1 20190605 (Red Hat 9.1.1-2)] on linux Type "help", "copyright", "credits" or "license" for more information. >>>

[issue38021] pep425 tag for AIX is inadequate

2019-11-21 Thread Michael Felt
Michael Felt added the comment: a) - thanks Ned, for the kind words. b) - the proposed (change to the tag) is "AIX.VRTL.YYWW.SZ". "AIX" - in caps, to distinguish from current tag starting as "aix" VRTL - 4 digit number, one digit for Version, one digit as Revision, and two digits for

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

2019-11-21 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: +mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38893] broken container/selinux integration

2019-11-21 Thread Leif Middelschulte
New submission from Leif Middelschulte : It seems Python does not necessarily determine that it is running inside a container correctly. This leads to broken/unexpected behavior when trying to copy files across filesytems using `copy2`. This directly affects Python3 inside the official

[issue38863] Improve is_cgi() in http.server

2019-11-21 Thread Dong-hee Na
Change by Dong-hee Na : -- nosy: +Rhodri James, ethan.furman -corona10 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue38874] asyncio.Queue: putting items out of order when it is full

2019-11-21 Thread Junyeong Jeong
Junyeong Jeong added the comment: Thanks for having an interest in this issue. I thought asyncio.Queue guarantees the order of items as .put called after I read the code. But it does not. I attach poc code here. In my machine, this program prints this message and exits. $ python

[issue33387] Simplify bytecodes for try-finally, try-except and with blocks.

2019-11-21 Thread Gregory P. Smith
Gregory P. Smith added the comment: sweet! =) -- versions: +Python 3.9 -Python 3.8 ___ Python tracker ___ ___ Python-bugs-list

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

2019-11-21 Thread Gregory P. Smith
Gregory P. Smith added the comment: +1 to re-exposing a way to do PEP-523. PEP-523 added a public API, we unintentionally hid it behind the mask of Py_BUILD_CORE_MODULE in 3.8. We shouldn't remove PEP-523's abilities without a deprecation cycle. But given the use cases tend to be "deep"

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

2019-11-21 Thread Gregory P. Smith
Change by Gregory P. Smith : -- nosy: +gregory.p.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue24995] better exception message when an unsupported object is passed to `async for` (pep 492)

2019-11-21 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : Removed file: https://bugs.python.org/file48739/TransactionHistory-79b28f7d5748ad20cb8afb107f00330adbcd6d81.csv ___ Python tracker ___

[issue24995] better exception message when an unsupported object is passed to `async for` (pep 492)

2019-11-21 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- components: -2to3 (2.x to 3.x conversion tool) type: resource usage -> enhancement versions: -Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8 ___ Python tracker

[issue38526] zipfile.Path has the wrong method name

2019-11-21 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Closing as fixed since PRs are merged. Thanks Alex for the report and @Claudiu.Popa for the patch. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

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

2019-11-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: Alternatively, we could raise an exception if the weight total isn't positive. Am not sure that has any real worth, but it could be done with only a small additional cost to the critical path. -- ___ Python

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

2019-11-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: > When zero weights are given, the last element of a sequence > is always chosen. Given non-sensical input, that behavior is as reasonable as any other (fwiw, the same is also observed with all negative weights, even if the negative weights are

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

2019-11-21 Thread Raymond Hettinger
Change by Raymond Hettinger : -- nosy: +tim.peters ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38882] IDLE should not make the about dialog be a transient of the withdrawn root window

2019-11-21 Thread Terry J. Reedy
Terry J. Reedy added the comment: The NMT doc adds "A transient window always appears in front of its parent." and I believe that this is why we use it and why I would not want to unconditionally delete the calls without thorough testing on both Linux and Windows. IDLE calls this function

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

2019-11-21 Thread Valentyn Tymofieiev
Change by Valentyn Tymofieiev : -- versions: +Python 3.8 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

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

2019-11-21 Thread Bernie Hackett
Change by Bernie Hackett : -- nosy: +behackett ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38892] Audit Hook doc typos and confusion

2019-11-21 Thread Terry J. Reedy
New submission from Terry J. Reedy : Some suggestions for https://docs.python.org/3.9/c-api/sys.html#c.PySys_AddAuditHook https://docs.python.org/3.9/library/sys.html#sys.addaudithook "Adds to the collection of active auditing hooks" "Adds the callable hook to the collection of active auditing

[issue38891] ShareableList read and write access is O(N), should be O(1)

2019-11-21 Thread Jake Northey
New submission from Jake Northey : For an illustration of the performance implications of the __getitem__ and __setitem__ implementation, see the article below. https://medium.com/@rvprasad/performance-of-system-v-style-shared-memory-support-in-python-3-8-d7a7d1b1fb96 The issue appears to be

[issue24995] better exception message when an unsupported object is passed to `async for` (pep 492)

2019-11-21 Thread SAKCHAI SUKWISET
Change by SAKCHAI SUKWISET : -- components: +2to3 (2.x to 3.x conversion tool) type: enhancement -> resource usage versions: +Python 2.7, Python 3.7, Python 3.8, Python 3.9 Added file: https://bugs.python.org/file48739/TransactionHistory-79b28f7d5748ad20cb8afb107f00330adbcd6d81.csv

[issue38889] Segmentation fault when using EPF Importer

2019-11-21 Thread Eric V. Smith
Eric V. Smith added the comment: I agree this doesn't look like a python bug. However, if the original poster can reproduce it with a short example with no third party code, we could take another look. If so, please re-open this issue. And just because the code worked on a different version

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

2019-11-21 Thread Shane Harvey
New submission from Shane Harvey : In https://bugs.python.org/issue26741 Popen was changed to emit a ResourceWarning in __del__ if the process is still running. However, when running a daemon/detached process it is completely valid to delete a Popen object before the process is complete. On

[issue38021] pep425 tag for AIX is inadequate

2019-11-21 Thread Ned Deily
Ned Deily added the comment: Brett, sorry I wasn't more explicit about my concerns here. I added you and Nick to this issue and to its PR not primarily to do do code review but because I think it brings up issues that I believe haven't been dealt with before in our evolving environment and

[issue36225] Lingering subinterpreters should be implicitly cleared on shutdown

2019-11-21 Thread Joannah Nanjekye
Joannah Nanjekye added the comment: Am abit swamped and sick atm. You can go on and submit a fix. -- ___ Python tracker ___ ___

[issue36854] GC operates out of global runtime state.

2019-11-21 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +16818 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/17331 ___ Python tracker ___

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

2019-11-21 Thread Valentyn Tymofieiev
Valentyn Tymofieiev added the comment: The behavior changes between Python 3.2 (no deadlock) and Python 3.3 (deadlock). Deadlock also reproducible on Python 3.8. -- ___ Python tracker

[issue38889] Segmentation fault when using EPF Importer

2019-11-21 Thread Sebastian Szwarc
Sebastian Szwarc added the comment: Previous python version didnt do segmentation fault. Code is the same as before and it worked fine previously ergo code is correct and this is python interpreter issue On Thu, Nov 21, 2019 at 11:45 PM STINNER Victor wrote: > > > STINNER Victor added the

[issue38889] Segmentation fault when using EPF Importer

2019-11-21 Thread STINNER Victor
STINNER Victor added the comment: It looks like a bug in EPF Importer: in ingestIncremental(), line 206 of EPFIngester.py. I don't think that it's a bug in Python. I suggest to clos ethe issue. -- nosy: +vstinner ___ Python tracker

[issue38858] new_interpreter() should reuse more Py_InitializeFromConfig() code

2019-11-21 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +16817 pull_request: https://github.com/python/cpython/pull/17330 ___ Python tracker ___

[issue38889] Segmentation fault when using EPF Importer

2019-11-21 Thread Sebastian Szwarc
Sebastian Szwarc added the comment: PYTHONFAULTHANDLER=1 python EPFImporter_debug.py incremental/* 2019-11-21 23:34:09,787 [INFO]: Beginning import for the following directories: incremental/itunes20191120 incremental/pricing20191120 2019-11-21 23:34:09,787 [INFO]: Importing files in

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

2019-11-21 Thread Valentyn Tymofieiev
Valentyn Tymofieiev added the comment: input_deadlock.py in issue38884.zip has a left-over comment: # Requires pip install tensorflow==2.0.0 tensorflow-transform==0.15.0 Please ignore that. -- ___ Python tracker

[issue38889] Segmentation fault when using EPF Importer

2019-11-21 Thread Sebastian Szwarc
New submission from Sebastian Szwarc : Python 2.7 on Ubuntu 18.04 LTS is not in latest version. Both version 2.7.14 and 15 RC1 bringing segmentation fault error. Code is the same and previously there was no error. COde is EPFImporter.py tool written by Apple to handle importing of their

[issue16576] ctypes: structure with bitfields as argument

2019-11-21 Thread Vinay Sajip
Change by Vinay Sajip : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

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

2019-11-21 Thread Valentyn Tymofieiev
Valentyn Tymofieiev added the comment: Repro: unpack issue38884.zip python input_deadlock.py (fails on Python 3.7, but not on 2.7). -- ___ Python tracker ___

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

2019-11-21 Thread Valentyn Tymofieiev
Valentyn Tymofieiev added the comment: Attaching a minimal repro with simple project hierarchy. -- nosy: -brett.cannon, eric.snow, ncoghlan Added file: https://bugs.python.org/file48737/issue38884.zip ___ Python tracker

[issue38765] `ast.AST._attributes` is used by `ast.dump()` but not documented

2019-11-21 Thread Pekka Klärck
Pekka Klärck added the comment: I'd say `_attributes` is already exposed as defining it in your own node affects many of the functions in the ast module. For example, `ast.dump(node, include_attributes=True)` makes no sense otherwise. Whatever was the reason for the leading underscore must

[issue38888] Popen should use pidfd_open to implement a non-busy wait

2019-11-21 Thread Роман Донченко
Роман Донченко added the comment: Right, of course. I keep confusing it with timerfd_create. -- title: Popen should use pidfd_create to implement a non-busy wait -> Popen should use pidfd_open to implement a non-busy wait ___ Python tracker

[issue38888] Popen should use pidfd_create to implement a non-busy wait

2019-11-21 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +benjamin.peterson, gregory.p.smith ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue16576] ctypes: structure with bitfields as argument

2019-11-21 Thread Vinay Sajip
Vinay Sajip added the comment: New changeset 91c15a542cb780377dcde8fc17ba93111bc1d1cf by Vinay Sajip (Miss Islington (bot)) in branch '3.7': [3.7] bpo-16576: Add checks for bitfields passed by value to functions. (GH-17097) (GH-17224)

[issue38888] Popen should use pidfd_create to implement a non-busy wait

2019-11-21 Thread STINNER Victor
STINNER Victor added the comment: os.pidfd_open() was added to Python 3.9. Do you mean pidfd_open()? -- nosy: +vstinner ___ Python tracker ___

[issue38888] Popen should use pidfd_create to implement a non-busy wait

2019-11-21 Thread Роман Донченко
New submission from Роман Донченко : Popen.wait(timeout) is currently implemented on Unix-like systems using a busy wait, since the waitpid system call doesn't have a timeout argument. On Linux, it's now possible to do better than that. You can create a PID file descriptor using pidfd_create

[issue38526] zipfile.Path has the wrong method name

2019-11-21 Thread miss-islington
miss-islington added the comment: New changeset 107ed88cde3ae6f1cb01ae75575ea0f92c138464 by Miss Islington (bot) in branch '3.8': bpo-38526: Fix zipfile.Path method name to be the correct one (GH-17317) https://github.com/python/cpython/commit/107ed88cde3ae6f1cb01ae75575ea0f92c138464

[issue38526] zipfile.Path has the wrong method name

2019-11-21 Thread miss-islington
Change by miss-islington : -- pull_requests: +16816 pull_request: https://github.com/python/cpython/pull/17329 ___ Python tracker ___

[issue38887] test_asyncio: test_pipe_handle() failed on AMD64 Windows7 SP1 3.x

2019-11-21 Thread STINNER Victor
New submission from STINNER Victor : https://buildbot.python.org/all/#/builders/40/builds/3465 ERROR: test_pipe_handle (test.test_asyncio.test_windows_utils.PipeTests) -- Traceback (most recent call last): File

[issue38721] modulefinder should use import hooks properly

2019-11-21 Thread Dominic Littlewood
Dominic Littlewood <11dlittlew...@gmail.com> added the comment: You are correct about modulefinder being static. I read "run_script" and thought it was running a script, but it turns out I was being silly. I shall correct the sys.path issue. --

[issue38526] zipfile.Path has the wrong method name

2019-11-21 Thread Jason R. Coombs
Jason R. Coombs added the comment: New changeset 65444cf7fe84d8ca1f9b51c7f5992210751e08bb by Jason R. Coombs (Claudiu Popa) in branch 'master': bpo-38526: Fix zipfile.Path method name to be the correct one (#17317)

[issue37228] UDP sockets created by create_datagram_endpoint() allow by default multiple processes to bind the same port

2019-11-21 Thread Kyle Stanley
Kyle Stanley added the comment: > some platforms apparently do have SO_REUSEPORT defined but the option still > doesn't work, resulting in a ValueError exception from > create_datagram_endpoint(). Are you aware of what currently supported platforms have SO_REUSEPORT defined where the

[issue38883] Path.home() should ignore HOME env var like os.path.expanduser()

2019-11-21 Thread Brett Cannon
Change by Brett Cannon : -- nosy: +brett.cannon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38870] Expose ast.unparse in the ast module

2019-11-21 Thread Brett Cannon
Change by Brett Cannon : -- nosy: +brett.cannon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38721] modulefinder should use import hooks properly

2019-11-21 Thread Brandt Bucher
Brandt Bucher added the comment: See prior discussion on this here: https://github.com/python/cpython/pull/11787#discussion_r256442282 -- ___ Python tracker ___

[issue38721] modulefinder should use import hooks properly

2019-11-21 Thread Brandt Bucher
Brandt Bucher added the comment: I'm not sure what you mean when you say "modulefinder currently will detect modules imported by a script dynamically by running the script"... modulefinder is completely static, no? I also think that changing sys.path like this is a bad idea (I tried this in

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

2019-11-21 Thread Brett Cannon
Brett Cannon added the comment: Can you test this with a package that isn't tensorflow (e.g. something else in the stdlib or something created manually; basically a smaller reproducer)? It's hard to diagnose if this is really Python or not without a smaller reproducer as tensorflow might be

[issue38878] os.PathLike subclasshook causes subclass checks true on abstract implementation

2019-11-21 Thread Brett Cannon
Brett Cannon added the comment: Ah, your `assert` call threw me since it does succeed so it isn't acting as a test case. -- resolution: not a bug -> status: closed -> open ___ Python tracker

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

2019-11-21 Thread Brett Cannon
Change by Brett Cannon : -- nosy: +brett.cannon, eric.snow, ncoghlan ___ Python tracker ___ ___ Python-bugs-list mailing list

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

2019-11-21 Thread Brett Cannon
Brett Cannon added the comment: Posted https://mail.python.org/archives/list/python-...@python.org/thread/4UZJYAZL3NHRAGN5WAMJC4IHAHEXF3QF/ to see if anyone else wants to weigh in. -- ___ Python tracker

[issue38886] permissions too restrictive in zipfile.writestr

2019-11-21 Thread Raphael Dussin
Change by Raphael Dussin : -- keywords: +patch pull_requests: +16814 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17327 ___ Python tracker ___

[issue37334] Add a cancel method to asyncio Queues

2019-11-21 Thread Andrew Svetlov
Andrew Svetlov added the comment: 1. Suppose we have 2 concurrent producers, a single queue and a consumer. 2. The first producer puts several items into the queue and then calls q.close() 3. The second producer also puts several items. It doesn't matter the second producer closes the queue

[issue38886] permissions too restrictive in zipfile.writestr

2019-11-21 Thread Raphael Dussin
New submission from Raphael Dussin : zipfile.writestr write with permissions 600 by default and there is no way to override permissions. This can be an issue when writing zip archive of data one want to share (e.g. zarr zipstore, see https://github.com/zarr-developers/zarr-python/pull/517)

[issue38878] os.PathLike subclasshook causes subclass checks true on abstract implementation

2019-11-21 Thread Bar Harel
Bar Harel added the comment: Hey Brett, that's exactly the bug. It's supposed to be False ofc. On Thu, Nov 21, 2019, 9:45 PM Brett Cannon wrote: > > Brett Cannon added the comment: > > I can't reproduce in Python 3.8.0: > > >>> import os > >>> class A(os.PathLike): pass > ... > >>> class

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

2019-11-21 Thread Brett Cannon
Brett Cannon added the comment: @Mark > PEP 523 makes no mention of adding a getter or setter. > Adding them is a big change to Python semantics and shouldn't, IMO, be done > without a PEP that explicit states they are going to be added. Adding getters or setters for something that was

[issue38721] modulefinder should use import hooks properly

2019-11-21 Thread Dominic Littlewood
Change by Dominic Littlewood <11dlittlew...@gmail.com>: -- keywords: +patch pull_requests: +16813 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17326 ___ Python tracker

[issue38885] Have os.PathLike inherit from typing.Protocol

2019-11-21 Thread Brett Cannon
Brett Cannon added the comment: Closing as importing 'typing' in 'os' is probably too much and would impact start-up time. -- resolution: -> rejected stage: -> resolved status: open -> closed ___ Python tracker

[issue38885] Have os.PathLike inherit from typing.Protocol

2019-11-21 Thread Brett Cannon
New submission from Brett Cannon : Since os.PathLike explicitly defines a a protocol, it would make sense to have it inherit from typing.Protocol instead of abc.ABC. -- components: Library (Lib) messages: 357206 nosy: brett.cannon priority: normal severity: normal status: open title:

[issue38878] os.PathLike subclasshook causes subclass checks true on abstract implementation

2019-11-21 Thread Brett Cannon
Brett Cannon added the comment: I can't reproduce in Python 3.8.0: >>> import os >>> class A(os.PathLike): pass ... >>> class B: ... def __fspath__(self): pass ... >>> issubclass(B, A) True Did you check against an older version of Python? -- resolution: -> not a bug stage: ->

[issue37334] Add a cancel method to asyncio Queues

2019-11-21 Thread Yury Selivanov
Yury Selivanov added the comment: This seems like a useful idea. I recommend to write a test implementation and play with it. Andrew: > I think the proposal makes the queues API more error-prone: concurrent put() > and close() produces unpredictable result on get() side. How? Can you

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

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

[issue38021] pep425 tag for AIX is inadequate

2019-11-21 Thread Brett Cannon
Brett Cannon added the comment: I'm not in a good position to review distutils stuff. -- ___ Python tracker ___ ___

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

2019-11-21 Thread Valentyn Tymofieiev
Valentyn Tymofieiev added the comment: Possibly related: https://bugs.python.org/issue35943 -- ___ Python tracker ___ ___

[issue35943] PyImport_GetModule() can return partially-initialized module

2019-11-21 Thread Valentyn Tymofieiev
Valentyn Tymofieiev added the comment: Thanks. Is it possible that this issue and https://bugs.python.org/issue38884 are duplicates? -- ___ Python tracker ___

[issue34572] C unpickling bypasses import thread safety

2019-11-21 Thread Valentyn Tymofieiev
Valentyn Tymofieiev added the comment: While investigating[1], I observe that certain unpickling operations, for example, Unpickler.find_class, remain not thread-safe in Python 3.7.5 and earlier versions that I tried. I have not tried 3.8, but cannot reproduce this error on Python 2. For

[issue34572] C unpickling bypasses import thread safety

2019-11-21 Thread Valentyn Tymofieiev
Change by Valentyn Tymofieiev : Added file: https://bugs.python.org/file48736/find_class_deadlock.py ___ Python tracker ___ ___

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

2019-11-21 Thread Valentyn Tymofieiev
Valentyn Tymofieiev added the comment: Attached import_deadlock.py fails with ... File "", line 980, in _find_and_load File "", line 149, in __enter__ File "", line 94, in acquire _frozen_importlib._DeadlockError: deadlock detected by

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

2019-11-21 Thread Valentyn Tymofieiev
New submission from Valentyn Tymofieiev : Attached import_module_not_found.py consistently fails for me on Python 3.7.5 and earlier Python 3 versions that I have tried with File "/usr/lib/python3.7/threading.py", line 926, in _bootstrap_inner self.run() File

[issue38883] Path.home() should ignore HOME env var like os.path.expanduser()

2019-11-21 Thread Anthony Sottile
Change by Anthony Sottile : -- nosy: +Anthony Sottile ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38883] Path.home() should ignore HOME env var like os.path.expanduser()

2019-11-21 Thread Batuhan
Change by Batuhan : -- versions: +Python 3.8 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38883] Path.home() should ignore HOME env var like os.path.expanduser()

2019-11-21 Thread Batuhan
Change by Batuhan : -- nosy: +BTaskaya, steve.dower versions: +Python 3.9 -Python 3.8 ___ Python tracker ___ ___ Python-bugs-list

[issue38883] Path.home() should ignore HOME env var like os.path.expanduser()

2019-11-21 Thread Christoph Reiter
New submission from Christoph Reiter : In issue36264 os.path.expanduser() was changed to no longer use the HOME environment variable on Windows. There are two more ways in the stdlib to get the user directory, pathlib.Path.home() and pathlib.Path.expanduser() which internally use

[issue36264] os.path.expanduser should not use HOME on windows

2019-11-21 Thread Christoph Reiter
Christoph Reiter added the comment: I've filed issue38883 -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38882] IDLE should not make the about dialog be a transient of the withdrawn root window

2019-11-21 Thread Marc Culler
New submission from Marc Culler : The soon-to-be-released Tcl/Tk 8.6.10 includes some changes to the macOS port which cause the wm transient command to behave in the way that the Tk manual says it should: "A transient window will mirror state changes in the master and inherit the state of

[issue36264] os.path.expanduser should not use HOME on windows

2019-11-21 Thread Christoph Reiter
Christoph Reiter added the comment: > Was pathlib forgotten here? Pathlib.home() is documented to return > the same as expanduser("~") but it still prefers HOME instead of > USERPROFILE. > > Yes, it was forgotten (why doesn't it just use expanduser?). We > should file a new bug for that.

[issue36225] Lingering subinterpreters should be implicitly cleared on shutdown

2019-11-21 Thread Lewis Gaul
Lewis Gaul added the comment: I've put together a test along the lines of what Nick suggested, see the attached patch. Running this hits the Fatal 'remaining subinterpreters' error as expected: ``` > ./Programs/_testembed test_bpo36225 --- Pass 0 --- interp 0 <0x1A561A0>, thread state

[issue38857] AsyncMock issue with awaitable return_value/side_effect/wraps

2019-11-21 Thread Lisa Roach
Change by Lisa Roach : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue36264] os.path.expanduser should not use HOME on windows

2019-11-21 Thread Steve Dower
Steve Dower added the comment: > Was pathlib forgotten here? Pathlib.home() is documented to return the same > as expanduser("~") but it still prefers HOME instead of USERPROFILE. Yes, it was forgotten (why doesn't it just use expanduser?). We should file a new bug for that. > Note that

[issue38859] AsyncMock says it raises StopIteration but that is Impossible

2019-11-21 Thread Lisa Roach
Lisa Roach added the comment: PR merged, thanks Jason! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue38857] AsyncMock issue with awaitable return_value/side_effect/wraps

2019-11-21 Thread Andrew Svetlov
Andrew Svetlov added the comment: New changeset b2744c1be73f5af0d2dc4b952389efc90c8de94e by Andrew Svetlov (Lisa Roach) in branch '3.8': [3.8] bpo-38857: AsyncMock fix for awaitable values and StopIteration fix [3.8] (GH-17269) (#17304)

[issue38877] Python 3.9 build fails under Debian 9.11

2019-11-21 Thread Ned Deily
Ned Deily added the comment: What ./configure options did you use? Did you do a make clean or equivalent between the two build attempts? If you used --enable-shared, try without it. -- nosy: +ned.deily ___ Python tracker

[issue37838] typing.get_type_hints not working with forward-declaration and decorated functions

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

[issue37838] typing.get_type_hints not working with forward-declaration and decorated functions

2019-11-21 Thread miss-islington
miss-islington added the comment: New changeset 9458c5c42bbe5fb6ef2393c9ee66f012a2c13ca3 by Miss Islington (bot) in branch '3.8': bpo-37838: get_type_hints for wrapped functions with forward reference (GH-17126)

[issue37838] typing.get_type_hints not working with forward-declaration and decorated functions

2019-11-21 Thread miss-islington
miss-islington added the comment: New changeset 30e5bd8471d7531d051796c01e8ede01ade883dc by Miss Islington (bot) in branch '3.7': bpo-37838: get_type_hints for wrapped functions with forward reference (GH-17126)

[issue38651] Add WolfSSL support

2019-11-21 Thread Daniel Johnson
Daniel Johnson added the comment: Thank you for the replied. I understand completely and I don't think it would be simple patches to try and use the compatibility layer. I have discovered that the WolfSSL compatibility layer doesn't support the full OpenSSL API. However, I have found that I

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

2019-11-21 Thread Iza Romanowska
New submission from Iza Romanowska : Hi, When zero weights are given, the last element of a sequence is always chosen. Example: hits= [] for i in range(100): hits.append(random.choices(["A","B","C","D"], [0, 0, 0, 0])[0]) print (set(hits)) >> {'D'} I guess that most users would expect

[issue37838] typing.get_type_hints not working with forward-declaration and decorated functions

2019-11-21 Thread miss-islington
Change by miss-islington : -- pull_requests: +16811 pull_request: https://github.com/python/cpython/pull/17324 ___ Python tracker ___

[issue37838] typing.get_type_hints not working with forward-declaration and decorated functions

2019-11-21 Thread miss-islington
Change by miss-islington : -- pull_requests: +16812 pull_request: https://github.com/python/cpython/pull/17325 ___ Python tracker ___

[issue37838] typing.get_type_hints not working with forward-declaration and decorated functions

2019-11-21 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: New changeset 0aca3a3a1e68b4ca2d334ab5255dfc267719096e by Ivan Levkivskyi (benedwards14) in branch 'master': bpo-37838: get_type_hints for wrapped functions with forward reference (GH-17126)

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

2019-11-21 Thread Fabio Zadrozny
Fabio Zadrozny added the comment: @Mark First you have to explain to me how you envision changing the method code reliably in the debugger... Import hooks don't work (they'd break with something as simple as the code below) def method(): a = 10 mod = reload(old_mod)

[issue36264] os.path.expanduser should not use HOME on windows

2019-11-21 Thread Christoph Reiter
Christoph Reiter added the comment: Was pathlib forgotten here? Pathlib.home() is documented to return the same as expanduser("~") but it still prefers HOME instead of USERPROFILE. Note that this change has some effect on cygwin/mingw environments which all set HOME and now potentially lead

[issue38880] Subinterpreters: List interpreters associated with a channel end

2019-11-21 Thread Lewis Gaul
Change by Lewis Gaul : -- keywords: +patch pull_requests: +16810 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17323 ___ Python tracker ___

[issue38880] Subinterpreters: List interpreters associated with a channel end

2019-11-21 Thread Lewis Gaul
New submission from Lewis Gaul : The public interpreters API being implemented for PEP 554 requires the ability to list interpreters associated with channel ends. This functionality needs adding in the internal subinterpreters module. See

[issue38879] Reordered error checking in PyArena_New().

2019-11-21 Thread Zoltán Szatmáry
Change by Zoltán Szatmáry : -- type: -> performance ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

  1   2   >