[issue39748] PyScripter could not find Python 3.8 64 bits

2020-02-26 Thread Eric V. Smith
Eric V. Smith added the comment: I'm going to close this. If you have more information that shows it's a bug in Python, we can re-open it. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker

[issue39757] EmailMessage wrong encoding for international domain

2020-02-26 Thread Julien Castiaux
New submission from Julien Castiaux : Affected python version: 3.5 and above (did test them all except 3.9) Steps to reproduce: from mail.message import EmailMessage from mail.policy import SMTP msg = EmailMessage(policy=SMTP) msg['To'] = 'Joe ' # notice the é in the domain print(ms

[issue39757] EmailMessage wrong encoding for international domain

2020-02-26 Thread Julien Castiaux
Change by Julien Castiaux : -- keywords: +patch pull_requests: +18023 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18667 ___ Python tracker ___

[issue39758] StreamWriter.wait_closed() can hang indefinately.

2020-02-26 Thread Tom Christie
New submission from Tom Christie : Raising an issue that's impacting us on `httpx`. It appears that in some cases SSL unwrapping can cause `.wait_closed()` to hang indefinately. Trio are particularly careful to work around this case, and have an extensive comment on it: https://github.com/p

[issue39758] StreamWriter.wait_closed() can hang indefinitely.

2020-02-26 Thread François Voron
Change by François Voron : -- nosy: +François Voron title: StreamWriter.wait_closed() can hang indefinately. -> StreamWriter.wait_closed() can hang indefinitely. ___ Python tracker ___

[issue39759] os.getenv documentation is misleading

2020-02-26 Thread Rémi Lapeyre
New submission from Rémi Lapeyre : The documentation states that "*key*, *default* and the result are str." at https://github.com/python/cpython/blame/3.8/Doc/library/os.rst#L224 but either I'm missing something or it's not actually true: $ python -c 'import os; print(type(os.getenv("FOO")))'

[issue39759] os.getenv documentation is misleading

2020-02-26 Thread Andrei Daraschenka
Change by Andrei Daraschenka : -- keywords: +patch nosy: +dorosch nosy_count: 2.0 -> 3.0 pull_requests: +18024 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18668 ___ Python tracker

[issue30064] BaseSelectorEventLoop.sock_{recv, sendall}() don't remove their callbacks when canceled

2020-02-26 Thread Andrew Svetlov
Andrew Svetlov added the comment: This is a very interesting question. In asyncio, task cancellation is not executed on `task.cancel()` call immediately but the task is *marked* for cancellation. The actual cancellation requires a context switch (await asyncio.sleep(0) or similar) to propaga

[issue39760] ast.FormattedValue.format_spec unnecessarily wrapped in JoinedStr

2020-02-26 Thread Ilya Kamenshchikov
New submission from Ilya Kamenshchikov : Most usual usecase for format_spec is to specify it as a constant, that would be logical to represent as ast.Constant. However, ast.parse wraps value of ast.FormattedValue.format_spec into a JoinedStr with a single constant value, as can be seen from e

[issue16487] Allow ssl certificates to be specified from memory rather than files.

2020-02-26 Thread Lord Anton Hvornum
Lord Anton Hvornum added the comment: I agree with Jan-Philip Gehrcke, would have been nice to have had this. Pretty pissed reading through this ancient issue. In regards to how people treat other volunteers: We're all working for free, and I think expectations from people with authoritative

[issue34788] ipaddress module fails on rfc4007 scoped IPv6 addresses

2020-02-26 Thread miss-islington
miss-islington added the comment: New changeset 21da76d1f1b527d62b2e9ef79dd9aa514d996341 by opavlyuk in branch 'master': bpo-34788: Add support for scoped IPv6 addresses (GH-13772) https://github.com/python/cpython/commit/21da76d1f1b527d62b2e9ef79dd9aa514d996341 -- nosy: +miss-islin

[issue34788] ipaddress module fails on rfc4007 scoped IPv6 addresses

2020-02-26 Thread Andrew Svetlov
Change by Andrew Svetlov : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ __

[issue39750] UnicodeError becomes unpicklable if data is appended to args

2020-02-26 Thread João Eiras
João Eiras added the comment: Hi. It's perfectly fine for classes to have their public APIs and intended uses. But then unpickling would be the worst place to complain, specially when running 40 parallel processes while an unhandled stacktrace appears between a couple hundred thousand lines o

[issue39759] os.getenv documentation is misleading

2020-02-26 Thread Andrew Svetlov
Andrew Svetlov added the comment: I consider a free type for the default as an implementation detail, not the encouraged approach. Since the value is always a string, using the same type for the default sounds like a sane design for me. -- nosy: +asvetlov __

[issue39760] ast.FormattedValue.format_spec unnecessarily wrapped in JoinedStr

2020-02-26 Thread Eric V. Smith
Eric V. Smith added the comment: I agree that could probably be simplified, if the format_spec is constant (which it need not be). >>> ast.dump(ast.parse('f"is {x:d}"')) "Module(body=[Expr(value=JoinedStr(values=[Str(s='is '), FormattedValue(value=Name(id='x', ctx=Load()), conversion=-1, f

[issue39759] os.getenv documentation is misleading

2020-02-26 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: I don't really have a preference regarding saying that `default` should be a string or not but the phrase should still be reworded to be less confusing. In typeshed it's documented with a generic type: https://github.com/python/typeshed/blob/master/stdlib/3/os/

[issue39689] test_struct failure on s390x Fedora Clang buildbot

2020-02-26 Thread Charalampos Stratakis
Charalampos Stratakis added the comment: On this loop: for c in [b'\x01', b'\x7f', b'\xff', b'\x0f', b'\xf0']: self.assertTrue(struct.unpack('>?', c)[0]) It fails for the b'\xf0' case -- ___ Python tracker

[issue39760] ast.FormattedValue.format_spec unnecessarily wrapped in JoinedStr

2020-02-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: FYI you can use ast CLI: $ echo 'f"is {x:d}"' | ./python -m ast Module( body=[ Expr( value=JoinedStr( values=[ Constant(value='is ', kind=None), FormattedValue( value=Name(id='x',

[issue39761] Python 3.9.0a4 fails to build when configured with --with-dtrace

2020-02-26 Thread Marcel Plch
New submission from Marcel Plch : Steps to reproduce: $ wget https://www.python.org/ftp/python/3.9.0/Python-3.9.0a4.tar.xz $ tar xvf Python-3.9.0a4.tar.xz $ cd Python-3.9.0a4 $ ./configure --with-dtrace $ make -j12 /usr/bin/ld: libpython3.9.a(ceval.o): in function `_PyEval_EvalFrameDefault': /h

[issue39761] Python 3.9.0a4 fails to build when configured with --with-dtrace

2020-02-26 Thread Miro Hrončok
Miro Hrončok added the comment: I can reproduce this from git and will try to bisect the introducer. -- nosy: +hroncok ___ Python tracker ___ __

[issue39530] Documentation about comparisons between numeric types is misleading

2020-02-26 Thread Mark Dickinson
Mark Dickinson added the comment: There's a PR on GitHub. (GH-18615) Terry: I think you've looked at similar sorts of documentation clarifications in the past. Would you have any interest in reviewing this one? -- nosy: +terry.reedy ___ Python tra

[issue39761] Python 3.9.0a4 fails to build when configured with --with-dtrace

2020-02-26 Thread Miro Hrončok
Miro Hrončok added the comment: aabdeb766b7fa581e7de01f3c953b12792f0736d is the first new commit commit aabdeb766b7fa581e7de01f3c953b12792f0736d Author: David Carlier Date: Tue Jan 28 12:53:32 2020 + bpo-38960: DTrace build fix for FreeBSD. (GH-17451) DTrace build fix for Fr

[issue39761] Python 3.9.0a4 fails to build when configured with --with-dtrace

2020-02-26 Thread David Carlier
David Carlier added the comment: Sorry for the inconveniences. I can reproduce on FreeBSD too if I do not set the DFLAGS env var (because FreeBSD needs architecture bits in addition). What happens when make distclean && export DFLAGS="" && ./configure --with-dtrace ? --

[issue39762] PyLong_AS_LONG missing from longobject.h

2020-02-26 Thread Enji Cooper
New submission from Enji Cooper : While trying to port python 2 C extension code forward to python 3, I noticed that the python 2.6 PyInt -> PyLong unification lacks a forward-compatible API for PyLong_AS_LONG. I'm not sure if this was intentional, but it is a slightly annoying wicket to dea

[issue39762] PyLong_AS_LONG missing from longobject.h

2020-02-26 Thread Enji Cooper
Enji Cooper added the comment: For the record, some projects (like Cython, pywin32) worked around this by adding a preprocessor alias, PyLong_AS_LONG -> PyInt_AS_LONG with python 2.x. -- ___ Python tracker

[issue39762] PyLong_AS_LONG missing from longobject.h

2020-02-26 Thread Enji Cooper
Enji Cooper added the comment: For the record, this seems like it might be the only discrepancy, per the py3c project's exported PyInt APIs: $ for api in `awk '$2 ~ /^PyInt/ { print $3 }' include/py3c/compat.h`; do grep -q $api /usr/include/python2.7/longobject.h || echo $api; done PyLong_AS

[issue39762] PyLong_AS_LONG missing from longobject.h

2020-02-26 Thread Enji Cooper
Enji Cooper added the comment: Workaround PR posted here: https://github.com/encukou/py3c/pull/28 -- ___ Python tracker ___ ___ Pyt

[issue39762] PyLong_AS_LONG missing from longobject.h

2020-02-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Python 2 is no longer supported. -- nosy: +serhiy.storchaka resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker _

[issue8269] Missing return values for PyUnicode C/API functions

2020-02-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Sorry, we missed this issue. refcounts.dat was updated in other issues. -- nosy: +serhiy.storchaka resolution: -> out of date stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue31015] PyErr_WriteUnraisable should be more verbose in Python 2.7

2020-02-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is too late for 2.7. -- nosy: +serhiy.storchaka resolution: -> wont fix stage: -> resolved status: open -> closed ___ Python tracker _

[issue39761] Python 3.9.0a4 fails to build when configured with --with-dtrace

2020-02-26 Thread Miro Hrončok
Miro Hrončok added the comment: export DFLAGS="" does not seem to workaround this. $ make distclean && export DFLAGS="" && ./configure --with-dtrace && make ... undefined reference to `python_line_semaphore' ... -- ___ Python tracker

[issue39762] PyLong_AS_LONG missing from longobject.h

2020-02-26 Thread Enji Cooper
Enji Cooper added the comment: @serhiy.storchaka: understood. Figured this would be a good errata note for others to potentially find in the future. -- ___ Python tracker ___

[issue39754] update_one_slot() does not inherit sq_contains and mp_subscript if they are explictly declared

2020-02-26 Thread Marco Sulla
Change by Marco Sulla : -- resolution: -> duplicate stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bu

[issue34396] Certain methods that heap allocated subtypes inherit suffer a 50-80% performance penalty

2020-02-26 Thread Marco Sulla
Marco Sulla added the comment: I asked why on StackOverflow, and an user seemed to find the reason. The problem for him/her is in `update_one_slot()`. `dict` implements directly `__contains__()` and `__getitem__()`. Usually, `sq_contains` and `mp_subscript` are wrapped to implement `__conta

[issue22714] target of 'import statement' entry in general index for 'i' is wrong

2020-02-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There are 5 links for the "import statement" entry. Issue35506 partially solved the problem -- the main link is now emphasized. But it is still the last of links. I afraid it is a limitation of Sphinx. If no other solution be proposed I'll close this issue

[issue23164] "pydoc filter" documentation restrictive

2020-02-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It was fixed in Python 3, and it is too late for 2.7. -- nosy: +serhiy.storchaka resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker

[issue39763] Hang after fork due to logging trying to reacquire the module lock in an atfork() handler

2020-02-26 Thread Elad Lahav
New submission from Elad Lahav : The attached code causes the child processes to hang on QNX. The hang is caused by the logging module trying to acquire the module lock while in an atfork() handler. In a system where semaphore state is kept in user mode and is thus inherited from the parent o

[issue25397] improve ac_cv_have_long_long_format GCC fallback

2020-02-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is too later for 2.7. The long long type is required for recent Python 3 versions, so this macro is no longer used. -- nosy: +serhiy.storchaka resolution: -> out of date stage: -> resolved status: open -> closed ___

[issue39699] Some CIs silence potentially useful output from make

2020-02-26 Thread Steve Dower
Steve Dower added the comment: New changeset 6aa1f1ecf7142a4117eedb8c570f30da1598616c by Ammar Askar in branch 'master': bpo-39699: Don't silence make on Azure and Github CIs (GH-18583) https://github.com/python/cpython/commit/6aa1f1ecf7142a4117eedb8c570f30da1598616c -- ___

[issue39761] Python 3.9.0a4 fails to build when configured with --with-dtrace

2020-02-26 Thread David Carlier
David Carlier added the comment: What about DFFLAGS=" " ? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39761] Python 3.9.0a4 fails to build when configured with --with-dtrace

2020-02-26 Thread Miro Hrončok
Miro Hrončok added the comment: Nope. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.

[issue39764] PyAsyncGenObject causes task.get_stack() raising AttributeError

2020-02-26 Thread Lidi Zheng
New submission from Lidi Zheng : This issue exists since 3.6. The implementation of get stack on Task is looking for two attribute [1]: "cr_frame" for coroutines, "gi_frame" for generators (legacy coroutines). However, PyAsyncGenObject provides none of them but "ag_frame" [2]. Fix PR: https:

[issue39761] Python 3.9.0a4 fails to build when configured with --with-dtrace

2020-02-26 Thread David Carlier
David Carlier added the comment: Weird I just tried on ubuntu/systemtap... -- ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue39699] Some CIs silence potentially useful output from make

2020-02-26 Thread Steve Dower
Change by Steve Dower : -- pull_requests: +18026 pull_request: https://github.com/python/cpython/pull/18670 ___ Python tracker ___ _

[issue39699] Some CIs silence potentially useful output from make

2020-02-26 Thread Steve Dower
Change by Steve Dower : -- pull_requests: +18027 pull_request: https://github.com/python/cpython/pull/18671 ___ Python tracker ___ _

[issue39698] asyncio.sleep() does not adhere to time.sleep() behavior for negative numbers

2020-02-26 Thread Marco Sulla
Change by Marco Sulla : -- resolution: not a bug -> rejected ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39698] asyncio.sleep() does not adhere to time.sleep() behavior for negative numbers

2020-02-26 Thread Marco Sulla
Marco Sulla added the comment: > I also distinctly remember seeing code (and writing such code myself) that > performs computation on timeouts and does not care if the end value goes > below 0. This is not a good statistics. Frankly we can't measure the impact of the change from these consi

[issue39699] Some CIs silence potentially useful output from make

2020-02-26 Thread Steve Dower
Steve Dower added the comment: New changeset 343bc06d8047e4a2e675394528dbb5155be1b3b5 by Steve Dower in branch '3.8': bpo-39699: Don't silence make on Azure and Github CIs (GH-18583) https://github.com/python/cpython/commit/343bc06d8047e4a2e675394528dbb5155be1b3b5 -- __

[issue39763] Hang after fork due to logging trying to reacquire the module lock in an atfork() handler

2020-02-26 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: +gvanrossum, pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue39762] PyLong_AS_LONG missing from longobject.h

2020-02-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The reason why there was the PyInt_AS_LONG macro is that it is very simple and efficient. It never fails, because the value of the int object always fits in the C long. PyInt_AsLong is much slower. If you know that the object is int, you can use PyInt_AS_L

[issue36144] Dictionary union. (PEP 584)

2020-02-26 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset d0ca9bd93bb9d8d4aa9bbe939ca7fd54ac870c8f by Brandt Bucher in branch 'master': bpo-36144: Document PEP 584 (GH-18659) https://github.com/python/cpython/commit/d0ca9bd93bb9d8d4aa9bbe939ca7fd54ac870c8f -- __

[issue39763] Hang after fork due to logging trying to reacquire the module lock in an atfork() handler

2020-02-26 Thread Antoine Pitrou
Antoine Pitrou added the comment: Note the original problem stems when you using "setup.py -j ". The attached reproducer is a bit of a red herring, because indeed doing fork() + exec() in pure Python is too fragile. That is why the standard subprocess does it in C. The problem here is that

[issue36144] Dictionary union. (PEP 584)

2020-02-26 Thread Guido van Rossum
Guido van Rossum added the comment: @Brandt: you have some more followup PRs planned right? Let's keep this issue open until you've done all of those. -- ___ Python tracker _

[issue39763] distutils.spawn should use subprocess (hang in parallel builds on QNX)

2020-02-26 Thread Antoine Pitrou
Change by Antoine Pitrou : -- title: Hang after fork due to logging trying to reacquire the module lock in an atfork() handler -> distutils.spawn should use subprocess (hang in parallel builds on QNX) ___ Python tracker

[issue39763] distutils.spawn should use subprocess (hang in parallel builds on QNX)

2020-02-26 Thread Antoine Pitrou
Change by Antoine Pitrou : -- nosy: +dstufft, eric.araujo, p-ganssle, vstinner ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue22947] Enable 'imageop' - "Multimedia Srvices Feature module" for 64-bit platform

2020-02-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Python 2.7 no longer supported. -- nosy: +serhiy.storchaka resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker __

[issue39763] distutils.spawn should use subprocess (hang in parallel builds on QNX)

2020-02-26 Thread Elad Lahav
Elad Lahav added the comment: I'm not convinced that a multi-threaded fork()+exec() from C would be any better, unless the Python code goes to great lengths to avoid any non-async-signal-safe operations between the fork() and the exec(). So along with the proposed change to switch to the subp

[issue39763] distutils.spawn should use subprocess (hang in parallel builds on QNX)

2020-02-26 Thread Guido van Rossum
Guido van Rossum added the comment: @Antoine: I can sort of see why you consider the small example a red herring, since it mixes threads and fork. Nevertheless, a simpler version (not using an executor) would probably work just fine? It's the edge cases where the mixture becomes explosive. S

[issue39761] Python 3.9.0a4 fails to build when configured with --with-dtrace

2020-02-26 Thread Miro Hrončok
Miro Hrončok added the comment: $ make clean && make distclean $ git clean -x $ export DFLAGS="" $ export DFFLAGS="" $ ./configure --with-dtrace && make ... undefined reference to `python_audit_semaphore' ... -- ___ Python tracker

[issue39765] asyncio loop.set_signal_handler() may not behave as expected

2020-02-26 Thread Roger Dahl
New submission from Roger Dahl : This is a ticket to document two ways in which the behavior of loop.set_signal_handler() may not match what the user expects. First, callbacks to handlers registered with loop.set_signal_handler() may be significantly delayed. I have a program where I've encou

[issue39765] asyncio loop.set_signal_handler() may not behave as expected

2020-02-26 Thread Roger Dahl
Change by Roger Dahl : -- keywords: +patch pull_requests: +18028 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18664 ___ Python tracker ___ _

[issue39761] Python 3.9.0a4 fails to build when configured with --with-dtrace

2020-02-26 Thread David Carlier
David Carlier added the comment: ah sorry I meant DFLAGS=" " (with a space). -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue38066] Hide internal asyncio.Stream methods

2020-02-26 Thread tzickel
tzickel added the comment: The documentation needs to scrub this methods as well, for example: https://docs.python.org/3/library/asyncio-stream.html#asyncio.StreamReader.at_eof still mentions them. -- nosy: +tzickel ___ Python tracker

[issue39761] Python 3.9.0a4 fails to build when configured with --with-dtrace

2020-02-26 Thread David Carlier
David Carlier added the comment: If it works for you, it might mean making a specific case for Linux systems in configure.ac as a proper fix. -- ___ Python tracker ___ __

[issue39758] StreamWriter.wait_closed() can hang indefinitely.

2020-02-26 Thread Julien Palard
Julien Palard added the comment: Can reproduce in: - 3.8.0 - 3.8.2 - 3.7.6 -- nosy: +mdk ___ Python tracker ___ ___ Python-bugs-li

[issue39761] Python 3.9.0a4 fails to build when configured with --with-dtrace

2020-02-26 Thread Miro Hrončok
Miro Hrončok added the comment: Oh, my bad. DFLAGS=" " ^ that indeed works. -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue36144] Dictionary union. (PEP 584)

2020-02-26 Thread Brandt Bucher
Brandt Bucher added the comment: Yep. I'm currently working on OrderedDict, defaultdict, and MappingProxyType. My brother is looking to make his first contribution, so he'll be taking care of ChainMap. -- ___ Python tracker

[issue39760] ast.FormattedValue.format_spec unnecessarily wrapped in JoinedStr

2020-02-26 Thread Eric V. Smith
Eric V. Smith added the comment: > FYI you can use ast CLI: I did not know that. That's awesome, thanks for pointing it out. -- ___ Python tracker ___ ___

[issue27657] urlparse fails if the path is numeric

2020-02-26 Thread Ned Deily
Ned Deily added the comment: FYI, for those following along, now that 3.8.2 has been released with the revert of the regression, we are planning to accelerate the schedule for 3.7.7, the next 3.7.x bugfix release, in part to get the revert out to 3.7.x users sooner (https://discuss.python.o

[issue39763] distutils.spawn should use subprocess (hang in parallel builds on QNX)

2020-02-26 Thread Elad Lahav
Elad Lahav added the comment: "Your script contains a bug (there is no definition of 'exec_fn')" Told you I wasn't much of a Python developer ;-) This was just copy-pasted from spawn.py and I missed the fact that exec_fn() is not a library function. Your last comment wasn't clear - do you s

[issue39766] unittest's assertRaises removes locals from tracebacks

2020-02-26 Thread daniel hahler
New submission from daniel hahler : I was a bit surprised to find that unittest's assertRaises clears the locals on the traceback, which e.g. prevents pytest to display them in case of failures. This was done via https://bugs.python.org/issue9815 (https://github.com/python/cpython/commit/9681

[issue39699] Some CIs silence potentially useful output from make

2020-02-26 Thread Steve Dower
Steve Dower added the comment: New changeset 3bf9de2fb954bd1131f4f41517d7d5c316fb95f8 by Steve Dower in branch '3.7': bpo-39699: Don't silence make on Azure and Github CIs (GH-18583) https://github.com/python/cpython/commit/3bf9de2fb954bd1131f4f41517d7d5c316fb95f8 -- __

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

2020-02-26 Thread Ryan Petrello
Ryan Petrello added the comment: I believe I'm also encountering some version of this bug while importing code from the kombu library within a multi-threaded context. For what it's worth, I'm able to reproduce the reported deadlock (https://bugs.python.org/file48737/issue38884.zip) using pyt

[issue39765] asyncio loop.set_signal_handler() may not behave as expected

2020-02-26 Thread Andrew Svetlov
Andrew Svetlov added the comment: I'm sorry. but loop.set_signal_handler() method doesn't exist. -- ___ Python tracker ___ ___ Pyth

[issue39765] asyncio loop.add_signal_handler() may not behave as expected

2020-02-26 Thread Andrew Svetlov
Andrew Svetlov added the comment: Assuming you mean loop.add_signal_handler() method, I would say that a minute-long delay is a sign of long blocking calls in your program. Typical asyncio program blocks the loop for 1-10 milliseconds at most, and signal handlers are called with this delay.

[issue39762] PyLong_AS_LONG missing from longobject.h

2020-02-26 Thread Enji Cooper
Enji Cooper added the comment: PyInt_AS_LONG doesn't exist on python 3, however: $ grep -r PyInt_AS_LONG /usr/include/ [/usr/include/python2.7/intobject.h:#define PyInt_AS_LONG(op) (((PyIntObject *)(op))->ob_ival) The code smell for the pieces that use PyInt_AS_LONG seems a bit questionable

[issue39765] asyncio loop.add_signal_handler() may not behave as expected

2020-02-26 Thread Roger Dahl
Roger Dahl added the comment: > I'm sorry. but loop.set_signal_handler() method doesn't exist. Oops, fixed. > Assuming you mean loop.add_signal_handler() method, I would say that a > minute-long delay is a sign of long blocking calls in your program. During the delay for the callback to occ

[issue39761] Python 3.9.0a4 fails to build when configured with --with-dtrace

2020-02-26 Thread David CARLIER
Change by David CARLIER : -- keywords: +patch nosy: +devnexen nosy_count: 4.0 -> 5.0 pull_requests: +18029 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18672 ___ Python tracker ___

[issue39622] KeyboardInterrupt is ignored when await asyncio.sleep(0)

2020-02-26 Thread Maor Kleinberger
Maor Kleinberger added the comment: I have pushed an update to my PR. While implementing the new solution I made the following list: Examples for code segments where KeyboardInterrupt must not be raised: - Between popping and running a handle from the ready queue (a handle is lost) - After

[issue39763] distutils.spawn should use subprocess (hang in parallel builds on QNX)

2020-02-26 Thread Guido van Rossum
Guido van Rossum added the comment: When I run this on macOS, either with the bug, or with the buggy line commented out, I get the same hang. When I interrupt it, I get a separate traceback from each thread. Here's the full session: Parent 78918 Parent 78919 Child 78918 Parent 78920 Child 78

[issue39766] unittest's assertRaises removes locals from tracebacks

2020-02-26 Thread daniel hahler
daniel hahler added the comment: The test for issue9815 passes since bbd3cf8f1e (bpo-23890). It seems like `traceback.clear_frames(tb)` should probably removed altogether? -- nosy: +vstinner ___ Python tracker

[issue39767] create multiprocessing.SharedMemory by pointing to existing memoryview

2020-02-26 Thread Dariusz Trawinski
New submission from Dariusz Trawinski : Currently, in order to share numpy array between processes via multiprocessing.SharedMemory object, it is required to copy the memory content with: input = np.ones((1,10,10,10)) shm = shared_memory.SharedMemory(create=True, size=input.nbytes) write_array

[issue39699] Some CIs silence potentially useful output from make

2020-02-26 Thread Steve Dower
Steve Dower added the comment: Had to disable the doctests in the 3.7 branch because I just couldn't get them passing. Pablo did the work for 3.8 and later though, so they're on for those. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___

[issue38597] C Extension import limit

2020-02-26 Thread Xinfa Zhu
Xinfa Zhu added the comment: I have had wheel installed. Following this SO answer (https://stackoverflow.com/a/50314071/7269441), I added "import setuptools" before distutils (my setup.py attached). Following is the log, where we see the VS path it is using. BTW, I am trying to reduce my pa

[issue36144] Dictionary union. (PEP 584)

2020-02-26 Thread Josh Rosenberg
Josh Rosenberg added the comment: What is ChainMap going to do? Normally, the left-most argument to ChainMap is the "top level" dict, but in a regular union scenario, last value wins. Seems like layering the right hand side's dict on top of the left hand side's would match dict union semant

[issue15474] Differentiate decorator and decorator factory in docs

2020-02-26 Thread Andrés Delfino
Andrés Delfino added the comment: Hi, no I'm no longer working on this. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue36144] Dictionary union. (PEP 584)

2020-02-26 Thread Brandt Bucher
Brandt Bucher added the comment: The plan is to follow dict’s semantics. The |= operator will basically delegate to the first map in the chain. The | operator will create a new ChainMap where the first map is the merged result of the old first map, and the others are the same. So, basically

[issue15474] Differentiate decorator and decorator factory in docs

2020-02-26 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thanks Andrés. I'm going to close this one as it has been open for a long time and not attracted interest. Also, in practice this ambiguity doesn't seem to be an issue and people almost universally refer to anything usable with the @-notation as a deco

[issue36144] Dictionary union. (PEP 584)

2020-02-26 Thread Josh Rosenberg
Josh Rosenberg added the comment: Sorry, I think I need examples to grok this in the general case. ChainMap unioned with dict makes sense to me (it's equivalent to update or copy-and-update on the top level dict in the ChainMap). But ChainMap unioned with another ChainMap is less clear. Coul

[issue39768] remove tempfile.mktemp()

2020-02-26 Thread wyz23x2
New submission from wyz23x2 : the tempfile.mktemp() function was deprecated since version 2.3; it's long ago (nearly 17 years)! It should be removed since it causes security holes, as stated in the tempfile doc (https://docs.python.org/3/library/tempfile.html#tempfile.mktemp). -- com

[issue39768] remove tempfile.mktemp()

2020-02-26 Thread wyz23x2
wyz23x2 added the comment: A small typo in the 1st comment: The tempfile.mktemp() function was deprecated since version 2.3; it's long ago (nearly 17 years!). It should be removed since it causes security holes, as stated in the tempfile doc (https://docs.python.org/3/library/tempfile.html#t

[issue39768] remove tempfile.mktemp()

2020-02-26 Thread wyz23x2
Change by wyz23x2 : -- components: +Library (Lib) ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue39768] remove tempfile.mktemp()

2020-02-26 Thread Zackery Spytz
Zackery Spytz added the comment: I think this is a duplicate of bpo-36309. -- nosy: +ZackerySpytz ___ Python tracker ___ ___ Python

[issue37497] Add inspect.Signature.from_text().

2020-02-26 Thread Yury Selivanov
Yury Selivanov added the comment: What's the actual use case for exposing this functionality? -- ___ Python tracker ___ ___ Python-

[issue39087] [C API] No efficient C API to get UTF-8 string from unicode object.

2020-02-26 Thread Inada Naoki
Inada Naoki added the comment: New changeset 02a4d57263a9846de35b0db12763ff9e7326f62c by Inada Naoki in branch 'master': bpo-39087: Optimize PyUnicode_AsUTF8AndSize() (GH-18327) https://github.com/python/cpython/commit/02a4d57263a9846de35b0db12763ff9e7326f62c -- ___

[issue39769] compileall.compile_dir(..., ddir="") omits the intermediate package paths when prepending the prefix

2020-02-26 Thread Gregory P. Smith
New submission from Gregory P. Smith : Easiest to demonstrate as such: ```shell #!/bin/bash mkdir bug touch bug/__init__.py mkdir bug/foo touch bug/foo/__init__.py touch bug/foo/bar.py python3 -m compileall -d "" bug python2 -m compileall -d "" bug echo "prefix embedded in PY3 pyc code objec

[issue39769] compileall.compile_dir(..., ddir="") omits the intermediate package paths when prepending the prefix

2020-02-26 Thread Gregory P. Smith
Gregory P. Smith added the comment: This has probably been happening for many 3 releases. I noticed it on 3.6 when investigating a problem with wrong paths in tracebacks coming from code which we used compileall.compile_dir(src_root, quiet=1, ddir=") on. I'm guessing ddir= (-d on the cli) i

[issue39768] remove tempfile.mktemp()

2020-02-26 Thread wyz23x2
wyz23x2 added the comment: Sorry, didn't realize that. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue39768] remove tempfile.mktemp()

2020-02-26 Thread wyz23x2
wyz23x2 added the comment: But I think the function should redirect to NamedTemporaryFile(delete=False). -- ___ Python tracker ___

[issue39768] remove tempfile.mktemp()

2020-02-26 Thread wyz23x2
wyz23x2 added the comment: You could add a check that does this: (a) from tempfile import mktemp with open(mktemp()) as f: # do something... ## No Warnings (b) from tempfile import mktemp path = mktemp() # do something... with open(mktemp()) as f: # do something... ## RuntimeWarning:

  1   2   >