[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

[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

[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

[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
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ 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: 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

[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

[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

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

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

[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

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

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

[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

[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

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

[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

[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

[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

[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

[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

[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

[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

[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
Robin added the comment: I've reported this to the wine team: https://bugs.winehq.org/show_bug.cgi?id=49271 -- ___ 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: 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

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

[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

[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

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

[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

[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

[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

[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

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

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

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

[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

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

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

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

[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

[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

[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

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

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

[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

[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 Rémi Lapeyre
Change by Rémi Lapeyre : -- nosy: +rhettinger, tim.peters ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

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

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

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

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

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

[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

[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

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

[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

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

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

[issue37824] IDLE: Handle Shell input warnings properly.

2020-05-28 Thread Cheryl Sabella
Cheryl Sabella added the comment: Thanks, Terry. I created issue40807 for the codeop warnings. -- ___ Python tracker ___ ___ Pytho

[issue8087] Unupdated source file in traceback

2020-05-28 Thread Robert Reynolds
Robert Reynolds added the comment: A pure python demonstration of the problem looks like this (`__file__` stores the path to the executed module): ```python with open(__file__) as f: src = f.read() with open(__file__, 'w') as f: f.write('\n\n\n\n\n# Whoops! Wrong line!\n') f.write

[issue38488] Update bundled pip to 19.3

2020-05-28 Thread STINNER Victor
STINNER Victor added the comment: The change broke multiple buildbots. Since nobody is available to investigate the two regressions (install buildbots and test_venv), I reverted the change following this policy: https://pythondev.readthedocs.io/ci.html#revert-on-fail Buildbot failures were r

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

2020-05-28 Thread Guido van Rossum
Guido van Rossum added the comment: I think in general it is more insightful to discuss the behavior of get_type_hints() given specific things in annotations. We generally don't write forward refs inside forward refs, like "SomeClass['int']". So maybe that code was wrong? Where did you find

[issue38488] Update bundled pip to 19.3

2020-05-28 Thread Florian Bruhin
Change by Florian Bruhin : -- nosy: +The Compiler ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

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

2020-05-28 Thread STINNER Victor
STINNER Victor added the comment: New changeset 84ee7e1573d166fe7a9be676813e12523b62ab24 by Victor Stinner in branch 'master': bpo-30064: Fix unstable asyncio "racing" socket tests (GH-20485) https://github.com/python/cpython/commit/84ee7e1573d166fe7a9be676813e12523b62ab24 -- _

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

2020-05-28 Thread miss-islington
Change by miss-islington : -- pull_requests: +19736 pull_request: https://github.com/python/cpython/pull/20487 ___ Python tracker ___ __

[issue40275] test.support has way too many imports

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

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

2020-05-28 Thread STINNER Victor
Change by STINNER Victor : -- title: Create Lib/_pydecimal.py file to optimize "import datetime" when _decimal is available -> Create Lib/_pydatetime.py file to optimize "import datetime" when _datetime is available ___ Python tracker

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

2020-05-28 Thread STINNER Victor
STINNER Victor added the comment: > What do decimals have to datetime? Oops. Sorry, I was confused between "datetime" and "decimal" when I created this issue. I fixed the issue title. My idea is to mimick Lib/decimal.py design for Lib/datetime.py. -- ___

[issue40275] test.support has way too many imports

2020-05-28 Thread STINNER Victor
STINNER Victor added the comment: New changeset 24bddc1b3b58f6899b2d412e51b37f68536e4fe2 by Hai Shi in branch 'master': bpo-40275: Remove test.support.TESTFN_ENCODING (GH-20482) https://github.com/python/cpython/commit/24bddc1b3b58f6899b2d412e51b37f68536e4fe2 -- __

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

2020-05-28 Thread miss-islington
miss-islington added the comment: New changeset 1d82f003678816ff8dd822452ec91669844d2d09 by Miss Islington (bot) in branch '3.9': bpo-30064: Fix unstable asyncio "racing" socket tests (GH-20485) https://github.com/python/cpython/commit/1d82f003678816ff8dd822452ec91669844d2d09 -- __

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

2020-05-28 Thread STINNER Victor
STINNER Victor added the comment: > bpo-30064: Fix unstable asyncio "racing" socket tests (GH-20485) Sorry. You should read "Skip" tests, not "Fix" tests :-p -- ___ 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: An example would be this https://github.com/python/cpython/blob/24bddc1b3b58f6899b2d412e51b37f68536e4fe2/Lib/test/test_typing.py#L2744-L2745. Either I can change tests in order to reflect now everything is a forward ref by default class Loop: attr: Fina

[issue37878] Sub-Interpreters : Document PyThreadState_DeleteCurrent()

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

[issue40275] test.support has way too many imports

2020-05-28 Thread STINNER Victor
STINNER Victor added the comment: New changeset 753643205a28531fd43ef36b40b86282ae6956a7 by Victor Stinner in branch 'master': bpo-40275: Fix test.support.threading_helper (GH-20488) https://github.com/python/cpython/commit/753643205a28531fd43ef36b40b86282ae6956a7 -- __

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

2020-05-28 Thread Paul Ganssle
Paul Ganssle added the comment: I basically agree with this — this is one of the reasons I structured the zoneinfo module the way I did rather than mimicking the pattern in datetime. I believe that there are other modules that have similar situations like heapq, but datetime is probably the w

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

2020-05-28 Thread STINNER Victor
Change by STINNER Victor : -- nosy: -vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue40217] The garbage collector doesn't take in account that objects of heap allocated types hold a strong reference to their type

2020-05-28 Thread miss-islington
Change by miss-islington : -- pull_requests: +19739 pull_request: https://github.com/python/cpython/pull/20490 ___ Python tracker ___ __

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

2020-05-28 Thread STINNER Victor
STINNER Victor added the comment: > I believe that there are other modules that have similar situations like > heapq, but datetime is probably the worst offender. heapq seems to be a little bit different. _heapq is not a drop-in replacement of heapq.py. For example, nlargest() seems to only

[issue38488] Update bundled pip to 19.3

2020-05-28 Thread Xavier Fernandez
Change by Xavier Fernandez : -- pull_requests: +19740 pull_request: https://github.com/python/cpython/pull/20491 ___ Python tracker ___

[issue40700] Make WSGIRequestHandler easier to be customized by the user

2020-05-28 Thread Manjusaka
Manjusaka added the comment: ping~ -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.or

[issue40217] The garbage collector doesn't take in account that objects of heap allocated types hold a strong reference to their type

2020-05-28 Thread miss-islington
miss-islington added the comment: New changeset bcbe5c59dde5fcb9ad21991c2afd91837b14bbd5 by Miss Islington (bot) in branch '3.9': bpo-40217: Ensure Py_VISIT(Py_TYPE(self)) is always called for PyType_FromSpec types (reverts GH-19414) (GH-20264) https://github.com/python/cpython/commit/bcbe5

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

2020-05-28 Thread Andy Lester
Andy Lester added the comment: Some high-level questions to consider: * Is it run only when a build of the docs is started? Or should it be done regularly (daily/weekly?) to keep an eye on links so that it's not a surprise when build time comes along? * Does a broken link stop the build, o

[issue25920] PyOS_AfterFork should reset socketmodule's lock

2020-05-28 Thread STINNER Victor
STINNER Victor added the comment: New changeset 0de437de6210c2b32b09d6c47a805b23d023bd59 by Victor Stinner in branch 'master': bpo-25920: Remove socket.getaddrinfo() lock on macOS (GH-20177) https://github.com/python/cpython/commit/0de437de6210c2b32b09d6c47a805b23d023bd59 -- __

[issue40806] itertools.product not lazy

2020-05-28 Thread Ramil Nugmanov
Change by Ramil Nugmanov : -- keywords: +patch pull_requests: +19741 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20492 ___ Python tracker ___ _

[issue40755] Add missing multiset predicates to collections.Counter

2020-05-28 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset 60398512c86c5535edd817c99ccb50453b3b0471 by Raymond Hettinger in branch 'master': bpo-40755: Add missing multiset operations to Counter() (GH-20339) https://github.com/python/cpython/commit/60398512c86c5535edd817c99ccb50453b3b0471 -

[issue25920] PyOS_AfterFork should reset socketmodule's lock

2020-05-28 Thread STINNER Victor
STINNER Victor added the comment: If I understood correctly, Python 3.8 and 3.9 binaries provided by python.org is *not* impacted by this issue. Only Python binaries built manually with explicit support for macOS 10.4 ("MAC_OS_X_VERSION_MIN_REQUIRED") were impacted. Python 3.9 and older are

[issue40755] Add missing multiset predicates to collections.Counter

2020-05-28 Thread Raymond Hettinger
Raymond Hettinger added the comment: I would also have preferred to use the operators <, >, <=, >=, and ==. The docs in the patch explain why we can't go down this path. Also, while counters have support for multiset operations, they continue to support other use cases a well (negative coun

[issue40806] itertools.product not lazy

2020-05-28 Thread Raymond Hettinger
Change by Raymond Hettinger : -- assignee: -> rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue24416] Have date.isocalendar() return a structseq instance

2020-05-28 Thread Petr Viktorin
Petr Viktorin added the comment: This broke compilation with mingw; see https://bugs.python.org/issue40777 -- nosy: +petr.viktorin ___ Python tracker ___ _

[issue40777] _datetimemodule.c:3328:16: error: initializer element is not constant

2020-05-28 Thread Petr Viktorin
Change by Petr Viktorin : -- keywords: +patch nosy: +petr.viktorin nosy_count: 1.0 -> 2.0 pull_requests: +19742 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20493 ___ Python tracker

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

2020-05-28 Thread Guido van Rossum
Guido van Rossum added the comment: There will still be a lot of code written that way, because people need compatibility with earlier versions of Python. So I think it should be fixed in get_type_hints(). -- ___ Python tracker

[issue40777] _datetimemodule.c:3328:16: error: initializer element is not constant

2020-05-28 Thread Paul Ganssle
Change by Paul Ganssle : -- nosy: +p-ganssle ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

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

2020-05-28 Thread Zachary Ware
Zachary Ware added the comment: `operator` seems a slightly odd place for this. My naive expectation would be that `float(floatlike_obj)` should do what you want, but it seems that's not the case (too permissive of input types?). So then, what about an alternate constructor on the float ob

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

2020-05-28 Thread Fantix King
Change by Fantix King : -- pull_requests: +19743 pull_request: https://github.com/python/cpython/pull/20494 ___ Python tracker ___ _

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

2020-05-28 Thread Fantix King
Fantix King added the comment: Thanks for the comments! Added PR 20494 to properly fix/skip the test for (hopefully) all platforms. -- ___ Python tracker ___

[issue40777] _datetimemodule.c:3328:16: error: initializer element is not constant

2020-05-28 Thread miss-islington
Change by miss-islington : -- pull_requests: +19744 pull_request: https://github.com/python/cpython/pull/20495 ___ Python tracker ___ __

  1   2   >