[issue44930] super-Matlab-style ranged list literal initialization

2021-08-16 Thread Steven D'Aprano
Steven D'Aprano added the comment: As a new feature, the absolute earliest we could add this would be Python 3.11. As new syntax, it would need a PEP. https://www.python.org/dev/peps/ -- versions: +Python 3.11 ___ Python tracker

[issue44930] super-Matlab-style ranged list literal initialization

2021-08-16 Thread Steven D'Aprano
Steven D'Aprano added the comment: > Python 3 has removed the capability to create a list from a range. That's incorrect. You can do `list(range(1,100,2))`. But generally, why create a list? range objects support many of the list APIs: - iteration - fast containment tests `x in range(1,

[issue44930] super-Matlab-style ranged list literal initialization

2021-08-16 Thread wang xuancong
New submission from wang xuancong : Different from Python 2, Python 3 has removed the capability to create a list from a range. In Python 2, we can use range(1,100,2) to create a list [1, 3, 5, ..., 99], but in Python 3, we can only use list(range(1,100,2)) or [*range(1,100,2)] where the

[issue14156] argparse.FileType for '-' doesn't work for a mode of 'rb'

2021-08-16 Thread Owen T. Heisler
Change by Owen T. Heisler : -- nosy: +owenh ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41102] ZipFile.namelist() does not match the actual files in .zip file

2021-08-16 Thread Xiaolong Liu
Xiaolong Liu added the comment: Dear Andrei, It's about 63MB. I reshared it on Google Drive. Please check the following link. https://drive.google.com/file/d/1534MdIcGbXtMwYfuo2zeFxm6BVgHa4XX/view?usp=sharing Bruce / Xiaolong Liu / 刘小龙 From: Andrei Kulakov Date: 2021-08-14 20:49 To:

[issue44830] Broken Mozilla devguide link in "Dealing with Bugs" doc section

2021-08-16 Thread Jack DeVries
Jack DeVries added the comment: I am pretty sure that Mozilla moved to a new content management system and they've been refreshing a lot of content on their site. I would assume that any lingering presence of this article is just growing pains and it'll all be removed in due time. I might be

[issue42560] Improve Tkinter Documentation

2021-08-16 Thread Mark Roseman
Mark Roseman added the comment: I would most definitely echo the concern about the massive size of such a project as well as future maintainability. I don't know anyone who would be able to do such a thing on a volunteer basis, and I think it would be highly unlikely that anyone would step

[issue44920] Support UUIDv6, UUIDv7, and UUIDv8 from the new version of RFC4122

2021-08-16 Thread Logan Jones
Change by Logan Jones : -- nosy: +loganasherjones ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33896] Document what components make up the filecmp.cmp os.stat signature.

2021-08-16 Thread Ned Deily
Change by Ned Deily : -- resolution: -> duplicate stage: needs patch -> resolved status: open -> closed superseder: -> filecmp.cmp(shallow=True) isn't actually shallow when only mtime differs versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.7, Python 3.8

[issue32937] Multiprocessing worker functions not terminating with a large number of processes and a manager

2021-08-16 Thread Ned Deily
Change by Ned Deily : -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44895] refleak test failure in test_exceptions

2021-08-16 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: >> x = list(range(100)) Is creating a lot of objects, and the gc has a chance to run on every object creation so maybe what's happening there is that you are inadvertently triggering the gc -- ___ Python

[issue44587] argparse BooleanOptionalAction displays default=SUPPRESS unlike other action types

2021-08-16 Thread Maximilian Hils
Change by Maximilian Hils : -- keywords: +patch nosy: +mhils nosy_count: 2.0 -> 3.0 pull_requests: +26259 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27672 ___ Python tracker

[issue34882] f(a=1, *args) should be a SyntaxError

2021-08-16 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Also, just to make it clear: changing this would be backwards incompatible, so if someone is interested, a bigger discussion is needed (starting with python-ideas/python-dev). -- ___ Python tracker

[issue34882] f(a=1, *args) should be a SyntaxError

2021-08-16 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing

[issue34882] f(a=1, *args) should be a SyntaxError

2021-08-16 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: This is not a bug, check the thread that Serhiy attached. The grammar is, in principle, correct. For instance, you can do: def f(a,b,c): pass def wrapper(*args, **kw): return f(c=1, *args, **kw) wrapper(2,b=2) And you don't want that to be

[issue44895] refleak test failure in test_exceptions

2021-08-16 Thread Irit Katriel
Irit Katriel added the comment: It's midnight, so just one last weirdness before I turn into a pumpkin: If I add this assignment to x the issue seems to go away (or become less frequent so I don't see it?) But if I assign x to a small constant it still leaks. def

[issue34882] f(a=1, *args) should be a SyntaxError

2021-08-16 Thread Irit Katriel
Irit Katriel added the comment: Reproduced in 3.11: >>> f(a=1, 2, 3) File "", line 1 f(a=1, 2, 3) ^ SyntaxError: positional argument follows keyword argument >>> f(a=1, *(2, 3)) Traceback (most recent call last): File "", line 1, in TypeError: f() got multiple values

[issue44830] Broken Mozilla devguide link in "Dealing with Bugs" doc section

2021-08-16 Thread Terry J. Reedy
Terry J. Reedy added the comment: https://support.mozilla.org/en-US/kb/contributors-guide-writing-good-bug still has a link to https://developer.mozilla.org/en-US/docs/Mozilla/QA/Bug_writing_guidelines but the fact that they moved the latter to

[issue44895] refleak test failure in test_exceptions

2021-08-16 Thread Irit Katriel
Irit Katriel added the comment: I meant refleaks.py, not reflinks.py. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue44895] refleak test failure in test_exceptions

2021-08-16 Thread Irit Katriel
Irit Katriel added the comment: I've reproduced the leak in 3.10 (with the reflinks.py script). In 3.9 the double-recursion segfaults: Fatal Python error: _Py_CheckRecursiveCall: Cannot recover from stack overflow. Python runtime state: initialized -- versions: +Python 3.10

[issue44830] Broken Mozilla devguide link in "Dealing with Bugs" doc section

2021-08-16 Thread Thomas Grainger
Thomas Grainger added the comment: It looks like it got archived here https://github.com/mdn/archived-content/blob/main/files/en-us/mozilla/qa/bug_writing_guidelines/index.html -- nosy: +graingert ___ Python tracker

[issue42560] Improve Tkinter Documentation

2021-08-16 Thread Terry J. Reedy
Terry J. Reedy added the comment: It seems premature to worry about 8.7.0, as it might still be years away. 8.7.0a1 was 4 years ago. 8.6.0 spent 5 years in beta. https://sourceforge.net/projects/tcl/files/Tcl/. I'd like to see improved tkinter docs within a year. I don't think that

[issue1596321] KeyError at exit after 'import threading' in other thread

2021-08-16 Thread Irit Katriel
Irit Katriel added the comment: The output is different now. I update the script for python 3: - import _thread as thread import time def start(): print("Secondary thread ID:", thread.get_ident()) import threading print("Main

[issue44929] Some RegexFlag cannot be printed in the repr

2021-08-16 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch pull_requests: +26258 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27789 ___ Python tracker

[issue44929] Some RegexFlag cannot be printed in the repr

2021-08-16 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: This looks incorrect: https://github.com/python/cpython/blob/1512bc21d60f098a9e9f37b44a2f6a9b49a3fd4f/Lib/enum.py#L1399 -- ___ Python tracker

[issue44929] Some RegexFlag cannot be printed in the repr

2021-08-16 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Simpler reproducer: >>> import re >>> re.RegexFlag(0) Traceback (most recent call last): File "", line 1, in File "/home/pablogsal/github/cpython/Lib/enum.py", line 1399, in global_flag_repr return "%x" % (module, cls_name, self._value_)

[issue44929] Some RegexFlag cannot be printed in the repr

2021-08-16 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: (Deleted last message because it was incorrect) -- ___ Python tracker ___ ___

[issue44929] Some RegexFlag cannot be printed in the repr

2021-08-16 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- Removed message: https://bugs.python.org/msg399689 ___ Python tracker ___ ___ Python-bugs-list

[issue44929] Some RegexFlag cannot be printed in the repr

2021-08-16 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Same happens when printing a enum.Flag with some values: >>> enum.Flag(1) Traceback (most recent call last): File "", line 1, in File "/home/pablogsal/github/cpython/Lib/enum.py", line 597, in __call__ return cls.__new__(cls, value)

[issue44929] Some RegexFlag cannot be printed in the repr

2021-08-16 Thread Pablo Galindo Salgado
New submission from Pablo Galindo Salgado : When printing some instance of RegexFlag **in the REPL** it fails to print: >>> import gc # This prints a ton of objects, including the bad enum RegexFlag one >>> gc.get_referrers(None) Traceback (most recent call last): File "", line 1, in

[issue38956] argparse.BooleanOptionalAction should not add the default value to the help string by default

2021-08-16 Thread Łukasz Langa
Change by Łukasz Langa : -- pull_requests: +26257 pull_request: https://github.com/python/cpython/pull/27788 ___ Python tracker ___

[issue38956] argparse.BooleanOptionalAction should not add the default value to the help string by default

2021-08-16 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 7.0 -> 8.0 pull_requests: +26256 pull_request: https://github.com/python/cpython/pull/27787 ___ Python tracker

[issue38956] argparse.BooleanOptionalAction should not add the default value to the help string by default

2021-08-16 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 1512bc21d60f098a9e9f37b44a2f6a9b49a3fd4f by Maximilian Hils in branch 'main': bpo-38956: don't print BooleanOptionalAction's default twice (GH-27672) https://github.com/python/cpython/commit/1512bc21d60f098a9e9f37b44a2f6a9b49a3fd4f --

[issue44881] Consider integration of PyObject_GC_UnTrack() with the trashcan C API

2021-08-16 Thread Neil Schemenauer
Neil Schemenauer added the comment: Another small correction, _PyType_IS_GC() checks only the type flag (Py_TPFLAGS_HAVE_GC). _PyObject_IS_GC() checks both the type flag and calls tp_is_gc(), if it exists. tp_is_gc() is wart, IMHO, and it would be nice if we can kill it off so only the

[issue40608] PY3.8 GC segfault (Py_TRASHCAN_SAFE_BEGIN/END are not backwards compatible)

2021-08-16 Thread Irit Katriel
Irit Katriel added the comment: Re GH-20104 - What I did there was to simply revert the change that git bisect showed caused my segfault. It's been a year since then, and I don't understand this stuff well enough to say that reverting this brings us to a good state, with respect to

[issue44928] async generator missing unawaited coroutine warning

2021-08-16 Thread Thomas Grainger
New submission from Thomas Grainger : demo program: ``` def test_async_fn(): async def async_fn(): pass async_fn() def test_async_gen_fn(): async def agen_fn(): yield agen_fn().aclose() agen_fn().asend(None) test_async_fn() test_async_gen_fn() ```

[issue40608] PY3.8 GC segfault (Py_TRASHCAN_SAFE_BEGIN/END are not backwards compatible)

2021-08-16 Thread Łukasz Langa
Łukasz Langa added the comment: Agreed with Irit. GH-12607 is conflicting with `main` and in an unclear review state. Irit's got both GH-20104 which fixes the segfault and GH-27693 which deprecates the old macros. It's sad we missed the train for either GH-20104 or the original GH-12607 to

[issue44895] refleak test failure in test_exceptions

2021-08-16 Thread Irit Katriel
Irit Katriel added the comment: (Pdb) test_no_hang_on_context_chain_cycle2.__code__.co_consts[1] (Pdb) sys.getrefcount(test_no_hang_on_context_chain_cycle2.__code__.co_consts[1]) 2 (Pdb) gc.get_referrers(test_no_hang_on_context_chain_cycle2.__code__.co_consts[1]) [] --

[issue44895] refleak test failure in test_exceptions

2021-08-16 Thread Irit Katriel
Irit Katriel added the comment: The leak seems to be due to the nested definitions of the Exception types A and B. It goes away if I move them out of the function so that it's like: class A(Exception): pass class B(Exception): pass def test_no_hang_on_context_chain_cycle2():

[issue44852] Add ability to wholesale silence DeprecationWarnings while running the test suite

2021-08-16 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset c7c4cbc58e18ef5a6f4f377b1ece0a84a54335a7 by Łukasz Langa in branch '3.9': [3.9] bpo-44852: Support ignoring specific DeprecationWarnings wholesale in regrtest (GH-27634) (GH-27785)

[issue44924] logging.handlers.QueueHandler does not maintain the exc_text

2021-08-16 Thread Mikael Koli
Mikael Koli added the comment: I did subclass the QueueHandler and it did circumvent the issue for me. But after spending some time to find out why I could not access the exc_text I thought maybe there is something that could be done to make it more intuitive and save others' time. I find

[issue42560] Improve Tkinter Documentation

2021-08-16 Thread E. Paine
E. Paine added the comment: > I don't see the tcl/tk versions as an issue My main concern was when Tcl/Tk has a major new release with new kwargs. If MacOS was shipped with one version and Windows another, I suspect we would have to hold back an update to the docs. I am slightly less

[issue44926] typing.get_type_hints() raises for type aliases with forward references

2021-08-16 Thread Guido van Rossum
Guido van Rossum added the comment: I think it's fine for get_type_hints() to give up in some cases. It's not fine if it were to look in the wrong namespace (e.g. if the caller of get_type_hints() were to happen to have an unrelated class named "Foo" in its namespace, that should *not* be

[issue44895] refleak test failure in test_exceptions

2021-08-16 Thread Irit Katriel
Irit Katriel added the comment: I've attached an even shorter script (refleak.py) that reproduces the leak. -- Added file: https://bugs.python.org/file50224/refleak.py ___ Python tracker

[issue44926] typing.get_type_hints() raises for type aliases with forward references

2021-08-16 Thread Maximilian Hils
Maximilian Hils added the comment: @Guido van Rossum: Yes, GH-27017 is the same as #41249 in the initial post. There are also some cases where we don't even have a ForwardRef though: foo.py: ``` import typing FooType: typing.TypeAlias = "Foo" class Foo: pass ``` bar.py: ``` import

[issue44924] logging.handlers.QueueHandler does not maintain the exc_text

2021-08-16 Thread Vinay Sajip
Vinay Sajip added the comment: Why can you not subclass QueueHandler and override the prepare method to do what you want/need? -- ___ Python tracker ___

[issue44927] [sqlite3] proposal: add sqlite3.Cursor.insert() method

2021-08-16 Thread AR
AR added the comment: There is no good solution to this. Either a move to all-in-one solution and ORM at the end, or limited scope hack that allow for a convenient "just insert". I do not insist due to this controversy I just didn't realize the difference until I've noticed that one line of

[issue44927] [sqlite3] proposal: add sqlite3.Cursor.insert() method

2021-08-16 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- title: [sqlite3] insert -> [sqlite3] proposal: add sqlite3.Cursor.insert() method ___ Python tracker ___

[issue44926] typing.get_type_hints() raises for type aliases with forward references

2021-08-16 Thread Guido van Rossum
Guido van Rossum added the comment: Is GH-27017 at all relevant here? -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue44914] tp_version_tag is not unique when test runs with -R :

2021-08-16 Thread Mark Shannon
Mark Shannon added the comment: New changeset d84d2c4985457733602d46dc4ee77290da4e9539 by Ken Jin in branch 'main': bpo-44914: Add tests for some invariants of tp_version_tag (GH-27774) https://github.com/python/cpython/commit/d84d2c4985457733602d46dc4ee77290da4e9539 --

[issue44897] Integrate trashcan mechanism into _Py_Dealloc

2021-08-16 Thread Neil Schemenauer
Change by Neil Schemenauer : -- nosy: +pablogsal, tim.peters, vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue44927] [sqlite3] insert

2021-08-16 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: The INSERT statement comes in many varieties. What about INSERT OR [ABORT,FAIL,IGNORE,REPLACE,ROLLBACK], INSERT WITH RECURSIVE, INSERT INTO table SELECT, etc.? Why only add such an API for insert; why not replace() as well? I'm not convinced this is a

[issue44897] Integrate trashcan mechanism into _Py_Dealloc

2021-08-16 Thread Neil Schemenauer
Neil Schemenauer added the comment: Based on some testing, I think an extra type slot is not worth the extra complication. I made some small improvements to _Py_Dealloc and now the performance seems a bit better. Basically, I expanded _PyObject_IS_GC() to put the most common branches

[issue16379] SQLite error code not exposed to python

2021-08-16 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- pull_requests: +26255 pull_request: https://github.com/python/cpython/pull/27786 ___ Python tracker ___

[issue44830] Broken Mozilla devguide link in "Dealing with Bugs" doc section

2021-08-16 Thread Terry J. Reedy
Terry J. Reedy added the comment: Problems with linking to archive.org Wayback machine. 1. They have limited bandwidth. 2. Production linking, as opposed to research like Jack did to find the 'missing' page, stretches the meaning of 'fair use'. Potential problems with external docs. 1.

[issue16379] SQLite error code not exposed to python

2021-08-16 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: >> What would it take to get this merged? > > I've rebased Aviv's PR (GH-1108) onto main and resolved the conflicts. > If I get his blessing, I'll open a PR try to land this. I asked Aviv on GH eight days ago, and I haven't heard anything yet, so I'm

[issue44852] Add ability to wholesale silence DeprecationWarnings while running the test suite

2021-08-16 Thread Łukasz Langa
Change by Łukasz Langa : -- pull_requests: +26254 pull_request: https://github.com/python/cpython/pull/27785 ___ Python tracker ___

[issue44698] Undefined behaviour in Objects/complexobject.c's complex_pow

2021-08-16 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks, Pablo! > could you add me as a reviewer for the backport Will do! I'll waiting on review for the PR against the main branch, but hope to get the backport PR up by this coming weekend at the latest. --

[issue44852] Add ability to wholesale silence DeprecationWarnings while running the test suite

2021-08-16 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset a0a6d39295a30434b088f4b66439bf5ea21a3e4e by Łukasz Langa in branch 'main': bpo-44852: Support ignoring specific DeprecationWarnings wholesale in regrtest (GH-27634) https://github.com/python/cpython/commit/a0a6d39295a30434b088f4b66439bf5ea21a3e4e

[issue44926] typing.get_type_hints() raises for type aliases with forward references

2021-08-16 Thread Maximilian Hils
Maximilian Hils added the comment: > For your specific use case (where the user is using Python 3.6), you could > pass in globalns and localns to get_type_hints as a temporary workaround. Off > the top of my head: get_type_hints(func2, globalns=foo.__dict__) might work. Would that work for

[issue44852] Add ability to wholesale silence DeprecationWarnings while running the test suite

2021-08-16 Thread Łukasz Langa
Change by Łukasz Langa : -- pull_requests: +26253 pull_request: https://github.com/python/cpython/pull/27784 ___ Python tracker ___

[issue44927] [sqlite3] insert

2021-08-16 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- nosy: +erlendaasland ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44927] [sqlite3] insert

2021-08-16 Thread AR
New submission from AR : I propose to add an insert method to a SQLite cursor object, believe this could greatly improve readability of python code when you have to do a lot of insert operations to a different tables. Currently we have to create a dictionary with SQL's for each table:

[issue44926] typing.get_type_hints() raises for type aliases with forward references

2021-08-16 Thread Ken Jin
Ken Jin added the comment: > 1. func1 doesn't crash, but also doesn't resolve the forward reference. I am > not sure if this expected behavior. Good observation! That's indeed the current behavior. The reason is a little subtle - list[...] is using a special builtin type

[issue44830] Broken Mozilla devguide link in "Dealing with Bugs" doc section

2021-08-16 Thread Jack DeVries
Jack DeVries added the comment: > If Jack wants to pick this up, I'd merge it. I might be interested but I'm not sure if I will have the time. I'm not "calling dibs" if anyone else wants to go ahead with this solution. -- ___ Python tracker

[issue44926] typing.get_type_hints() raises for type aliases with forward references

2021-08-16 Thread Maximilian Hils
New submission from Maximilian Hils : Someone reported this rather interesting issue where typing.get_type_hints crashes on type aliases with forward references. The original report is at https://github.com/mitmproxy/pdoc/issues/290. Here's an extended minimal example: foo.py: ``` import

[issue44921] dict subclassing is slow

2021-08-16 Thread Carol Willing
Change by Carol Willing : -- nosy: +willingc ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44924] logging.handlers.QueueHandler does not maintain the exc_text

2021-08-16 Thread Zachary Ware
Change by Zachary Ware : -- nosy: +vinay.sajip, zach.ware versions: -Python 3.6, Python 3.7, Python 3.8 ___ Python tracker ___ ___

[issue44916] Random behaviour when importing two modules with the same name but different source files

2021-08-16 Thread Brett Cannon
Brett Cannon added the comment: So first, don't import from threads. It's non-deterministic as you have seen. You should do all imports **before** you start running multi-threaded code if multiple threads are going to access the Second, tossing in pickle is just asking for more trouble. 

[issue44850] Could operator.methodcaller be optimized using LOAD_METHOD?

2021-08-16 Thread Antony Lee
Change by Antony Lee : -- keywords: +patch pull_requests: +26252 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27782 ___ Python tracker ___

[issue44925] [docs] Confusing deprecation notice for typing.IO

2021-08-16 Thread Ken Jin
Ken Jin added the comment: @rittneje, would you like to submit a PR for this? We can help if you'd like to. -- ___ Python tracker ___

[issue44925] [docs] Confusing deprecation notice for typing.IO

2021-08-16 Thread Ken Jin
Change by Ken Jin : -- assignee: -> docs@python components: +Documentation -Library (Lib) keywords: +easy, newcomer friendly nosy: +docs@python, gvanrossum, kj, srittau title: Confusing deprecation notice for typing.IO -> [docs] Confusing deprecation notice for typing.IO versions:

[issue35203] Windows Installer Ignores Launcher Installer Options Where The Python Launcher Is Already Present

2021-08-16 Thread Steve Dower
Steve Dower added the comment: Timothy - are you able to share your install logs? Look for all log files starting with "Python" in your %TEMP% directory. We definitely do not (and without an installer rewrite, cannot) support simultaneous per-user and per-machine installs of the same

[issue44830] Broken Mozilla devguide link in "Dealing with Bugs" doc section

2021-08-16 Thread Jack DeVries
Jack DeVries added the comment: I agree that linking to the wayback machine is clunky. I just sent a message out to the python-ideas mailing list to solicit more suggestions. The discourse thread didn't get much response. I guess that at some point, if there is no consensus, it wouldn't be a

[issue44925] Confusing deprecation notice for typing.IO

2021-08-16 Thread Jesse Rittner
New submission from Jesse Rittner : The docs for typing.IO, typing.TextIO, and typing.BinaryIO include a confusing deprecation notice. https://docs.python.org/3/library/typing.html#typing.IO > Deprecated since version 3.8, will be removed in version 3.12: These types > are also in the

[issue44914] tp_version_tag is not unique when test runs with -R :

2021-08-16 Thread Ken Jin
Change by Ken Jin : -- pull_requests: +26251 pull_request: https://github.com/python/cpython/pull/27774 ___ Python tracker ___ ___

[issue15373] copy.copy() does not properly copy os.environment

2021-08-16 Thread Stéphane Blondon
Stéphane Blondon added the comment: I think an asdict() method is not necessary. Instanciating a dict from os.environ is enough: >>> import os >>> os.environ environ({'SHELL': '/bin/bash', ...}) >>> dict(os.environ) {'SHELL': '/bin/bash', ...}) With 'dict()', it's obvious there is no side

[issue44905] Abstract instance and class attributes for abstract base classes

2021-08-16 Thread Jacob Nilsson
Jacob Nilsson added the comment: Could one possible downside of this suggestion be, if implemented like in https://newbedev.com/python-abstract-class-shall-force-derived-classes-to-initialize-variable-in-init, a slowdown in code creating a lot of instances of a class with metaclass ABCMeta?

[issue44900] Implement superinstructions

2021-08-16 Thread Mark Shannon
Change by Mark Shannon : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue44900] Implement superinstructions

2021-08-16 Thread Mark Shannon
Mark Shannon added the comment: New changeset 4f51fa9e2d3ea9316e674fb9a9f3e3112e83661c by Mark Shannon in branch 'main': bpo-44900: Add five superinstructions. (GH-27741) https://github.com/python/cpython/commit/4f51fa9e2d3ea9316e674fb9a9f3e3112e83661c --

[issue44914] tp_version_tag is not unique when test runs with -R :

2021-08-16 Thread Mark Shannon
Mark Shannon added the comment: New changeset 1a511dc92dd10ee8fc2e5da9f52f795924bdc89a by Mark Shannon in branch 'main': bpo-44914: Maintain invariants of type version tags. (GH-27773) https://github.com/python/cpython/commit/1a511dc92dd10ee8fc2e5da9f52f795924bdc89a --

[issue44905] Abstract instance and class attributes for abstract base classes

2021-08-16 Thread Alex Waygood
Alex Waygood added the comment: ^And, that only works for class attributes, not instance attributes. -- ___ Python tracker ___ ___

[issue44905] Abstract instance and class attributes for abstract base classes

2021-08-16 Thread Alex Waygood
Alex Waygood added the comment: Tomasz -- as discussed in the original BPO issue for `abstractmethod` implementations (https://bugs.python.org/issue1706989), this works as a workaround: ``` >>> from abc import ABCMeta >>> class AbstractAttribute: ... __isabstractmethod__ = True ...

[issue44240] Incorrect behavior of LOAD_ATTR due to overflow in tp_version

2021-08-16 Thread Mark Shannon
Change by Mark Shannon : -- resolution: -> duplicate stage: needs patch -> resolved status: open -> closed superseder: -> tp_version_tag is not unique when test runs with -R : ___ Python tracker

[issue44915] Python keywords as string keys in TypedDict

2021-08-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: You can use the functional form of TypedDict: C = TypedDict("C", {"to": int, "from": int}) -- nosy: +serhiy.storchaka ___ Python tracker

[issue44920] Support UUIDv6, UUIDv7, and UUIDv8 from the new version of RFC4122

2021-08-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is a new feature, and we usually do not backport new features to old Python versions, so it can only be included in Python 3.11 (backports can be provided by third-party libraries). Do you want to create a PR? -- nosy: +serhiy.storchaka

[issue44923] Unittest incorrect result with argparse.ArgumentError in self asserRaises context

2021-08-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: You raise ArgumentTypeError, but expect ArgumentError. ArgumentTypeError is not a subclass of ArgumentError. -- nosy: +serhiy.storchaka versions: +Python 3.8 -Python 3.6 ___ Python tracker

[issue44911] Leaked tasks cause IsolatedAsyncioTestCase to throw an exception

2021-08-16 Thread Łukasz Langa
Łukasz Langa added the comment: Thanks, Bar! ✨  ✨ -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue44923] Unittest incorrect result with argparse.ArgumentError in self asserRaises context

2021-08-16 Thread Irit Katriel
Irit Katriel added the comment: What is the output of the failed test? -- nosy: +iritkatriel versions: +Python 3.6 -Python 3.8 ___ Python tracker ___

[issue44924] logging.handlers.QueueHandler does not maintain the exc_text

2021-08-16 Thread Mikael Koli
Mikael Koli added the comment: And the reason why overriding attribute 'record.msg' with the formatted message is problematic is that the method 'record.getMessage' (which is used by Formatter) fetches the log message from the variable 'record.msg'. Therefore the exc_text needs to be set to

[issue44924] logging.handlers.QueueHandler does not maintain the exc_text

2021-08-16 Thread Mikael Koli
New submission from Mikael Koli : The reason why logging.handlers.QueueHandler does not maintain exc_text is obvious: def prepare(self, record): ... record = copy.copy(record) record.message = msg record.msg = msg record.args = None

[issue44911] Leaked tasks cause IsolatedAsyncioTestCase to throw an exception

2021-08-16 Thread miss-islington
miss-islington added the comment: New changeset 8516ca500eb45ecf997a471f003df02a9eb767ce by Miss Islington (bot) in branch '3.10': bpo-44911: Fixed IsolatedAsyncioTestCase from throwing an exception on leaked tasks (GH-27765)

[issue44923] Unittest incorrect result with argparse.ArgumentError in self asserRaises context

2021-08-16 Thread Troulet-lambert Odile
New submission from Troulet-lambert Odile : When passed an Argparse.ArgumentError in the self.assertRaises context uniittest does not recognize the exception and raises an exception. As a consequence the test fails whereas it should pass -- components: Tests files:

[issue44895] refleak test failure in test_exceptions

2021-08-16 Thread miss-islington
miss-islington added the comment: New changeset 1960409a6dcbd1e3527f02b523bd27df9086dd77 by Miss Islington (bot) in branch '3.10': bpo-44895: skip test_no_hang_on_context_chain_cycle2 until the refleak is fixed (GH-27761)

[issue44830] Broken Mozilla devguide link in "Dealing with Bugs" doc section

2021-08-16 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset b6a6d99a0ba3796a9d7d4fe8612b640f90e6d7f9 by Senthil Kumaran in branch '3.10': [3.10] bpo-44830 - Remove the broken Broken Mozilla devguide link. (GH-27664) (GH-27666)

[issue44830] Broken Mozilla devguide link in "Dealing with Bugs" doc section

2021-08-16 Thread Łukasz Langa
Łukasz Langa added the comment: I merged the 3.10 backport but leaving the bug open since only removing the 404 link isn't really fixing the problem. Linking to the Wayback Machine feels off to me. I would rather support making a similar document in our own docs, using the removed document

[issue44895] refleak test failure in test_exceptions

2021-08-16 Thread miss-islington
Change by miss-islington : -- pull_requests: +26250 pull_request: https://github.com/python/cpython/pull/27778 ___ Python tracker ___

[issue44895] refleak test failure in test_exceptions

2021-08-16 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 62bc716fde20fcb7b47416c7959be9e66df93212 by Irit Katriel in branch 'main': bpo-44895: skip test_no_hang_on_context_chain_cycle2 until the refleak is fixed (GH-27761)

[issue44911] Leaked tasks cause IsolatedAsyncioTestCase to throw an exception

2021-08-16 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 2cb1a6806c0cefab0c3a40fdd428a89a4392570e by Bar Harel in branch 'main': bpo-44911: Fixed IsolatedAsyncioTestCase from throwing an exception on leaked tasks (GH-27765)

[issue44911] Leaked tasks cause IsolatedAsyncioTestCase to throw an exception

2021-08-16 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +26249 pull_request: https://github.com/python/cpython/pull/2 ___ Python tracker

  1   2   >