[issue38085] Interrupting class creation in __init_subclass__ may lead to incorrect isinstance() and issubclass() results

2020-12-25 Thread xitop
xitop added the comment: Python 3.9.1 is affected too. -- versions: +Python 3.9 ___ Python tracker ___ ___ Python-bugs-list mailing

[issue42737] PEP 563: drop annotations for complex assign targets

2020-12-25 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- keywords: +patch pull_requests: +22799 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23952 ___ Python tracker ___

[issue42748] test_asdl_parser: load_module() method is deprecated

2020-12-25 Thread Batuhan Taskaya
New submission from Batuhan Taskaya : Running test_asdl_parser raises a deprecation warning: 0:00:26 load avg: 1.05 [ 23/426] test_asdl_parser :283: DeprecationWarning: the load_module() method is deprecated and slated for removal in Python 3.12; use exec_module() instead probably related with

[issue42687] tokenize module does not recognize Barry as FLUFL

2020-12-25 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: I concur with Terry. -- nosy: +BTaskaya ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue16396] Importing ctypes.wintypes on Linux gives a ValueError instead of an ImportError

2020-12-25 Thread Shantanu
Change by Shantanu : -- nosy: +hauntsaninja nosy_count: 12.0 -> 13.0 pull_requests: +22798 pull_request: https://github.com/python/cpython/pull/23951 ___ Python tracker ___ ___

[issue42733] io's r+ mode truncate(0)

2020-12-25 Thread Steven D'Aprano
Steven D'Aprano added the comment: On Sat, Dec 26, 2020 at 02:19:55AM +, Terry J. Reedy wrote: > "Enhancements" (non-bugfix feature changes) can only be applied to > future versions. However, you are asking for the reversion of an > intentional feature change made in a 'bugfix' release#

[issue42735] "trace_at_recursion_limit.py" should be removed from "Python/Lib/test/crashers"

2020-12-25 Thread Terry J. Reedy
Change by Terry J. Reedy : -- nosy: +serhiy.storchaka versions: -Python 3.7 ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue42733] [issue] io's r+ mode truncate(0)

2020-12-25 Thread Steven D'Aprano
Steven D'Aprano added the comment: On Fri, Dec 25, 2020 at 01:31:51PM +, 施文峰 wrote: > first test have a problem,you didn’t use r+ mode I did, I copied your `test()` function exactly, however I did make a mistake. I tried again with this: >>> with open(FILE_PATH, 'r') as f: ... print(

[issue42733] io's r+ mode truncate(0)

2020-12-25 Thread Terry J. Reedy
Terry J. Reedy added the comment: "Enhancements" (non-bugfix feature changes) can only be applied to future versions. However, you are asking for the reversion of an intentional feature change made in a 'bugfix' release# for (I believe) 3.1. Before the change, as I remember, truncating to 0

[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2020-12-25 Thread STINNER Victor
STINNER Victor added the comment: > bpo-40521: Per-interpreter interned strings (GH-20085) That one wasn't easy, but it's now done! I close the issue. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.10 -Python 3.9 __

[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2020-12-25 Thread STINNER Victor
STINNER Victor added the comment: New changeset ea251806b8d11b30d2182af1e589caf88acf by Victor Stinner in branch 'master': bpo-40521: Per-interpreter interned strings (GH-20085) https://github.com/python/cpython/commit/ea251806b8d11b30d2182af1e589caf88acf -- ___

[issue42713] Segmentation fault in running eval() with large expression size.

2020-12-25 Thread Terry J. Reedy
Change by Terry J. Reedy : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Segmentation fault in running ast.literal_eval() with large expression size. ___ Python tracker

[issue42714] Segmentation fault in running compile() with large expression size.

2020-12-25 Thread Terry J. Reedy
Change by Terry J. Reedy : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Segmentation fault in running ast.literal_eval() with large expression size. ___ Python tracker

[issue42715] Segmentation fault in running exec() with large expression size.

2020-12-25 Thread Terry J. Reedy
Change by Terry J. Reedy : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Segmentation fault in running ast.literal_eval() with large expression size. ___ Python tracker

[issue42716] Segmentation fault in running ast.parse() with large expression size.

2020-12-25 Thread Terry J. Reedy
Change by Terry J. Reedy : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Segmentation fault in running ast.literal_eval() with large expression size. ___ Python tracker

[issue42257] platform.libc_ver() doesn't consider in case of executable is empty string

2020-12-25 Thread Ned Deily
Change by Ned Deily : -- nosy: +lemburg ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.o

[issue42694] Failed test_new_curses_panel in test_curses

2020-12-25 Thread STINNER Victor
Change by STINNER Victor : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ __

[issue42694] Failed test_new_curses_panel in test_curses

2020-12-25 Thread STINNER Victor
STINNER Victor added the comment: New changeset 993e88cf08994f7c1e0f9f62fda4ed32634ee2ad by Victor Stinner in branch 'master': bpo-42694: Prevent creating _curses_panel.panel (GH-23948) https://github.com/python/cpython/commit/993e88cf08994f7c1e0f9f62fda4ed32634ee2ad -- ___

[issue42687] tokenize module does not recognize Barry as FLUFL

2020-12-25 Thread Terry J. Reedy
Terry J. Reedy added the comment: I strongly disagree. '<>' is not a legal operator any more. It is a parse-time syntax error. Whatever historical artifact is left in the CPython tokenizer, recognizing '<>' is not exposed to Python code. >>> p = ast.parse('a <> b') Traceback (most recent

[issue42745] [subinterpreters] Make the type attribute lookup cache per-interpreter

2020-12-25 Thread STINNER Victor
Change by STINNER Victor : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ __

[issue42745] [subinterpreters] Make the type attribute lookup cache per-interpreter

2020-12-25 Thread STINNER Victor
STINNER Victor added the comment: New changeset 41010184880151d6ae02a226dbacc796e5c90d11 by Victor Stinner in branch 'master': bpo-42745: Make the type cache per-interpreter (GH-23947) https://github.com/python/cpython/commit/41010184880151d6ae02a226dbacc796e5c90d11 --

[issue42694] Failed test_new_curses_panel in test_curses

2020-12-25 Thread mohamed koubaa
Change by mohamed koubaa : -- nosy: +koubaa nosy_count: 2.0 -> 3.0 pull_requests: +22797 pull_request: https://github.com/python/cpython/pull/21986 ___ Python tracker ___ _

[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-12-25 Thread STINNER Victor
STINNER Victor added the comment: > These changes introduced a regression in test_curses (see issue42694). And I > afraid then introduced regressions in other modules for which there were not > purposed tests. In my experience, when a type is modified to prevent creating an instance using t

[issue42694] Failed test_new_curses_panel in test_curses

2020-12-25 Thread STINNER Victor
STINNER Victor added the comment: I can reproduce the issue with the command: ./python -m test -u all test_curses I wrote PR 23948 to fix the regression. Note: "./python -m test test_curses" doesn't fail since the test is skipped. -- ___ Python t

[issue42694] Failed test_new_curses_panel in test_curses

2020-12-25 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +22796 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23948 ___ Python tracker ___ _

[issue39465] [subinterpreters] Design a subinterpreter friendly alternative to _Py_IDENTIFIER

2020-12-25 Thread STINNER Victor
STINNER Victor added the comment: Ok, it should now be fixed. I close the issue. See PR 20085 "Per-interpreter interned strings" of bpo-40521 for the follow-up. -- ___ Python tracker ___

[issue39465] [subinterpreters] Design a subinterpreter friendly alternative to _Py_IDENTIFIER

2020-12-25 Thread STINNER Victor
Change by STINNER Victor : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.10 ___ Python tracker ___ ___

[issue42747] Remove Py_TPFLAGS_HAVE_VERSION_TAG flag?

2020-12-25 Thread STINNER Victor
New submission from STINNER Victor : Since the PyTypeObject structure is excluded from the limited C API and the stable ABI on purpose (PEP 384), I don't see the purpose of the Py_TPFLAGS_HAVE_VERSION_TAG flag. Moreover, a new flag was added recently: #if !defined(Py_LIMITED_API) || Py_LIMIT

[issue39465] [subinterpreters] Design a subinterpreter friendly alternative to _Py_IDENTIFIER

2020-12-25 Thread STINNER Victor
STINNER Victor added the comment: New changeset ba3d67c2fb04a7842741b1b6da5d67f22c579f33 by Victor Stinner in branch 'master': bpo-39465: Fix _PyUnicode_FromId() for subinterpreters (GH-20058) https://github.com/python/cpython/commit/ba3d67c2fb04a7842741b1b6da5d67f22c579f33 --

[issue40512] [subinterpreters] Meta issue: per-interpreter GIL

2020-12-25 Thread STINNER Victor
STINNER Victor added the comment: > Type method cache is shared. I created bpo-42745: "[subinterpreters] Make the type attribute lookup cache per-interpreter". -- ___ Python tracker ___

[issue42746] python3.7.3 - ssl.SSLContext() - "Killed"

2020-12-25 Thread yaksha nyx
New submission from yaksha nyx : I got a very strange issue with my Python3.7.3. I use ssl module with urllin.request , when I visit some https website my script always die .so I got this : *** Python 3.7.3 (default, Dec 26 2020,

[issue42745] [subinterpreters] Make the type attribute lookup cache per-interpreter

2020-12-25 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +22795 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23947 ___ Python tracker ___ _

[issue42745] [subinterpreters] Make the type attribute lookup cache per-interpreter

2020-12-25 Thread STINNER Victor
Change by STINNER Victor : -- title: [subinterpreters] Make the type lookup cache per-interpreter -> [subinterpreters] Make the type attribute lookup cache per-interpreter ___ Python tracker

[issue42741] Sync 3.9's whatsnew document in 3.10 with 3.9 branch

2020-12-25 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue36876] [subinterpreters] Global C variables are a problem

2020-12-25 Thread Eric Snow
Eric Snow added the comment: New changeset 5ae9be68d9f1a628fdc920b647257f94afb77887 by Eric Snow in branch 'master': bpo-36876: [c-analyzer tool] Additional CLI updates for "capi" command. (gh-23929) https://github.com/python/cpython/commit/5ae9be68d9f1a628fdc920b647257f94afb77887

[issue42745] [subinterpreters] Make the type lookup cache per-interpreter

2020-12-25 Thread STINNER Victor
New submission from STINNER Victor : Currently, the type lookup cache is shared by all interpreter which causes multiple issues: * The version tag is currently protected by the GIL, but it would require a new lock if the GIL is made per interpreter (bpo-40512) * Clearing the cache in an inte

[issue42222] Modernize integer test/conversion in randrange()

2020-12-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: There is another randrange() oddity. If stop is None, the step argument is ignored: >>> randrange(100, stop=None, step=10) 4 If we want to fully harmonize with range(), then randrange() should only accept positional arguments and should not allo

[issue42318] [tkinter] surrogate pairs in Tcl/Tk string when pasting an emoji in a text widget

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

[issue42318] [tkinter] surrogate pairs in Tcl/Tk string when pasting an emoji in a text widget

2020-12-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 4d840e428ab1a2712f219c5e4008658cbe15892e by Miss Islington (bot) in branch '3.8': [3.8] bpo-42318: Fix support of non-BMP characters in Tkinter on macOS (GH-23281). (GH-23784) (GH-23787) https://github.com/python/cpython/commit/4d840e428ab1a2

[issue42742] Add abc.Mapping to dataclass

2020-12-25 Thread Anton Abrosimov
Anton Abrosimov added the comment: Thanks for the good offer, I will definitely use it. -- ___ Python tracker ___ ___ Python-bugs-l

[issue42737] PEP 563: drop annotations for complex assign targets

2020-12-25 Thread Guido van Rossum
Guido van Rossum added the comment: So the distinction between simple and complex is to define what goes into `__annotations__`. As long as we don't disturb that I think it's fine not to evaluate anything. (There's also the effect on what's considered a local variable, inside functions.) --

[issue40494] collections.abc.Callable and type variables

2020-12-25 Thread Guido van Rossum
Guido van Rossum added the comment: Indeed. Thanks! -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___

[issue42742] Add abc.Mapping to dataclass

2020-12-25 Thread Eric V. Smith
Eric V. Smith added the comment: I'm just warning you that I probably won't accept it. I haven't heard of any demand for this feature. You might want to bring it up on python-ideas if you want to generate support for the proposal. -- ___ Python t

[issue42742] Add abc.Mapping to dataclass

2020-12-25 Thread Anton Abrosimov
Anton Abrosimov added the comment: This Mixin only works with dataclass objects. And uses the private functionality of the dataclasses. So dataclasses.py is the right place for this. I think I can do enough tests. And I think that this is too little for a standalone project. -- ___

[issue38649] tkinter messagebox is sloppy

2020-12-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I agree that there is a problem. tkinter.messagebox is poorly documented. Different functions can return True, False, None or the name of the button, and it is not specified which function what returns. Set of acceptable values for type and icon are not do

[issue39177] In tkinter, simple dialogs, askstrings, etc. with flexible coordinates and no viewable parent.

2020-12-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Issue42685 improved positioning of dialog windows. Now they are centered at the parent window or screen if there is no parent. It corresponds to behavior of Tk message boxes. Issue42721 made dialogs be usable without default root window. Temporary hidden

[issue42742] Add abc.Mapping to dataclass

2020-12-25 Thread Eric V. Smith
Eric V. Smith added the comment: I don't think this belongs in dataclasses itself, at least not until it's been vetted widely. You might want to put it on PyPI first as a standalone project. -- ___ Python tracker

[issue42742] Add abc.Mapping to dataclass

2020-12-25 Thread Anton Abrosimov
Anton Abrosimov added the comment: I think the second option looks better. More pythonic. No need to create new classes No typing hacks. Mixin can be easily expanded. Yes, I will do refactoring, typing, documentation and tests in PR. -- ___ Python

[issue39171] Missing default root in tkinter simpledialog.py

2020-12-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Issue42721 made possible to use these dialogs without default root window. A temporary hidden root window is created for the time of life of a dialog and it is not set as default root window. Positioning dialog wit5hout parent was improved in issue42685.

[issue42742] Add abc.Mapping to dataclass

2020-12-25 Thread Anton Abrosimov
Anton Abrosimov added the comment: An alternative way: from collections.abc import Mapping from dataclasses import dataclass, fields, _FIELDS, _FIELD class DataclassMappingMixin(Mapping): def __iter__(self): return (f.name for f in fields(self)) def __getitem__(self, key):

[issue35728] Tkinter font nametofont requires default root

2020-12-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 36a779e64c580519550aa6478c5aa8c58b8fa7b6 by Desmond Cheong in branch 'master': bpo-35728: Add root parameter to tkinter.font.nametofont() (GH-23885) https://github.com/python/cpython/commit/36a779e64c580519550aa6478c5aa8c58b8fa7b6 --

[issue42742] Add abc.Mapping to dataclass

2020-12-25 Thread Eric V. Smith
Eric V. Smith added the comment: Something like that. You'd have to write some tests and try it out. -- ___ Python tracker ___ ___

[issue15303] Minor revision to the method in Tkinter

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

[issue42734] Outdated CodeType call in "bogus_code_obj.py"

2020-12-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: To be honest, I was not sure that replace() exists in 3.8 and I was too lazy to write different code for different versions. Next time when bogus_code_obj.py become outdated again we will use replace(). -- resolution: -> fixed stage: patch review

[issue42721] Using of simple dialogs without default root window

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

[issue42744] pkg_resources seems to treat python 3.10 as python 3.1

2020-12-25 Thread RhinosF1
New submission from RhinosF1 : As seen in https://github.com/MirahezeBots/MirahezeBots/pull/380/checks?check_run_id=1609121656, pkg_resources is throwing errors about version conflicts as it seems it thinks 3.10 is 3.1 or similar. This was fixed for PyPA/Pip in https://github.com/pypa/pip/is

[issue42734] Outdated CodeType call in "bogus_code_obj.py"

2020-12-25 Thread Dennis Sweeney
Dennis Sweeney added the comment: To make it slightly more readable and future-proof so such things don't become outdated again in the future, you could use the CodeType.replace() method. See also https://bugs.python.org/issue42422 -- nosy: +Dennis Sweeney __

[issue42742] Add abc.Mapping to dataclass

2020-12-25 Thread Anton Abrosimov
Anton Abrosimov added the comment: Thanks for the answer, I agree. The implementation should be like this? from collections.abc import Mapping from dataclasses import dataclass, fields, _FIELDS, _FIELD class _DataclassMappingMixin(Mapping): def __iter__(self): return (f.name for

[issue42736] Add support for making Linux prctl(...) calls to subprocess

2020-12-25 Thread Benjamin Peterson
Benjamin Peterson added the comment: I wonder if a dedicated datatype should be created for all os-specific parameters like https://golang.org/pkg/syscall/#SysProcAttr. Popen already has way too many parameters. And prctl is a very general interface; probably 98% of prctls would never need t

[issue42721] Using of simple dialogs without default root window

2020-12-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 675c97eb6c7c14c6a68ebf476c52931c1e5c1220 by Serhiy Storchaka in branch 'master': bpo-42721: Improve using simple dialogs without root window (GH-23897) https://github.com/python/cpython/commit/675c97eb6c7c14c6a68ebf476c52931c1e5c1220 ---

[issue42742] Add abc.Mapping to dataclass

2020-12-25 Thread Eric V. Smith
Eric V. Smith added the comment: You'd need to return a different class in order to add the collections.abc.Mapping base class. Currently, dataclasses by design always return the same class that's passed in. I'd suggest adding this as a stand-alone decorator. -- assignee: -> eric.s

[issue28964] AST literal_eval exceptions provide no information about line number

2020-12-25 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ _

[issue28964] AST literal_eval exceptions provide no information about line number

2020-12-25 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: New changeset 586f3dbe15139cafb2a6ffb82cea146906561844 by Irit Katriel in branch 'master': bpo-28964: add line number of node (if available) to ast.literal_eval error messages (GH-23677) https://github.com/python/cpython/commit/586f3dbe15139cafb2a6ffb82cea1

[issue42743] pdb vanishing breakpoints

2020-12-25 Thread Daniel Schreck
New submission from Daniel Schreck : Using pdb, breakpoints disappear when stepping into a function in another module. They're not hit from then on. HOWEVER, if any new breakpoint is entered, all the breakpoints reappear. They vanish every time the debugger steps across the module, and only r

[issue42742] Add abc.Mapping to dataclass

2020-12-25 Thread Anton Abrosimov
New submission from Anton Abrosimov : I want to add `abc.Mapping` extension to `dataclasses.dataclass`. Motivation: 1. `asdict` makes a deep copy of the `dataclass` object. If I only want to iterate over the `field` attributes, I don't want to do a deep copy. 2. `dict(my_dataclass)` can be us

[issue42727] [Enum] EnumMeta.__prepare__ needs to accept **kwds

2020-12-25 Thread Ethan Furman
Change by Ethan Furman : -- pull_requests: -22792 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue42727] [Enum] EnumMeta.__prepare__ needs to accept **kwds

2020-12-25 Thread miss-islington
miss-islington added the comment: New changeset fbffda25b4b5f537e651eaab4ca1ec4cde800709 by Miss Islington (bot) in branch '3.9': bpo-42727: [Enum] use super() and include **kwds (GH-23927) https://github.com/python/cpython/commit/fbffda25b4b5f537e651eaab4ca1ec4cde800709 -- ___

[issue42741] Sync 3.9's whatsnew document in 3.10 with 3.9 branch

2020-12-25 Thread Ken Jin
Change by Ken Jin : -- keywords: +patch pull_requests: +22794 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23943 ___ Python tracker ___

[issue42741] Sync 3.9's whatsnew document in 3.10 with 3.9 branch

2020-12-25 Thread Ken Jin
New submission from Ken Jin : On the 3.10 branch, the what's new document for 3.9 isn't synced with the one on the 3.9 branch. Currently it's missing two entries: macOS 11.0 (Big Sur) and Apple Silicon Mac support issue41100 (next one's my fault, sorry) collections.abc.Callable changes issue

[issue42740] typing.py get_args and get_origin should support PEP 604 and 612

2020-12-25 Thread Ken Jin
Change by Ken Jin : -- keywords: +patch pull_requests: +22793 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23942 ___ Python tracker ___

[issue42727] [Enum] EnumMeta.__prepare__ needs to accept **kwds

2020-12-25 Thread Desmond Cheong
Change by Desmond Cheong : -- nosy: +desmondcheongzx nosy_count: 3.0 -> 4.0 pull_requests: +22792 pull_request: https://github.com/python/cpython/pull/23885 ___ Python tracker

[issue42734] Outdated CodeType call in "bogus_code_obj.py"

2020-12-25 Thread miss-islington
miss-islington added the comment: New changeset 51f502914656a1f8e8ffdf6e1b06f670d8fea8ed by Miss Islington (bot) in branch '3.9': bpo-42734: Fix crasher bogus_code_obj.py (GH-23939) https://github.com/python/cpython/commit/51f502914656a1f8e8ffdf6e1b06f670d8fea8ed -- ___

[issue42734] Outdated CodeType call in "bogus_code_obj.py"

2020-12-25 Thread miss-islington
miss-islington added the comment: New changeset 0178a6b67ca3e782443f311e953509ca3eb4aacf by Miss Islington (bot) in branch '3.8': bpo-42734: Fix crasher bogus_code_obj.py (GH-23939) https://github.com/python/cpython/commit/0178a6b67ca3e782443f311e953509ca3eb4aacf -- ___

[issue42740] typing.py get_args and get_origin should support PEP 604 and 612

2020-12-25 Thread Ken Jin
New submission from Ken Jin : Currently get_args doesn't work for PEP 604 Union: >>> get_args(int | str) or new Callables with PEP 612: >>> P = ParamSpec('P) >>> get_args(Callable[P, int]) ([~P], ) get_origin doesn't work with PEP 604 Unions: >>> get_origin(int | str) PS: the fix has to b

[issue15303] Minor revision to the method in Tkinter

2020-12-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset bb70b2afe39ad4334a9f3449cddd28149bd628b6 by Serhiy Storchaka in branch 'master': bpo-15303: Support widgets with boolean value False in Tkinter (GH-23904) https://github.com/python/cpython/commit/bb70b2afe39ad4334a9f3449cddd28149bd628b6

[issue42734] Outdated CodeType call in "bogus_code_obj.py"

2020-12-25 Thread miss-islington
Change by miss-islington : -- pull_requests: +22791 pull_request: https://github.com/python/cpython/pull/23941 ___ Python tracker ___ __

[issue42734] Outdated CodeType call in "bogus_code_obj.py"

2020-12-25 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +22790 pull_request: https://github.com/python/cpython/pull/23940 ___ Python tracker _

[issue42734] Outdated CodeType call in "bogus_code_obj.py"

2020-12-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 954a7427ba9c2d02faed32c02090caeca873aeca by Serhiy Storchaka in branch 'master': bpo-42734: Fix crasher bogus_code_obj.py (GH-23939) https://github.com/python/cpython/commit/954a7427ba9c2d02faed32c02090caeca873aeca -- __

[issue40494] collections.abc.Callable and type variables

2020-12-25 Thread Ken Jin
Ken Jin added the comment: Now that issue42195 has been resolved by subclassing types.GenericAlias, can this be closed? On 3.9 and 3.10: >>> import typing, collections.abc >>> T = typing.TypeVar('T') >>> C2 = collections.abc.Callable[[T], T] >>> C2[int] collections.abc.Callable[[int], int]

[issue42733] [issue] io's r+ mode truncate(0)

2020-12-25 Thread 施文峰
施文峰 added the comment: hi Steven thanks for check my post first test have a problem,you didn’t use r+ mode step is 1. f.read 2. f.truncate(0) 3. f.write(something) my test msg tell you “ tell after delete content 33 content 0 tell after write 65 “ so you know after truncate f.tell =33 but

[issue42733] [issue] io's r+ mode truncate(0)

2020-12-25 Thread Steven D'Aprano
Steven D'Aprano added the comment: You say: > after process python3 test_case.py > json file's content like this > > @@{"how_dare_you": "how_dare_you"} I cannot replicate that result. I created a "data.json" with the following content: ``` >>> with open(FILE_PATH, 'w') as f:

[issue42739] Crash when try to disassemble bogus code object

2020-12-25 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : >>> def f(): pass ... >>> co = f.__code__.replace(co_linetable=b'') >>> import dis >>> dis.dis(co) python: Objects/codeobject.c:1185: PyLineTable_NextAddressRange: Assertion `!at_end(range)' failed. Aborted (core dumped) It is expected that executing bog

[issue38435] Start the deprecation cycle for subprocess preexec_fn

2020-12-25 Thread STINNER Victor
STINNER Victor added the comment: I just created bpo-42738: "subprocess: don't close all file descriptors by default (close_fds=False)". -- ___ Python tracker ___ ___

[issue42738] subprocess: don't close all file descriptors by default (close_fds=False)

2020-12-25 Thread STINNER Victor
New submission from STINNER Victor : To make subprocess faster, I propose to no longer close all file descriptors by default in subprocess: change Popen close_fds parameter default to False (close_fds=False). Using close_fds=False, subprocess can use posix_spawn() which is safer and faster t

[issue42685] Improve placing of simple query windows.

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

[issue42731] Enhancement request for proxying PyString

2020-12-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There is no longer PyString in Python, only PyUnicode. There are plans to get rid of PyUnicode_READY(). After removing support of "legacy" Unicode objects (which will happen in few years), PyUnicode_READY() will be no longer needed, so all calls of it coul

[issue42734] Outdated CodeType call in "bogus_code_obj.py"

2020-12-25 Thread Xinmeng Xia
Xinmeng Xia added the comment: Yes,you are right. I thought it was fixed,but it wasn't. Thanks. -- type: enhancement -> behavior ___ Python tracker ___

[issue42735] "trace_at_recursion_limit.py" should be removed from "Python/Lib/test/crashers"

2020-12-25 Thread Xinmeng Xia
Change by Xinmeng Xia : -- type: enhancement -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue42734] Outdated CodeType call in "bogus_code_obj.py"

2020-12-25 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +22789 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23939 ___ Python tracker ___

[issue42734] Outdated CodeType call in "bogus_code_obj.py"

2020-12-25 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- title: "bogus_code_obj.py" should be removed from "cPython/Lib/test/crashers" -> Outdated CodeType call in "bogus_code_obj.py" ___ Python tracker _

[issue38435] Start the deprecation cycle for subprocess preexec_fn

2020-12-25 Thread STINNER Victor
STINNER Victor added the comment: > Using an intermediate shell script wrapper that changes the rlimit and exec's > the actual process is also an alternative. IMO using Python is more portable than relying on a shell. I dislike relying on a shell since shells are not really portable (behave

[issue42734] "bogus_code_obj.py" should be removed from "cPython/Lib/test/crashers"

2020-12-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: No, it was not fixed. The code object creation was broken, because the code constructor signature was changed. -- nosy: +serhiy.storchaka ___ Python tracker _

[issue42730] TypeError/hang inside of Time.Sleep() when _thread.interrupt_main()

2020-12-25 Thread AR Kareem
AR Kareem added the comment: Shouldn't the behaviour for _thread.interrupt_main() be always to interrupt the main thread. I would expect that if a child thread uses _thread.interrupt_main() that the main thread be interrupted regardless of how the python script was invoked. Wouldn't it be

[issue29076] Mac installer shell updater script silently fails if default shell is fish

2020-12-25 Thread miss-islington
miss-islington added the comment: New changeset 7f162e867c674f57c308a87fffcdcca3540c8933 by Erlend Egeberg Aasland in branch 'master': bpo-29076: Add fish support to macOS installer (GH-23302) https://github.com/python/cpython/commit/7f162e867c674f57c308a87fffcdcca3540c8933 --

[issue29076] Mac installer shell updater script silently fails if default shell is fish

2020-12-25 Thread miss-islington
Change by miss-islington : -- pull_requests: +22788 pull_request: https://github.com/python/cpython/pull/23938 ___ Python tracker ___ __

[issue29076] Mac installer shell updater script silently fails if default shell is fish

2020-12-25 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +22787 pull_request: https://github.com/python/cpython/pull/23937 ___ Python tracker _

[issue36675] Doctest directives and comments missing from code samples

2020-12-25 Thread Julien Palard
Julien Palard added the comment: Happy Christmas, everybody involved in this issue! I'm happy to announce this issue is resolved since a few days \o/ -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue42730] TypeError/hang inside of Time.Sleep() when _thread.interrupt_main()

2020-12-25 Thread AR Kareem
AR Kareem added the comment: My apologies, I meant to flag it as 3.6 instead of 3.7. I see what's happening now, and thanks for providing the correct way to raise a KeyboardInterrupt. Correctly flagged as 3.6 and closed. Thanks. -- resolution: -> duplicate versions: +Python 3.6 -P

[issue42725] PEP 563: Should the behavior change for yield/yield from's

2020-12-25 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: I have a patch ready to go, but I'd prefer to block this issue until issue 42737 is resolved/decided. -- ___ Python tracker ___ ___

[issue42737] PEP 563: drop annotations for complex assign targets

2020-12-25 Thread Batuhan Taskaya
New submission from Batuhan Taskaya : PEP 526 classifies everything but simple, unparenthesized names (a.b, (a), a[b]) as complex targets. The way the we handle annotations for them right now is, doing literally nothing but evaluating every part of it (just pushing the name to the stack, and

  1   2   >