[issue43978] Incorrect "versionadded" info in typing.NoReturn documentation

2021-04-29 Thread Rahul Kumaresan
Rahul Kumaresan added the comment: Although the documentation for 'typing.NoReturn' is made in: https://github.com/python/cpython/pull/7107/files The actual inclusion of the 'typing.NoReturn' was made through the following this PR: https://github.com/python/typing/pull/397 Also the change

[issue43976] Introduce mechanism to allow Python distributors to add custom site install schemes

2021-04-29 Thread Lumír Balhar
Change by Lumír Balhar : -- nosy: +frenzy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue15443] datetime module has no support for nanoseconds

2021-04-29 Thread mdcb
mdcb added the comment: In the confines of PTP / IEEE1588, it's actually quite common and can be useful. It's not so much the ns, but the <1us that is missing. -- ___ Python tracker

[issue43981] test_idle is leaking references

2021-04-29 Thread Terry J. Reedy
Terry J. Reedy added the comment: test_squeezer.ExpandingButtonTest accounts for most of the leak. python -m test -R3:3 -v -ugui -m *zer.Expand* test_idle test_idle leaked [576, 576, 576] references, sum=1728 test_idle leaked [282, 282, 282] memory blocks, sum=846 All 6 methods failed. I

[issue43817] Add inspect.get_annotations()

2021-04-29 Thread Larry Hastings
Larry Hastings added the comment: Thanks for your feedback, everybody! It's now checked in. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue43817] Add inspect.get_annotations()

2021-04-29 Thread Larry Hastings
Larry Hastings added the comment: New changeset 74613a46fc79cacc88d3eae4105b12691cd4ba20 by larryhastings in branch 'master': bpo-43817: Add inspect.get_annotations(). (#25522) https://github.com/python/cpython/commit/74613a46fc79cacc88d3eae4105b12691cd4ba20 --

[issue43978] Incorrect "versionadded" info in typing.NoReturn documentation

2021-04-29 Thread Rahul Kumaresan
Change by Rahul Kumaresan : -- nosy: +rahul-kumi ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43983] Can't install Python v3.9.4 / 0x80070643 / windows 10 64bit

2021-04-29 Thread Marwan Essam
Change by Marwan Essam : -- nosy: -Marwan ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43983] Can't install Python v3.9.4 / 0x80070643 / windows 10 64bit

2021-04-29 Thread Marwan Essam
New submission from Marwan Essam : Hello, While I was trying to install Python version 3.9.4 on Windows 10 64bit, Error 0x80070643 - Fatal error during installation is showing, with a message saying " install the process cannot access the file because another process has locked a portion of

[issue43981] test_idle is leaking references

2021-04-29 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset a62e424de0c394cda178a8d934d06f0559b5e28d by Terry Jan Reedy in branch 'master': bpo-43981: Fix error in idle-test leak test (GH-25739) https://github.com/python/cpython/commit/a62e424de0c394cda178a8d934d06f0559b5e28d --

[issue43981] test_idle is leaking references

2021-04-29 Thread Terry J. Reedy
Change by Terry J. Reedy : -- keywords: +patch pull_requests: +24430 stage: -> patch review pull_request: https://github.com/python/cpython/pull/25739 ___ Python tracker ___

[issue43981] test_idle is leaking references

2021-04-29 Thread Terry J. Reedy
Terry J. Reedy added the comment: The only recently added tests are the 11 in test_sidebar.ShellSidebarTest. Leak testing just these with python -m test -R3:3 -ugui -m *Sidebar* test_idle does not fail. Leak test all of test_idle with >python -m test -R3:3 -v -ugui test_idle ends after

[issue43951] Two minor fixes for C module object

2021-04-29 Thread Larry Hastings
Larry Hastings added the comment: Thanks for the review, Victor! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue43901] Lazy-create an empty annotations dict in all unannotated user classes and modules

2021-04-29 Thread Larry Hastings
Larry Hastings added the comment: Thanks for your feedback and reviews, everybody! Python just got an eensy teensy tiny bit better. -- assignee: -> larry resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python

[issue43901] Lazy-create an empty annotations dict in all unannotated user classes and modules

2021-04-29 Thread Larry Hastings
Larry Hastings added the comment: New changeset 2f2b69855d6524e15d12c15ddc0adce629e7de84 by larryhastings in branch 'master': bpo-43901: Lazy-create an empty annotations dict in all unannotated user classes and modules (#25623)

[issue41486] Add _BlocksOutputBuffer for bz2/lzma/zlib module

2021-04-29 Thread Ma Lin
Ma Lin added the comment: Found a backward incompatible behavior. Before the patch, in 64-bit build, zlib module allows the initial size > UINT32_MAX. It creates a bytes object, and uses a sliding window to deal with the UINT32_MAX limit:

[issue41486] Add _BlocksOutputBuffer for bz2/lzma/zlib module

2021-04-29 Thread Ma Lin
Change by Ma Lin : -- pull_requests: +24429 pull_request: https://github.com/python/cpython/pull/25738 ___ Python tracker ___ ___

[issue36077] Inheritance dataclasses fields and default init statement

2021-04-29 Thread Eric V. Smith
Eric V. Smith added the comment: I'm going to close this in favor of the kw_only work done in issue 43532. I realize they're not quite the same thing, but we'll see how it works out in Python 3.10, and possibly make adjustments when we have some real world experience. --

[issue42800] Traceback objects allow accessing frame objects without triggering audit hooks

2021-04-29 Thread Steve Dower
Steve Dower added the comment: The 3.9 backport is a bit different from what's in master, so would appreciate someone double-check it. It should go back to 3.8 just fine. -- ___ Python tracker

[issue43979] Simplify urllib.parse_qsl

2021-04-29 Thread robertohueso
robertohueso added the comment: Seems like a nice simplification to me. Can I open PR? :) -- nosy: +robertohueso ___ Python tracker ___

[issue42800] Traceback objects allow accessing frame objects without triggering audit hooks

2021-04-29 Thread Steve Dower
Change by Steve Dower : -- pull_requests: +24428 pull_request: https://github.com/python/cpython/pull/25737 ___ Python tracker ___

[issue43892] Make match patterns explicit in the AST

2021-04-29 Thread Brandt Bucher
Brandt Bucher added the comment: New changeset dbe60ee09dc5a624cfb78dff61ecf050a5b3f105 by Brandt Bucher in branch 'master': bpo-43892: Validate the first term of complex literal value patterns (GH-25735) https://github.com/python/cpython/commit/dbe60ee09dc5a624cfb78dff61ecf050a5b3f105

[issue43976] Introduce mechanism to allow Python distributors to add custom site install schemes

2021-04-29 Thread Filipe Laíns
Filipe Laíns added the comment: Making sysconfig look at sitecustomize seems like the wrong approach. It is behavior I would never expect, and there are use-cases where I still want the schemes to be present when the site module initialization is disabled. I would also argue that having this

[issue43982] Code coverage on the CI: validate codecov shell script checksum

2021-04-29 Thread Ned Deily
Ned Deily added the comment: I agree that we should just remove the code coverage runs rather than trying to improve their security. It seems to me to be rude of us to use so much of the open source build resources for an activity that appears to have little benefit. -- nosy:

[issue42800] Traceback objects allow accessing frame objects without triggering audit hooks

2021-04-29 Thread Steve Dower
Steve Dower added the comment: New changeset 87655e2cf58c543914ea05ebe5a0377441da1ef2 by Steve Dower in branch 'master': bpo-42800: Rename AUDIT_READ to PY_AUDIT_READ (GH-25736) https://github.com/python/cpython/commit/87655e2cf58c543914ea05ebe5a0377441da1ef2 --

[issue42904] get_type_hints does not provide localns for classes

2021-04-29 Thread Ken Jin
Ken Jin added the comment: Hmm I think you're right - the normal behavior in Python is for local variables to shadow global variables, and as a user I expect the same for eval in inspect.get_annotation. -- ___ Python tracker

[issue42800] Traceback objects allow accessing frame objects without triggering audit hooks

2021-04-29 Thread Steve Dower
Change by Steve Dower : -- pull_requests: +24427 pull_request: https://github.com/python/cpython/pull/25736 ___ Python tracker ___

[issue43982] Code coverage on the CI: validate codecov shell script checksum

2021-04-29 Thread Ammar Askar
Ammar Askar added the comment: See also https://github.com/python/cpython/pull/25679 where we're proposing just removing the coverage build altogether. -- nosy: +ammar2 ___ Python tracker

[issue43982] Code coverage on the CI: validate codecov shell script checksum

2021-04-29 Thread STINNER Victor
New submission from STINNER Victor : Currently, GitHub Action and Travis CI run a codecov bash downloaded from https://codecov.io/bash without validating it. The script was recently compromised: https://about.codecov.io/security-update/ We should validate the shell script integrity by

[issue42800] Traceback objects allow accessing frame objects without triggering audit hooks

2021-04-29 Thread Steve Dower
Steve Dower added the comment: Sure, I can do that. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42800] Traceback objects allow accessing frame objects without triggering audit hooks

2021-04-29 Thread STINNER Victor
STINNER Victor added the comment: Can you please rename AUDIT_READ to PY_AUDIT_READ? We should avoid adding symbols without Py/PY prefix to the Python C API. -- ___ Python tracker

[issue42800] Traceback objects allow accessing frame objects without triggering audit hooks

2021-04-29 Thread Steve Dower
Steve Dower added the comment: New changeset 9a2c2a9ec3140b6c54c9ef9d994311f114128ee3 by Ryan Hileman in branch 'master': bpo-42800: add audit hooks for f_code and tb_frame (GH-24182) https://github.com/python/cpython/commit/9a2c2a9ec3140b6c54c9ef9d994311f114128ee3 --

[issue40379] multiprocessing's default start method of fork()-without-exec() is broken

2021-04-29 Thread Andrew Duncan
Andrew Duncan added the comment: I just ran into and fixed (thanks to itamarst's blog post) a problem likely related to this. Multiprocessing workers performing work and sending a logging message back with success/fail info. I had a few intermittent deadlocks that became a recurring

[issue43892] Make match patterns explicit in the AST

2021-04-29 Thread Brandt Bucher
Change by Brandt Bucher : -- pull_requests: +24426 pull_request: https://github.com/python/cpython/pull/25735 ___ Python tracker ___

[issue43968] os.path.realpath() unexpected breaking change: resolves subst'd paths to real paths

2021-04-29 Thread Steve Dower
Steve Dower added the comment: I think Eryk's point is that the behaviour is correct, and it's unfortunate that certain tools use realpath() when they don't actually mean it (I've been bitten by this too with pytest). Presumably you want to replace realpath with abspath? --

[issue43977] Implement the latest semantics for PEP 634 for matching collections

2021-04-29 Thread Brandt Bucher
Change by Brandt Bucher : -- pull_requests: +24425 pull_request: https://github.com/python/cpython/pull/25734 ___ Python tracker ___

[issue43916] Check that new heap types cannot be created uninitialised

2021-04-29 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +24424 pull_request: https://github.com/python/cpython/pull/25733 ___ Python tracker ___

[issue43980] netrc module looks for .netrc even on Windows where the convention is _netrc

2021-04-29 Thread Jerry Heiselman
Jerry Heiselman added the comment: The netrc file has no formal standard, but the following supports the claim of its conventional naming. Excerpt from https://curl.se/docs/manpage.html#-n: "Makes curl scan the .netrc (_netrc on Windows) file in the user's home directory for login name and

[issue43980] netrc module looks for .netrc even on Windows where the convention is _netrc

2021-04-29 Thread Steven D'Aprano
Steven D'Aprano added the comment: This is a behaviour change not a simple bug fix. 3.6 through 3.9 are all in feature-freeze, and we're days away from the same for 3.10. Not that I don't believe you about the _netrc convention on Windows, but do you have a link to a reliable source

[issue43981] test_idle is leaking references

2021-04-29 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Marking this as a release blocker -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue43981] test_idle is leaking references

2021-04-29 Thread Pablo Galindo Salgado
New submission from Pablo Galindo Salgado : See for example: https://buildbot.python.org/all/#/builders/511/builds/10/steps/4/logs/stdio test_idle leaked [684, 684, 684] references, sum=2052 test_idle leaked [282, 282, 282] memory blocks, sum=846 -- assignee: terry.reedy components:

[issue37387] test_compileall fails randomly on Windows when tests are run in parallel

2021-04-29 Thread Eryk Sun
Eryk Sun added the comment: > What is the name of the new function introduced in Windows 10 NT API? > Should we use it if the version is detected as Windows 10 (through a > callback to a platform function or through GetVersion API)? No, _bootstrap_external._write_atomic() or

[issue42904] get_type_hints does not provide localns for classes

2021-04-29 Thread Larry Hastings
Larry Hastings added the comment: Thank you for your in-depth and thoughtful reply! I think that APIs should behave in a predictable way. So, for my use case, I tell the user that I'm passing "globals" and "locals" into eval()--and I think I'd have to have a *very* compelling reason to

[issue43976] Introduce mechanism to allow Python distributors to add custom site install schemes

2021-04-29 Thread Steve Dower
Steve Dower added the comment: Any reason this couldn't be in sitecustomize.py? Either by poking values into sysconfig directly (for back-compat) or we train sysconfig to look inside sitecustomize for a well-known name. -- nosy: +steve.dower ___

[issue43980] netrc module looks for .netrc even on Windows where the convention is _netrc

2021-04-29 Thread Jerry Heiselman
Jerry Heiselman added the comment: Created a simple PR to correct this. -- keywords: +patch message_count: 1.0 -> 2.0 pull_requests: +24423 stage: -> patch review pull_request: https://github.com/python/cpython/pull/25732 ___ Python tracker

[issue43980] netrc module looks for .netrc even on Windows where the convention is _netrc

2021-04-29 Thread Jerry Heiselman
New submission from Jerry Heiselman : The netrc library defaults to looking for the .netrc file in the user's home directory. On Windows, this file is conventionally named _netrc. While one could pass the correct path to the library, the conventionally correct path should be used on all

[issue43969] "bad magic number" when Python 2's pyc file exists without py file

2021-04-29 Thread Mitchell Hentges
Mitchell Hentges added the comment: Looking closer into this, it appears that Python 3 will still try to load non-__pycache__ `.pyc` files. Perhaps I'm missing context, but aren't those only supposed by to written and read by Python 2? Location where `pyc` loader is registered:

[issue37387] test_compileall fails randomly on Windows when tests are run in parallel

2021-04-29 Thread Shreyan Avigyan
Shreyan Avigyan added the comment: What is the name of the new function introduced in Windows 10 NT API? Should we use it if the version is detected as Windows 10 (through a callback to a platform function or through GetVersion API)? -- ___

[issue43979] Simplify urllib.parse_qsl

2021-04-29 Thread Christoph Zwerschke
New submission from Christoph Zwerschke : Just noticed the following code in urrlib.parse_qsl: pairs = [s1 for s1 in qs.split(separator)] for name_value in pairs: ... see https://github.com/python/cpython/blob/088a15c49d99ecb4c3bef93f8f40dd513c6cae3b/Lib/urllib/parse.py#L755

[issue37387] test_compileall fails randomly on Windows when tests are run in parallel

2021-04-29 Thread Eryk Sun
Eryk Sun added the comment: > I don't know enough about when and why CPython decides to > replace .pyc files It's straight-forward in the case of py_compile.compile(): >>> pyc = py_compile.compile('test.py') >>> f = open(pyc) >>> try: py_compile.compile('test.py') ...

[issue43933] Regression in python3.10 with traceback frame having lineno of -1

2021-04-29 Thread Mark Shannon
Mark Shannon added the comment: New changeset 088a15c49d99ecb4c3bef93f8f40dd513c6cae3b by Mark Shannon in branch 'master': bpo-43933: Show frame.f_lineno as None, rather than -1, if there is no line number. (GH-25717)

[issue42589] doc: Wrong "from" keyword link in Exceptions doc

2021-04-29 Thread miss-islington
miss-islington added the comment: New changeset 3eaa6f9d185f2a2c66d98a77d3ea3f407bc96d0e by Miss Islington (bot) in branch '3.9': bpo-42589: Change URL for 'from' link when used in a raised exception (GH-23872) https://github.com/python/cpython/commit/3eaa6f9d185f2a2c66d98a77d3ea3f407bc96d0e

[issue43978] Incorrect "versionadded" info in typing.NoReturn documentation

2021-04-29 Thread Mariatta
New submission from Mariatta : We received a documentation bug report in docs mailing list. https://mail.python.org/archives/list/d...@python.org/thread/BLANNZUPUEOJ4LJYSJNNFLK5I7NYE3GH/# It looks like the doc currently says that, typing.NoReturn was added in both 3.5.4 and 3.6.2 It

[issue42589] doc: Wrong "from" keyword link in Exceptions doc

2021-04-29 Thread Mariatta
Mariatta added the comment: Thanks for the PR. There is conflict with applying it to the 3.8 branch. If you can get to it, it would be great. Thanks. -- nosy: +Mariatta stage: patch review -> backport needed ___ Python tracker

[issue42589] doc: Wrong "from" keyword link in Exceptions doc

2021-04-29 Thread miss-islington
Change by miss-islington : -- pull_requests: +24421 pull_request: https://github.com/python/cpython/pull/25730 ___ Python tracker ___

[issue42589] doc: Wrong "from" keyword link in Exceptions doc

2021-04-29 Thread miss-islington
miss-islington added the comment: New changeset 2fd928c8c1328424130cb9c51fc02ad5f9a66328 by sblondon in branch 'master': bpo-42589: Change URL for 'from' link when used in a raised exception (GH-23872) https://github.com/python/cpython/commit/2fd928c8c1328424130cb9c51fc02ad5f9a66328

[issue43882] [security] urllib.parse should sanitize urls containing ASCII newline and tabs.

2021-04-29 Thread Senthil Kumaran
Senthil Kumaran added the comment: New changeset 491fde0161d5e527eeff8586dd3972d7d3a631a7 by Miss Islington (bot) in branch '3.9': [3.9] bpo-43882 - urllib.parse should sanitize urls containing ASCII newline and tabs. (GH-25595) (GH-25725)

[issue37387] test_compileall fails randomly on Windows when tests are run in parallel

2021-04-29 Thread Tim Peters
Tim Peters added the comment: A "good" solution would be one that runs the test in such a way that it doesn't fail only on Windows ;-) There are presumably many ways that could be accomplished, including ugly ones. For example, if test_compileall is in the collection of tests to be run, and

[issue43977] Implement the latest semantics for PEP 634 for matching collections

2021-04-29 Thread Brandt Bucher
Change by Brandt Bucher : -- nosy: +brandtbucher ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37387] test_compileall fails randomly on Windows when tests are run in parallel

2021-04-29 Thread Shreyan Avigyan
Shreyan Avigyan added the comment: What should we do? Should we skip test_compileall if the test suite is run in parallel? -- ___ Python tracker ___

[issue37387] test_compileall fails randomly on Windows when tests are run in parallel

2021-04-29 Thread Tim Peters
Tim Peters added the comment: @Sheyvan, whether it's possible to delete (rename, etc) an open file is a property not of Python, but of the operating system. Windows doesn't allow it; Linux (for example) does. It's generally considered to be "a bug" in CPython's implementation whenever it

[issue43882] [security] urllib.parse should sanitize urls containing ASCII newline and tabs.

2021-04-29 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +24417 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/25725 ___ Python tracker

[issue43882] [security] urllib.parse should sanitize urls containing ASCII newline and tabs.

2021-04-29 Thread miss-islington
Change by miss-islington : -- pull_requests: +24420 pull_request: https://github.com/python/cpython/pull/25728 ___ Python tracker ___

[issue43882] [security] urllib.parse should sanitize urls containing ASCII newline and tabs.

2021-04-29 Thread miss-islington
Change by miss-islington : -- pull_requests: +24419 pull_request: https://github.com/python/cpython/pull/25727 ___ Python tracker ___

[issue43882] [security] urllib.parse should sanitize urls containing ASCII newline and tabs.

2021-04-29 Thread miss-islington
Change by miss-islington : -- pull_requests: +24418 pull_request: https://github.com/python/cpython/pull/25726 ___ Python tracker ___

[issue43882] [security] urllib.parse should sanitize urls containing ASCII newline and tabs.

2021-04-29 Thread Senthil Kumaran
Senthil Kumaran added the comment: New changeset 76cd81d60310d65d01f9d7b48a8985d8ab89c8b4 by Senthil Kumaran in branch 'master': bpo-43882 - urllib.parse should sanitize urls containing ASCII newline and tabs. (GH-25595)

[issue43974] setup.py should set Py_BUILD_CORE_MODULE as defined macro

2021-04-29 Thread STINNER Victor
STINNER Victor added the comment: > It looks like we can also cleanup Modules/Setup and remove > -DPy_BUILD_CORE_BUILTIN and -DPy_BUILD_CORE_MODULE. Modules/makesetup adds > $PY_BUILTIN_MODULE_CFLAGS in the compile step. Oh, I didn't notice. --

[issue43974] setup.py should set Py_BUILD_CORE_MODULE as defined macro

2021-04-29 Thread STINNER Victor
STINNER Victor added the comment: I would prefer to limit the usage of the internal C API in extension modules built as dynamic libraries. See bpo-4: "[C API] Convert a few stdlib extensions to the limited C API (PEP 384)". Also, this issue is motived by PR 25653 which requires to use

[issue43565] PyUnicode_KIND macro does not has specified return type

2021-04-29 Thread Ammar Askar
Change by Ammar Askar : -- keywords: +patch nosy: +ammar2 nosy_count: 4.0 -> 5.0 pull_requests: +24416 stage: -> patch review pull_request: https://github.com/python/cpython/pull/25724 ___ Python tracker

[issue41282] Deprecate and remove distutils

2021-04-29 Thread Filipe Laíns
Filipe Laíns added the comment: We have discussed this approach a little in a few bug trackers, but I opened https://discuss.python.org/t/mechanism-for-distributors-to-add-site-install-schemes-to-python-installations/8467. -- ___ Python tracker

[issue43977] Implement the latest semantics for PEP 634 for matching collections

2021-04-29 Thread Mark Shannon
Change by Mark Shannon : -- keywords: +patch pull_requests: +24415 stage: -> patch review pull_request: https://github.com/python/cpython/pull/25723 ___ Python tracker ___

[issue43977] Implement the latest semantics for PEP 634 for matching collections

2021-04-29 Thread Mark Shannon
New submission from Mark Shannon : PEP 634 has been updated to allow a faster and more robust implementation of matching sequences and mappings: https://github.com/python/peps/pull/1937 It needs to be implemented. -- assignee: Mark.Shannon messages: 392330 nosy: Mark.Shannon

[issue41282] Deprecate and remove distutils

2021-04-29 Thread Paul Moore
Paul Moore added the comment: I'd suggest also posting it on the Packaging discourse, to get feedback from other distro maintainers. -- ___ Python tracker ___

[issue43614] Search is not beginner friendly

2021-04-29 Thread Ammar Askar
Ammar Askar added the comment: Just a little update to this, now that issue34398 is fixed it is possible to make this more beginner friendly by making sure the right terms have glossary entries. As an example, here is a search for "argument" on the latest docs:

[issue41282] Deprecate and remove distutils

2021-04-29 Thread Filipe Laíns
Filipe Laíns added the comment: That is reasonable. I have created bpo-43976. -- ___ Python tracker ___ ___ Python-bugs-list

[issue43976] Introduce mechanism to allow Python distributors to add custom site install schemes

2021-04-29 Thread Filipe Laíns
New submission from Filipe Laíns : As part of the distutils migration we plan to add a mechanism to let Python distributors to add site install schemes. Currently, Python distributors are patching distutils to add custom install schemes for their packages. I think most of the reasoning boils

[issue43908] array.array should remain immutable: add Py_TPFLAGS_IMMUTABLETYPE flag

2021-04-29 Thread Guido van Rossum
Guido van Rossum added the comment: I don’t think we’re waiting for more crazy hacks. On Thu, Apr 29, 2021 at 07:27 STINNER Victor wrote: > > STINNER Victor added the comment: > > > > https://discuss.python.org/t/list-of-built-in-types-converted-to-heap-types/8403 > > In the past, I used

[issue43908] array.array and re types must be immutable: add Py_TPFLAGS_IMMUTABLETYPE flag

2021-04-29 Thread Guido van Rossum
Guido van Rossum added the comment: That is as intended, right? On Thu, Apr 29, 2021 at 07:59 STINNER Victor wrote: > > STINNER Victor added the comment: > > check_set_special_type_attr() is used to prevent setting the following > attributes: > > * __name__ > * __qualname__ > * __module__

[issue43916] Check that new heap types cannot be created uninitialised

2021-04-29 Thread Christian Heimes
Change by Christian Heimes : -- pull_requests: +24413 pull_request: https://github.com/python/cpython/pull/25722 ___ Python tracker ___

[issue37387] test_compileall fails randomly on Windows when tests are run in parallel

2021-04-29 Thread Shreyan Avigyan
Shreyan Avigyan added the comment: @vstinner What do you think? I'm not sure if there's a solution to this. -- ___ Python tracker ___

[issue41282] Deprecate and remove distutils

2021-04-29 Thread Éric Araujo
Éric Araujo added the comment: PR 25718 was opened and linked to this ticket. It changes sysconfig to load install schemes from a separate module, so it’s not strictly about removing distutils but adding a new system customization feature. I think it needs its own bug and mailing-list

[issue43916] Check that new heap types cannot be created uninitialised

2021-04-29 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +24412 pull_request: https://github.com/python/cpython/pull/25721 ___ Python tracker ___

[issue42904] get_type_hints does not provide localns for classes

2021-04-29 Thread Ken Jin
Ken Jin added the comment: @larry > Is this "surprising, but required" behavior due specifically to this being a > backwards-incompatible change? Yes. That's the main factor. I've since learnt that there's sadly more to it though :( (see below). > Does that mean I don't have the problem

[issue43899] separate builtin function

2021-04-29 Thread Ammar Askar
Ammar Askar added the comment: Note that the `more_itertools` package on pypi also has a partition method. Shall we close this off given that a recipe is already present and this is available as part of a popular 3rd-party library? -- nosy: +ammar2

[issue43922] Double dots in quopri transported emails

2021-04-29 Thread Julien Castiaux
Julien Castiaux added the comment: Hello David, The third party smtp software that causes troubles have been identified ! We are still investigating how to fix the problem at its root, ultimately this "fix" would not even be necessary. I'll keep you informed, just don't review or close the

[issue43908] array.array and re types must be immutable: add Py_TPFLAGS_IMMUTABLETYPE flag

2021-04-29 Thread STINNER Victor
STINNER Victor added the comment: check_set_special_type_attr() is used to prevent setting the following attributes: * __name__ * __qualname__ * __module__ * __bases__ * __doc__ Right now, I cannot set the attribues on array.array type: $ ./python Python 3.10.0a7+

[issue42904] get_type_hints does not provide localns for classes

2021-04-29 Thread Larry Hastings
Larry Hastings added the comment: kj: I just added support for default locals to inspect.get_annotation(), and I basically copied-and-pasted your dict(vars(base)) approach. Is this "surprising, but required" behavior due specifically to this being a backwards-incompatible change?

[issue43908] array.array and re types must be immutable: add Py_TPFLAGS_IMMUTABLETYPE flag

2021-04-29 Thread STINNER Victor
Change by STINNER Victor : -- title: array.array should remain immutable: add Py_TPFLAGS_IMMUTABLETYPE flag -> array.array and re types must be immutable: add Py_TPFLAGS_IMMUTABLETYPE flag ___ Python tracker

[issue43908] array.array should remain immutable: add Py_TPFLAGS_IMMUTABLETYPE flag

2021-04-29 Thread STINNER Victor
STINNER Victor added the comment: > https://discuss.python.org/t/list-of-built-in-types-converted-to-heap-types/8403 In the past, I used _random.Random for manual tests to compare static type and heap types, check which one is mutable. C type _random.Random is inherited by Python type

[issue37387] test_compileall fails randomly on Windows when tests are run in parallel

2021-04-29 Thread Shreyan Avigyan
Shreyan Avigyan added the comment: I don't think it's a bug at all. It's a feature of Python that's causing this. And since it's not a bug I don't think copying the files in temporary directory would help at all because Windows is not giving the error. Python is giving the error to Python

[issue43908] array.array should remain immutable: add Py_TPFLAGS_IMMUTABLETYPE flag

2021-04-29 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: > check_set_special_type_attr() must also be updated to check for > Py_TPFLAGS_IMMUTABLETYPE flag. Ok, lets just use this issue for the PR. I can fix it in an hour or so. -- ___ Python tracker

[issue43973] Use Py_TPFLAGS_IMMUTABLETYPE in __class__ assignments check

2021-04-29 Thread STINNER Victor
STINNER Victor added the comment: > IMO, we can drop most (all?) of the huge comment before the check in > object_set_class(). I don't think so. I don't understand why it's allowed to override the __class__ attribute of ModuleType instances whereas it's a static type. IMO the long comment

[issue43908] array.array should remain immutable: add Py_TPFLAGS_IMMUTABLETYPE flag

2021-04-29 Thread STINNER Victor
STINNER Victor added the comment: > Erlend: Do you want to write such change? Erlend created bpo-43973 and PR 25714. -- ___ Python tracker ___

[issue43908] array.array should remain immutable: add Py_TPFLAGS_IMMUTABLETYPE flag

2021-04-29 Thread STINNER Victor
Change by STINNER Victor : -- title: array.array should remain immutable -> array.array should remain immutable: add Py_TPFLAGS_IMMUTABLETYPE flag ___ Python tracker ___

[issue43908] array.array should remain immutable

2021-04-29 Thread STINNER Victor
STINNER Victor added the comment: check_set_special_type_attr() must also be updated to check for Py_TPFLAGS_IMMUTABLETYPE flag. -- ___ Python tracker ___

[issue37387] test_compileall fails randomly on Windows when tests are run in parallel

2021-04-29 Thread Shreyan Avigyan
Shreyan Avigyan added the comment: I've experienced that when a module is imported in the interpreter that module file (.py, .pyc, .pyd) cannot be deleted, renamed, rewritten, etc. When that session is closed only then the file can be deleted, renamed, rewritten, all that stuff. Running

[issue40222] "Zero cost" exception handling

2021-04-29 Thread Mark Shannon
Mark Shannon added the comment: I've played around with a few formats, and what I've ended up with is this: 1. Use the >> marker for for exception targets, as well as normal branch targets. 2. Add a text version of the exception handler table at the end of the disassembly. This has all the

[issue28254] Add C API for gc.enable, gc.disable, and gc.isenabled

2021-04-29 Thread Petr Viktorin
Petr Viktorin added the comment: New changeset 14fc2bdfab857718429029e53ceffca456178827 by Petr Viktorin in branch 'master': bpo-28254: Add PyGC_ functions to the stable ABI manifest (GH-25720) https://github.com/python/cpython/commit/14fc2bdfab857718429029e53ceffca456178827 --

[issue32824] Docs: Using Python on a Macintosh has bad info per Apple site

2021-04-29 Thread Glenn Travis
Glenn Travis added the comment: Here is a copy of the Apple Python call as of April 29, 2021. To my way of thinking it seems that Apple is saying that someday they will indeed eliminate all the included “scripting” software from macOS and they further imply that one should install an.

[issue40222] "Zero cost" exception handling

2021-04-29 Thread Mark Shannon
Mark Shannon added the comment: Responding to Serhiy's suggestions: 1 Add another column: Adding another column makes for lots of repetition in larger try blocks, and pushes useful information further to the right. 2 Add pseudo-instructions I find those misleading, as they aren't really

  1   2   >