[issue38688] Python 3.8 regression: endless loop in shutil.copytree

2019-11-21 Thread Bruno P. Kinoshita
Bruno P. Kinoshita added the comment: Hi Giampaolo, I think it is more or less the same as the previous code, which was using os.list to return a list in memory. My first tentative fix was: def copytree(src, ...): entries = os.list(src) return _copytree(entries=entries, .

[issue38875] test_capi: test_trashcan_python_class1() and test_trashcan_python_class2() take one minute on my laptop

2019-11-21 Thread STINNER Victor
New submission from STINNER Victor : bpo-35983 added new tests to test_capi: test_capi now takes 1 minute 31 seconds :-( Previously, test_capi only took 9.5 seconds! commit 351c67416ba4451eb3928fa0b2e933c2f25df1a3 Author: Jeroen Demeyer Date: Fri May 10 19:21:11 2019 +0200 bpo-35983: s

[issue38875] test_capi: test_trashcan_python_class1() and test_trashcan_python_class2() take one minute on my laptop

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

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

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

[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: So after trying a few different implementations, I don't think the proposal to simply change `SO_REUSEADDR` -> `SO_REUSEPORT` will work, due to Windows incompatibility (based on the results from Azure Pipelines). `SO_REUSEADDR` is supported on Windows, but not

[issue38873] find_library for libcrypto and libssl on Catalina returns the unversioned library

2019-11-21 Thread Ned Deily
Ned Deily added the comment: How would having a "find the latest version" help here? The point is Apple does not want you to use *any* version of libcrypto in /usr/lib: they are there only for old versions of third-party apps that were linked to a specific then-current version of the system

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

2019-11-21 Thread Nathaniel Smith
Nathaniel Smith added the comment: I was assuming we'd only do this on Linux, since that's where the bug is... though now that you mention it the Windows behavior is probably wonky too. SO_REUSEADDR and SO_REUSEPORT have different semantics on all three of Windows/BSD/Linux. A higher-level i

[issue38688] Python 3.8 regression: endless loop in shutil.copytree

2019-11-21 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: The speedup introduced in issue33695 is mostly because the number of os.stat() syscall was reduced from 6 to 1 per file (both by using scandir() and because stat() results are cached and passed around between function calls). As such, even if we immediate

[issue38866] test_pyclbr replace asyncore

2019-11-21 Thread Jackson Riley
Change by Jackson Riley : -- pull_requests: +16803 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17316 ___ Python tracker ___ ___

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

2019-11-21 Thread STINNER Victor
STINNER Victor added the comment: Mark merged his PR 6641 but forgot to mention bpo-33387: commit fee552669f21ca294f57fe0df826945edc779090 Author: Mark Shannon Date: Thu Nov 21 09:11:43 2019 + Produce cleaner bytecode for 'with' and 'async with' by generating separate code for nor

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

2019-11-21 Thread STINNER Victor
STINNER Victor added the comment: The new doc seems to use Python version 3.8, but the change was merged into master which is the future Python 3.9, no? .. opcode:: RERAISE Re-raises the exception currently on top of the stack. .. versionadded:: 3.8 -- ___

[issue38688] Python 3.8 regression: endless loop in shutil.copytree

2019-11-21 Thread Bruno P. Kinoshita
Bruno P. Kinoshita added the comment: I really liked that improvement, and didn't think it needed to be removed. That's why the PR reverts it partially. I think the os.stat improvements were in the other methods changed, and should not be changed in my PR - unless I changed it by accident.

[issue36854] GC operates out of global runtime state.

2019-11-21 Thread STINNER Victor
STINNER Victor added the comment: I reopen the issue, the change introduced a reference leak :-( Example: $ ./python -m test -R 3:3 test_atexit -m test.test_atexit.SubinterpreterTest.test_callbacks_leak 0:00:00 load avg: 1.12 Run tests sequentially 0:00:00 load avg: 1.12 [1/1] test_atexit beg

[issue38526] zipfile.Path has the wrong method name

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

[issue36854] GC operates out of global runtime state.

2019-11-21 Thread STINNER Victor
STINNER Victor added the comment: Even if the test is simplified to the following code, it does still leak: def test_callbacks_leak(self): _testcapi.run_in_subinterp("pass") -- ___ Python tracker __

[issue38852] test_recursion_limit in test_threading crashes with SIGSEGV on android

2019-11-21 Thread Xavier de Gaye
Xavier de Gaye added the comment: The crash occurs only on debug builds. See the FreeBSD related issue #37906. -- ___ Python tracker ___ _

[issue37906] FreeBSD: test_threading: test_recursion_limit() crash with SIGSEGV and create a coredump

2019-11-21 Thread Xavier de Gaye
Xavier de Gaye added the comment: See the android related issue #38852. -- nosy: +xdegaye ___ Python tracker ___ ___ Python-bugs-li

[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: > I was assuming we'd only do this on Linux, since that's where the bug is... > though now that you mention it the Windows behavior is probably wonky too. Yeah, but I'm not confident that the bug is exclusive to Linux. From what I've seen, it's a fairly common

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

2019-11-21 Thread Mark Shannon
Change by Mark Shannon : -- pull_requests: +16805 pull_request: https://github.com/python/cpython/pull/17318 ___ Python tracker ___

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

2019-11-21 Thread Mark Shannon
Mark Shannon added the comment: Thanks for noticing. https://github.com/python/cpython/pull/17318 -- ___ Python tracker ___ ___ Pyt

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

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

[issue38688] Python 3.8 regression: endless loop in shutil.copytree

2019-11-21 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: PR-17098 as it stands re-introduces some stat() syscall. I suggest to just consume the iterator: it's a small change and it should fix the issue. -- ___ Python tracker _

[issue38688] Python 3.8 regression: endless loop in shutil.copytree

2019-11-21 Thread Bruno P. Kinoshita
Bruno P. Kinoshita added the comment: Done. Rebased on master too, and edited commit message & GH PR title. Thanks Giampaolo! -- ___ Python tracker ___ __

[issue29275] time module still has Y2K issues note

2019-11-21 Thread Callum Ward
Callum Ward added the comment: I'd like to work on this issue. I'll come up with a PR today. -- nosy: +callumquick ___ Python tracker ___ _

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

2019-11-21 Thread Linus Pithan
New submission from Linus Pithan : When unpickling fails one would expect a pickle.UnpicklingError exception or at least a PickleError. However, when trying pickle.loads(b"jens:") it fails with KeyError: 980643429 which is not the wanted behaviour. -- components: Library (Lib) messag

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

2019-11-21 Thread Batuhan
Change by Batuhan : -- nosy: +BTaskaya, alexandre.vassalotti versions: +Python 3.8, Python 3.9 ___ Python tracker ___ ___ Python-bug

[issue36854] GC operates out of global runtime state.

2019-11-21 Thread STINNER Victor
STINNER Victor added the comment: > test_atexit leaked [3988, 3986, 3988] references, sum=11962 The following patch fix it: diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c index 7591f069b4..f088ef0bce 100644 --- a/Python/pylifecycle.c +++ b/Python/pylifecycle.c @@ -1210,6 +1210,15 @@

[issue38875] test_capi: test_trashcan_python_class1() and test_trashcan_python_class2() take one minute on my laptop

2019-11-21 Thread STINNER Victor
STINNER Victor added the comment: New changeset 0127bb1c5c3286f87e284ff6083133bfdcfd5a4f by Victor Stinner in branch 'master': bpo-38875: test_capi: trashcan tests require cpu resource (GH-17314) https://github.com/python/cpython/commit/0127bb1c5c3286f87e284ff6083133bfdcfd5a4f -- _

[issue38875] test_capi: test_trashcan_python_class1() and test_trashcan_python_class2() take one minute on my laptop

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

[issue38692] add a pidfd child process watcher

2019-11-21 Thread STINNER Victor
STINNER Victor added the comment: New changeset 3ab479a2d1959923c9ab80c227dd1f39720b4e2d by Victor Stinner in branch 'master': bpo-38692: Skip test_posix.test_pidfd_open() on EPERM (GH-17290) https://github.com/python/cpython/commit/3ab479a2d1959923c9ab80c227dd1f39720b4e2d -- _

[issue38692] add a pidfd child process watcher

2019-11-21 Thread STINNER Victor
STINNER Victor added the comment: I pushed my "Skip test_posix.test_pidfd_open() on EPERM" change just for practical reasons. We can hope that Linux sandboxes will shortly be updated to allow pidfd_open() syscall. It should be safe for most use cases ;-) I close again the issue. --

[issue38875] test_capi: test_trashcan_python_class1() and test_trashcan_python_class2() take one minute on my laptop

2019-11-21 Thread miss-islington
miss-islington added the comment: New changeset 767b42633bb7ac39dd6743d8dd7f5b5cc122acea by Miss Islington (bot) in branch '3.8': bpo-38875: test_capi: trashcan tests require cpu resource (GH-17314) https://github.com/python/cpython/commit/767b42633bb7ac39dd6743d8dd7f5b5cc122acea --

[issue38875] test_capi: test_trashcan_python_class1() and test_trashcan_python_class2() take one minute on my laptop

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

[issue38680] PyGILState_Release does not release gil correctly, resulting in deadlock

2019-11-21 Thread Damien LEFEVRE
Damien LEFEVRE added the comment: Here is a code example reproducing the issue. -- Added file: https://bugs.python.org/file48728/interpreterlock.zip ___ Python tracker ___ ___

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

2019-11-21 Thread Andrew Svetlov
Andrew Svetlov added the comment: I still don't understand the problem. If the queue is full new items still are added in the order of `await q.put()` calls. If there are multiple producers the order of adding items into the queue is still the order of `q.put()`. Do you have a code example t

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

2019-11-21 Thread PCManticore
PCManticore added the comment: It seems there are a couple of places in `_pickle.c` where we favour a `KeyError` instead of `UnpicklingError` such as https://github.com/python/cpython/blob/master/Modules/_pickle.c#L6178. From a quick debugging it seems it originates in `load_long_binget`.

[issue38877] Python 3.9 build fails under Debian 9.11

2019-11-21 Thread Florian Dahlitz
New submission from Florian Dahlitz : Today, I tried to build Python 3.9 from source, which failed. Building it without optimizations enabled fails due to an Segmentation fault (output_without.txt) and building with optimizations fails with a profile-opt error (output.txt). $ lsb_release -a

[issue38877] Python 3.9 build fails under Debian 9.11

2019-11-21 Thread Florian Dahlitz
Change by Florian Dahlitz : Added file: https://bugs.python.org/file48730/output_without.txt ___ Python tracker ___ ___ Python-bugs-list mai

[issue33608] Add a cross-interpreter-safe mechanism to indicate that an object may be destroyed.

2019-11-21 Thread Phil Connell
Phil Connell added the comment: Based on Victor's info from https://bugs.python.org/issue36114#msg337090 I believe the crash is essentially what's reproduced in the attached program. >From the root of a (built) cpython clone run: gcc -c -o fini_crash.o -IInclude -I. fini_crash.c && gcc -o fi

[issue33608] Add a cross-interpreter-safe mechanism to indicate that an object may be destroyed.

2019-11-21 Thread Phil Connell
Phil Connell added the comment: Just to summarise, I'm fairly sure this is exactly what Victor saw: a daemon thread attempts to reacquire the GIL via Py_END_ALLOW_THREADS after interpreter finalisation. Obviously the threadstate pointer held by the thread is then invalid...so we crash. So I

[issue29275] time module still has Y2K issues note

2019-11-21 Thread Callum Ward
Change by Callum Ward : -- keywords: +patch pull_requests: +16807 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/17321 ___ Python tracker _

[issue38868] Shutil cannot delete a folder that contains an .ini file

2019-11-21 Thread Svetlana Vodianova
Svetlana Vodianova added the comment: What is the system error code (winerror) of the PermissionError? PermissionError: [WinError 5] Access is denied Note: Please ignore my first post (msg357097) describing the problem, I made a few mistakes that might be confusing. msg357099 better describ

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

2019-11-21 Thread Mark Shannon
Mark Shannon added the comment: New changeset 82f897bf8f72d09f537054d64a94e645ad23d8d6 by Mark Shannon in branch 'master': Correct release version to 3.9 for RERAISE and WITH_EXCEPT_START bytecodes. (#17318) https://github.com/python/cpython/commit/82f897bf8f72d09f537054d64a94e645ad23d8d6

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

2019-11-21 Thread Mark Shannon
Mark Shannon added the comment: Brett, 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. -- ___ Python t

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

2019-11-21 Thread Bar Harel
New submission from Bar Harel : Quick and small fix. os.PathLike.__subclasshook__ does not check if cls is PathLike as abstract classes should. This in turn causes this bug: class A(PathLike): pass class B: def __fspath__(self): pass assert issubclas

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

2019-11-21 Thread Mark Shannon
Mark Shannon added the comment: Fabio, Can you give me a specific example where changing the bytecode via the `__code__` attribute of a function does not work as expected? I am assuming that adding a breakpoint on a line is equivalent to adding `breakpoint();` at the beginning of that line.

[issue38870] Expose ast.unparse in the ast module

2019-11-21 Thread Batuhan
Batuhan added the comment: @gvanrossum are you OK with adding type comments support? Current version loses type comment information so if typed_ast parses this, they wont be the same in AST representation. -- nosy: +gvanrossum ___ Python tracker

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

2019-11-21 Thread Batuhan
Change by Batuhan : -- nosy: +brett.cannon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

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

2019-11-21 Thread Jukka Väisänen
Jukka Väisänen added the comment: > A higher-level interface like asyncio doesn't necessarily want to map its > kwargs directly to non-portable low-level options like this. Also reuse_port has portability issues, the whole portability mess i s nicely summed up in: https://stackoverflow.com/

[issue36077] Inheritance dataclasses fields and default init statement

2019-11-21 Thread Laurie Opperman
Change by Laurie Opperman : -- keywords: +patch pull_requests: +16808 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17322 ___ Python tracker ___

[issue36077] Inheritance dataclasses fields and default init statement

2019-11-21 Thread Laurie Opperman
Laurie Opperman added the comment: I've added a PR implementing Daniel L's suggestion -- nosy: +Epic_Wink versions: +Python 3.6 -Python 3.7, Python 3.8 ___ Python tracker ___

[issue33608] Add a cross-interpreter-safe mechanism to indicate that an object may be destroyed.

2019-11-21 Thread Phil Connell
Phil Connell added the comment: The attached patch (wrap_threadstate.diff) is enough to stop the crash. It's a slightly dirty proof-of-concept, but equally could be the basis for a solution. The main functional issue is that there's still a race on the Py_BLOCK_THREADS side: it's possible th

[issue38879] Reordered error checking in PyArena_New().

2019-11-21 Thread Zoltán Szatmáry
New submission from Zoltán Szatmáry : Put "arena->a_cur = arena->a_head;" after the error checking of "arena->a_objects = PyList_New(0);". It's more optimal, even if it can't be measured. -- hgrepos: 386 messages: 357180 nosy: Zotyamester priority: normal pull_requests: 16809 severity:

[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: https://m

[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 https://github.com/ericsnowcurrently/multi-core-python

[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 ___ _

[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

[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) old_mod.method.__c

[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) https://github.com/python/cpython/commit/0aca3a3a1e68b4ca2d334ab52

[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 ___ __

[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

[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

[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) https://github.com/python/cpython/commit/30e5bd8471d7531d051796c01e8ede01ade883d

[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) https://github.com/python/cpython/commit/9458c5c42bbe5fb6ef2393c9ee66f012a2c13ca

[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 ___ _

[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

[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) https://github.com/python/cpython/commit/b2744c1be73f5a

[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 ___ _

[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 thi

[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 ___ ___ Py

[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 <0x

[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. I'll

[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: I've filed issue38883 -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[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 gethomedir(

[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 ma

[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: https:/

[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: https://mail.pyt

[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 "/usr/lib/python3.7/thread

[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 _ModuleLock('tensorflow_transform.tf_metadata.metad

[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 e

[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 ___ ___ Python-bugs-

[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 ___ __

[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 ___ ___ Python-bu

[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 ___ ___ Python-bugs-lis

[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: htt

[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 elabo

[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: ->

[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: H

[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

[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

[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 previ

[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 B:

[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 at

[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 ___ _

[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 __

[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 Unsubs

[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 __

  1   2   >