[issue40807] CODEOP: Show warnings once during _maybe_compile

2020-05-28 Thread Cheryl Sabella
New submission from Cheryl Sabella : When calling `codeop._maybe_compile`, `compile` is run three times. If the code being compiled causes a warning message, the warning is generated each time that `compile` is called, thus (possibly) showing the message three times. See msg370163 and that

[issue40808] test_venv fails with HOME=/ on AMD64 FreeBSD Non-Debug 3.x

2020-05-28 Thread STINNER Victor
New submission from STINNER Victor : test_venv fails on AMD64 FreeBSD Non-Debug 3.x since this build: https://buildbot.python.org/all/#/builders/214/builds/808 This build has 3 changes. IMHO the regression comes from the commit feb0846c3a28b05b4cfbc6ab34c764957f3eff55: "Upgrade bundled version

[issue40807] CODEOP: Show warnings once during _maybe_compile

2020-05-28 Thread Cheryl Sabella
Change by Cheryl Sabella : -- keywords: +patch pull_requests: +19735 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20486 ___ Python tracker ___ _

[issue38488] Update bundled pip to 19.3

2020-05-28 Thread STINNER Victor
STINNER Victor added the comment: commit feb0846c3a28b05b4cfbc6ab34c764957f3eff55 Author: Xavier Fernandez Date: Wed May 27 12:49:34 2020 +0200 Upgrade bundled versions of pip & setuptools (#16782) -- ___ Python tracker

[issue38488] Update bundled pip to 19.3

2020-05-28 Thread STINNER Victor
STINNER Victor added the comment: This commit introduced another regression, bpo-40808: test_venv fails with HOME=/ on AMD64 FreeBSD Non-Debug 3.x. -- ___ Python tracker ___

[issue8087] Unupdated source file in traceback

2020-05-28 Thread Robert Reynolds
Robert Reynolds added the comment: I second [what was said by Aigars Mahinovs](https://bugs.python.org/issue8087#msg300990) about long-running processes giving confusing tracebacks that make debugging very difficult. I have a Natural Language Processing pipeline extracting features from a lar

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

2020-05-28 Thread STINNER Victor
STINNER Victor added the comment: I created https://github.com/python/cpython/pull/20485 to skip the unstable tests until someone fix them. IMO it's better to skip the test than reverting the fix, since the fix does fix a race condition. The test is still failing on buildbots which makes ana

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

2020-05-28 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +19734 pull_request: https://github.com/python/cpython/pull/20485 ___ Python tracker ___ __

[issue38488] Update bundled pip to 19.3

2020-05-28 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +19733 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20484 ___ Python tracker ___ _

[issue38488] Update bundled pip to 19.3

2020-05-28 Thread STINNER Victor
New submission from STINNER Victor : > Various buildbots which run the tests with an installed python, fail with: > (...) It's the "chmod" step which fails. I guess that only "Install" buildbot workers are affected. I failed to reproduce the issue with commands: --- ./configure --prefix $PWD/

[issue40798] The deprecated-removed Sphinx extension need to change the error message based on the Python version

2020-05-28 Thread Florian Dahlitz
Change by Florian Dahlitz : -- keywords: +patch pull_requests: +19732 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20483 ___ Python tracker ___

[issue40806] itertools.product not lazy

2020-05-28 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Hi Ramil, itertools.product() expect its argument to be finite iterables, it needs to keep all their elements in memory anyway at it "cycles around" to produce all possible pairs. Basically, product(x(1), x(2)) is equivalent to product(tuple(x(1)), tuple(x(2))

[issue40806] itertools.product not lazy

2020-05-28 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- nosy: +rhettinger, tim.peters ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue40770] RFE: Run linkchecker on documentation on the CI

2020-05-28 Thread Ama Aje My Fren
Ama Aje My Fren added the comment: On Thu, May 28, 2020 at 3:13 PM Miro Hrončok wrote: > > Note: I would gladly contribute this check, but I have no idea where should I > do that. > I don't know either. I suspect it will have to be with one of the CI/CD providers that cpython uses. I _think

[issue40806] itertools.product not lazy

2020-05-28 Thread Ramil Nugmanov
New submission from Ramil Nugmanov : def x(y): while True: yield y p = product(x(1), x(2)) next(p) # this string will never be reached. -- components: Library (Lib) messages: 370201 nosy: nougmanoff priority: normal severity: normal status: open title: itertools.product n

[issue40805] Can no longer patch flask.g

2020-05-28 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +xtreak ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue40798] The deprecated-removed Sphinx extension need to change the error message based on the Python version

2020-05-28 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Hi Florian, please have a go and open one on GitHub so it can be reviewed. -- ___ Python tracker ___ ___

[issue40798] The deprecated-removed Sphinx extension need to change the error message based on the Python version

2020-05-28 Thread Florian Dahlitz
Florian Dahlitz added the comment: I would like to submit a PR for it if possible. -- ___ Python tracker ___ ___ Python-bugs-list m

[issue40654] shutil.copyfile mutates symlink for absolute path

2020-05-28 Thread Eryk Sun
Eryk Sun added the comment: Modifying readlink() to return an str subclass that preserves the print name is an interesting idea, but not on topic here. For the cases where os.readlink is used to manually follow links (*), such as ntpath.realpath, using the substitute name is the most reliab

[issue40805] Can no longer patch flask.g

2020-05-28 Thread Rob Taft
New submission from Rob Taft : Whenever I try to patch flask.g, it appears to do nothing. This happened when I upgraded mock from 3.x to 4.x. I reported it on the mock github page https://github.com/testing-cabal/mock/issues/490 and was asked to report it here. The folllowing code run with

[issue40770] RFE: Run linkchecker on documentation on the CI

2020-05-28 Thread Miro Hrončok
Miro Hrončok added the comment: Note: I would gladly contribute this check, but I have no idea where should I do that. -- ___ Python tracker ___ __

[issue40791] hmac.compare_digest could try harder to be constant-time.

2020-05-28 Thread miss-islington
miss-islington added the comment: New changeset 8183e11d87388e4e44e3242c42085b87a878f781 by Christian Heimes in branch '3.9': [3.9] bpo-40791: Use CRYPTO_memcmp() for compare_digest (GH-20456) (GH-20461) https://github.com/python/cpython/commit/8183e11d87388e4e44e3242c42085b87a878f781 -

[issue40798] The deprecated-removed Sphinx extension need to change the error message based on the Python version

2020-05-28 Thread Florian Dahlitz
Change by Florian Dahlitz : -- nosy: +DahlitzFlorian ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[issue40803] Unable to execute python.exe from zip in wine

2020-05-28 Thread Robin
Change by Robin : -- stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe

[issue40804] Bug report in python3.6.8 using argparse module

2020-05-28 Thread Florian Dahlitz
Change by Florian Dahlitz : -- nosy: +DahlitzFlorian ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[issue40724] Support buffer protocol with type specs

2020-05-28 Thread Petr Viktorin
Petr Viktorin added the comment: Yes, it should be possible to wrap them in #if so they aren't part of the stable ABI. -- ___ Python tracker ___ _

[issue40803] Unable to execute python.exe from zip in wine

2020-05-28 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Thanks, I think you can close it by setting the Status field to "closed". -- ___ Python tracker ___

[issue40803] Unable to execute python.exe from zip in wine

2020-05-28 Thread Robin
Robin added the comment: Good News. The wine people say "Fixed in wine 4.0". So, a happy result. https://bugs.winehq.org/show_bug.cgi?id=49271 We can close this. -- ___ Python tracker ___

[issue40803] Unable to execute python.exe from zip in wine

2020-05-28 Thread Robin
Robin added the comment: Thanks for such a rapid response. Much appreciated. I think it's a bug in wine, so I've also reported it to them. And you both know that you both have it on your radar! I believe the Win32/API PathCchCanonicalizeEx() is quite new, and that's why it's not in wine-c

[issue40275] test.support has way too many imports

2020-05-28 Thread hai shi
Change by hai shi : -- pull_requests: +19731 pull_request: https://github.com/python/cpython/pull/20482 ___ Python tracker ___ ___ P

[issue17576] PyNumber_Index() is not int-subclass friendly (or operator.index() docos lie)

2020-05-28 Thread Mark Dickinson
Mark Dickinson added the comment: > The other way to solve my problem would be to provide an operator module > function (operator.as_float?) that does a duck-typed conversion of an > arbitrary Python object to a float. This does feel like the *right* solution to me. See #40801 and the linked

[issue40801] Expose PyFloat_ToDouble at Python level: operator.as_float?

2020-05-28 Thread Mark Dickinson
Mark Dickinson added the comment: Proof of concept in GH-20481 -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscr

[issue40801] Expose PyFloat_ToDouble at Python level: operator.as_float?

2020-05-28 Thread Mark Dickinson
Change by Mark Dickinson : -- keywords: +patch pull_requests: +19730 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20481 ___ Python tracker ___ _

[issue38605] [typing] PEP 563: Postponed evaluation of annotations: enable it by default in Python 3.10

2020-05-28 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: >From now on, should typing.get_type_hints automatically resolve arguments too? >An example would be this; import typing T = typing.TypeVar("T") class Loop(typing.Generic[T]): subloop: typing.Final["Loop[int]"] print(typing.get_type_hints(Loop)) >>> {'su

[issue40804] Bug report in python3.6.8 using argparse module

2020-05-28 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Hi amansi26, thanks for reporting this issue. Without an example program that reproduces it, we won't be able to diagnose and fix it thought. Can you post one? -- nosy: +remi.lapeyre ___ Python tracker

[issue9338] argparse optionals with nargs='?', '*' or '+' can't be followed by positionals

2020-05-28 Thread Dávid Horváth
Change by Dávid Horváth : -- nosy: +Dávid Horváth ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue40803] Unable to execute python.exe from zip in wine

2020-05-28 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Hi Robin, it looks like you are trying to run Python for Windows on Linux using Wine but that it's not supported by Wine. Why would this be a bug in the CPython interpreter thought? It looks like there is nothing we can do here to fix this right? -- no

[issue40803] Unable to execute python.exe from zip in wine

2020-05-28 Thread Robin
Robin added the comment: I've reported this to the wine team: https://bugs.winehq.org/show_bug.cgi?id=49271 -- ___ Python tracker ___ _

[issue40804] Bug report in python3.6.8 using argparse module

2020-05-28 Thread amansi26
New submission from amansi26 : I am using 3.6.8 version of python. I am seeing an error as AttributeError: 'Namespace' object has no attribute 'func' while using argparse . The code is working fine with python2.7 argparser. I see a similar bug [4] reported at python 3.3 and python3.4. The wor

[issue40803] Unable to execute python.exe from zip in wine

2020-05-28 Thread Robin
New submission from Robin : I've downloaded python38.zip(and python32.zip). It doesn't run because it's using an API `PathCchCanonicalizeEx()` that's not provided in wine. ``` Z:\home\rmills\temp\python-3>wine: Call from 0x7b43cfbc to unimplemented function api-ms-win-core-path-l1-1-0.dll.Pa

[issue36859] sqlite3 dml statement detection does not account for CTEs

2020-05-28 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- nosy: +erlendaasland ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue40802] AbstractEventLoop.shutdown_default_executor breaks backwards compatibility

2020-05-28 Thread Petr Viktorin
New submission from Petr Viktorin : In bpo-34037, AbstractEventLoop gained a new abstract method, shutdown_default_executor: https://docs.python.org/dev/library/asyncio-eventloop.html#asyncio.loop.shutdown_default_executor All AbstractEventLoop subclasses need to define this method, otherwise

[issue40801] Expose PyFloat_ToDouble at Python level: operator.to_float?

2020-05-28 Thread Mark Dickinson
New submission from Mark Dickinson : Motivation -- Various pieces of Python need to do a duck-typed conversion of an arbitrary float-like object to a float (or a C double) for computation. The math module is the most obvious example - most math-module functions that accept a float al

[issue40801] Expose PyFloat_ToDouble at Python level: operator.as_float?

2020-05-28 Thread Mark Dickinson
Change by Mark Dickinson : -- title: Expose PyFloat_ToDouble at Python level: operator.to_float? -> Expose PyFloat_ToDouble at Python level: operator.as_float? ___ Python tracker

[issue33436] Add an interactive shell for Sqlite3

2020-05-28 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: I think this is a good idea. Proof-of-concept implementation added (invoke REPL with `python -m sqlite3`). Possible improvements: - Use sqlite3.complete_statement() - Support Python syntax as well. For example: >>> select * from t >>> res = _ >>> prin

[issue23897] Update Python 3 extension module porting guide

2020-05-28 Thread Petr Viktorin
Petr Viktorin added the comment: py3c has an open issue to check that Barry's notes on C extensions are included: https://github.com/encukou/py3c/issues/1 However, C extensions are only a small part of the wiki page. -- ___ Python tracker

[issue40789] C-level destructor in PySide2 breaks gen_send_ex, which assumes it's safe to call Py_DECREF with a live exception

2020-05-28 Thread Nathaniel Smith
Nathaniel Smith added the comment: Filed with PySide2: https://bugreports.qt.io/browse/PYSIDE-1313 -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker _

[issue17576] PyNumber_Index() is not int-subclass friendly (or operator.index() docos lie)

2020-05-28 Thread Mark Dickinson
Mark Dickinson added the comment: [Serhiy] > * Undeprecate accepting __index__ and __int__ returning instances of int > sublasses. There is no difference from the side of using int and index(), but > it can simplify user implementations of __index__ and __int__. I'm not sure about this. Thi

[issue38938] Possible performance improvement for heapq.merge()

2020-05-28 Thread Dennis Sweeney
Dennis Sweeney added the comment: less_movement.py is my favorite so far. It still handles key and reverse, but using instance attributes instead of the list indices I tried before. It does this by only advancing the "key" and "leaf" attributes up toward the root (where the key is just the valu

[issue22250] unittest lowercase methods

2020-05-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: https://www.python.org/dev/peps/pep-0008/#a-foolish-consistency-is-the-hobgoblin-of-little-minds -- ___ Python tracker ___

[issue26202] The range() object is deepcopied as atomic

2020-05-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This change has been reverted in issue40792. The range object attributes has now exact type int, so the original issue with deep copying is gone. -- ___ Python tracker __

[issue37999] No longer use implicit convertion to int with loss

2020-05-28 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.10 ___ Python tracker ___ _

[issue22250] unittest lowercase methods

2020-05-28 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: See for example https://mail.python.org/archives/list/python-id...@python.org/thread/4HE2GFL27LGBSHGWOBDOOBPEULC52U4D/#RC3QWQUX6VP56K2WXSMRZ5IGNAUBXKRI -- nosy: +remi.lapeyre ___ Python tracker

[issue37999] No longer use implicit convertion to int with loss

2020-05-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think it is all here. Thank you Mark for your review and for fixing outdated docs and comments. -- ___ Python tracker ___ __

[issue17576] PyNumber_Index() is not int-subclass friendly (or operator.index() docos lie)

2020-05-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The current status: * Decimal and Fraction are no longer automatically converted to int when pass to functions implemented in C. PyLong_AsLong() etc no longer call __int__. (see issue36048 and issue37999) * operator.index() and PyNumber_Index() always retu

[issue22250] unittest lowercase methods

2020-05-28 Thread Ram Rachum
Ram Rachum added the comment: I see it's been 6 years since the last comment here. I think it's important to revisit these kind of decisions once in a while. Maybe now the time is ripe for a change? We could do it backward compatibility with a long deprecation schedule. Ezio: You said this

[issue40789] C-level destructor in PySide2 breaks gen_send_ex, which assumes it's safe to call Py_DECREF with a live exception

2020-05-28 Thread Nathaniel Smith
Nathaniel Smith added the comment: I don't think I understand what you mean by "reentrant"... we don't have any single piece of code that's calling back into itself. The question is about what the tp_dealloc contract is. Digging into it more, it looks like the standard is for typeobject.c:s

[issue40792] Make PyNumber_Index() always returning an exact int instance

2020-05-28 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue26202] The range() object is deepcopied as atomic

2020-05-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 5f4b229df7812f1788287095eb6b138bb21876a4 by Serhiy Storchaka in branch 'master': bpo-40792: Make the result of PyNumber_Index() always having exact type int. (GH-20443) https://github.com/python/cpython/commit/5f4b229df7812f1788287095eb6b138b

[issue40792] Make PyNumber_Index() always returning an exact int instance

2020-05-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 5f4b229df7812f1788287095eb6b138bb21876a4 by Serhiy Storchaka in branch 'master': bpo-40792: Make the result of PyNumber_Index() always having exact type int. (GH-20443) https://github.com/python/cpython/commit/5f4b229df7812f1788287095eb6b138b

[issue40790] Python should enable computed gotos on Mac by default

2020-05-28 Thread Ronald Oussoren
Ronald Oussoren added the comment: The result of auto detection of computed gotos can be seen using the HAVE_COMPUTED_GOTOS macro, not the USE_... one. Computed gotos should work on macOS, and does on my machine. -- ___ Python tracker

[issue40799] Create Lib/_pydecimal.py file to optimize "import datetime" when _decimal is available

2020-05-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What do decimals have to datetime? -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python

<    1   2