[issue42979] _zoneinfo: zoneinfomodule_exec() doesn't check for PyDateTime_IMPORT failure

2021-01-23 Thread hai shi
hai shi added the comment: > If PyCapsule_Import() fails, zoneinfomodule_exec() returns 0 (success) with > an exception raised. Why not return -1 directly when PyCapsule_Import() fails? It looks like more simpler. Do I miss something? -- nosy: +shihai1991

[issue43013] IDLE: update code, mostly by cleanups of 2.x or 2to3 artifacts

2021-01-23 Thread Terry J. Reedy
Terry J. Reedy added the comment: 5. Extraneous () after class name in class header: 'class name():'. Never done in idlelib itself, 27 in test files, mostly in 1 file. -- ___ Python tracker

[issue42948] bytearray.copy is undocumented

2021-01-23 Thread Terry J. Reedy
Terry J. Reedy added the comment: Josh, you are right. I closed the PR. Before closing, I will think about whether to propose a change to make this more prominent. I notice the issubclass(array.array, collections.abc.MutableSequence ) is True even though some of the methods (like clear,

[issue42948] bytearray.copy is undocumented

2021-01-23 Thread Josh Rosenberg
Josh Rosenberg added the comment: Does this need specific documentation? bytearray itself is documented with: > As bytearray objects are mutable, they support the mutable sequence > operations in addition to the common bytes and bytearray operations described > in Bytes and Bytearray

[issue43007] set_wakeup_fd() only works in main thread

2021-01-23 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: +gvanrossum ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42967] [security] urllib.parse.parse_qsl(): Web cache poisoning - `; ` as a query args separator

2021-01-23 Thread Éric Araujo
Éric Araujo added the comment: The difference is that semicolon is defined in a previous specification. I don’t see this change as providing support for custom delimiters in URL parsing, but offering an option to pick between two specifications. --

[issue42967] [security] urllib.parse.parse_qsl(): Web cache poisoning - `; ` as a query args separator

2021-01-23 Thread Adam Goldschmidt
Adam Goldschmidt added the comment: > That doesn’t feel necessary to me. I suspect most links use &, some use ;, > nothing else is valid at the moment and I don’t expect a new separator to > suddenly appear. IMO the boolean parameter to also recognize ; was better. That's reasonable.

[issue42967] [security] urllib.parse.parse_qsl(): Web cache poisoning - `; ` as a query args separator

2021-01-23 Thread Adam Goldschmidt
Adam Goldschmidt added the comment: > I _didn't_ change the default - it will allow both '&' and ';' still. Eric > showed a link above that still uses semicolon. So I feel that it's strange to > break backwards compatibility in a patch update. Maybe we can make just '&' > the default in

[issue43013] IDLE: update code, mostly by cleanups of 2.x or 2to3 artifacts

2021-01-23 Thread Terry J. Reedy
New submission from Terry J. Reedy : Tal, just so you know in case you see a resulting merge conflict. I've been waiting for years to do these until most PRs were closed. Has not happened, and annoyances continue. Since there is no search option I can find to search for PRs with a merge

[issue40745] Typo in library/typing

2021-01-23 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue42948] bytearray.copy is undocumented

2021-01-23 Thread Patrick Haller
Patrick Haller added the comment: Terry, I am sorry. You are of course right. I was somehow looking at count not copy. -- ___ Python tracker ___

[issue43003] Parts of the API will be removed in Python 4.0 ?

2021-01-23 Thread Terry J. Reedy
Terry J. Reedy added the comment: Questions should be asked on Q forums, like python_list. Check Removed section of What's New in 3.10. https://docs.python.org/3.10/whatsnew/3.10.html#removed -- nosy: +terry.reedy resolution: -> not a bug stage: -> resolved status: open -> closed

[issue43008] IDLE ignores sys.excepthook in normal, subprocess mode

2021-01-23 Thread Terry J. Reedy
Terry J. Reedy added the comment: Ken, I read on another issue that an exception in an except suite is automatically linked to the caught exception, though the printed result may not be exactly the same. Once your CLA is 'activated', I will experiment with the options. --

[issue43008] IDLE ignores sys.excepthook in normal, subprocess mode

2021-01-23 Thread Terry J. Reedy
Terry J. Reedy added the comment: Andre: with this patch, you could potentially add a function or submodule that would point sys.excepthook to a function that would print the exception and then interact before returning. If this worked, one could add, for instance, 'import

[issue43001] python3.9.1 test_embed test_tabnanny failed

2021-01-23 Thread Terry J. Reedy
Terry J. Reedy added the comment: What system, what errors (copy-paste failure blocks)? -- nosy: +terry.reedy ___ Python tracker ___

[issue42948] bytearray.copy is undocumented

2021-01-23 Thread Terry J. Reedy
Terry J. Reedy added the comment: Patrick, I am not sure what you are saying. All the methods listed is this section are for both, as with bytes.count(sub[, start[, end]]) bytearray.count(sub[, start[, end]])¶ but only bytearray has .copy (since there is never a need to copy an immutable).

[issue42300] Typo in translation to portuguese

2021-01-23 Thread Irit Katriel
Irit Katriel added the comment: This was fixed here: https://github.com/python/python-docs-pt-br/commit/9c1465ae8a93a2e1814618993fbe32a4078bd23e -- nosy: +iritkatriel resolution: -> fixed stage: -> resolved status: open -> closed ___ Python

[issue43012] Remove pathlib accessors

2021-01-23 Thread Barney Gale
New submission from Barney Gale : Per Pitrou: > The original intent for the “accessor” thing was to have a variant that did > all accesses under a filesystem tree in a race condition-free way using > openat and friends. It turned out to be much too hairy to actually implement, > so was

[issue42992] Tkinter bbox coordinates incorrectly drawn

2021-01-23 Thread Terry J. Reedy
Change by Terry J. Reedy : -- stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue42977] Tkinter Optionmenu Too Narrow on Mac

2021-01-23 Thread Terry J. Reedy
Terry J. Reedy added the comment: This should likely be closed as 3rd party zjdavid Which python release, which macOS, which installer, which tk patchlevel? (IDLE Help=>About displays it). At least one of the 3.9.1 python.org mac installers installs 8.6.10. We cannot be responsible for

[issue43006] Changed behaviour of inspect.signature() in Python 3.10

2021-01-23 Thread Guido van Rossum
Guido van Rossum added the comment: Note that this may be solved in a different way *if* PEP 649 is accepted. This was discussed extensively on python-dev last week. It would roll back the stringification of PEP 563 (unless `from __future__ import annotations` is used, which would be

[issue42974] tokenize reports incorrect end col offset and line string when input ends without explicit newline

2021-01-23 Thread Terry J. Reedy
Terry J. Reedy added the comment: The question in the issue for tokenizer and virtual newlines is mimicking the C tokenizer versus consistency between and within token 5-tuples. As a tokenizer user, I would lean toward consistency but it is definitely not my call.

[issue42962] Windows: SystemError during os.kill(..., signal.CTRL_C_EVENT)

2021-01-23 Thread Eryk Sun
Eryk Sun added the comment: Thanks, Terry. I should have followed up with a short message asking for a core developer to sign off on that suggestion, in which case this is an "easy (C)" issue. -- ___ Python tracker

[issue42971] Some errnos for BSD/OSX are missing from errno module

2021-01-23 Thread Terry J. Reedy
Change by Terry J. Reedy : -- type: -> enhancement versions: +Python 3.10 -Python 3.8 ___ Python tracker ___ ___ Python-bugs-list

[issue42962] Windows: SystemError during os.kill(..., signal.CTRL_C_EVENT)

2021-01-23 Thread Terry J. Reedy
Terry J. Reedy added the comment: If I understand correctly, this is open for someone to evaluate Eryk's suggestion in msg385291 that a 'missing' return be added to win32_kill. -- nosy: +terry.reedy versions: -Python 3.7 ___ Python tracker

[issue42948] bytearray.copy is undocumented

2021-01-23 Thread Terry J. Reedy
Change by Terry J. Reedy : -- keywords: +patch nosy: +terry.reedy nosy_count: 3.0 -> 4.0 pull_requests: +23129 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24308 ___ Python tracker

[issue43008] IDLE ignores sys.excepthook in normal, subprocess mode

2021-01-23 Thread Andre Roberge
Andre Roberge added the comment: Terry: I will put it on my todo list. Friendly-traceback can currently work (indirectly) with IDLE; see https://aroberge.github.io/friendly-traceback-docs/docs/html/editor.html I am not sure what benefit this patch will yield when it comes to using

[issue42967] [security] urllib.parse.parse_qsl(): Web cache poisoning - `; ` as a query args separator

2021-01-23 Thread Éric Araujo
Éric Araujo added the comment: > I feel like if we are to implement this, we should let the developer choose > the separator and not limit to just `&` and `;` That doesn’t feel necessary to me. I suspect most links use &, some use ;, nothing else is valid at the moment and I don’t expect a

[issue43008] IDLE ignores sys.excepthook in normal, subprocess mode

2021-01-23 Thread Terry J. Reedy
Terry J. Reedy added the comment: Ken: I will probably work on tests, perhaps as a followup or parallel issue. I will likely do a bit or refactoring to make testing easier. I just looked at print_exception and discovered that the double traceback can likely by handled by properly setting

[issue43008] IDLE ignores sys.excepthook in normal, subprocess mode

2021-01-23 Thread Terry J. Reedy
Terry J. Reedy added the comment: Andre: while I would like friendlier tracebacks available in IDLE without 3rd party installation, I doubt this will happen soon. In the meanwhile, I see that you are working to polish Friendly Traceback with a friendly contest. I presume FT uses

[issue43011] DeprecationWarnings in test_ctypes

2021-01-23 Thread miss-islington
miss-islington added the comment: New changeset 00e24cdca422f792b80016287562b6b3bccab239 by Miss Islington (bot) in branch '3.9': closes bpo-43011: Fix DeprecationWarnings in test_ctypes (GH-24305) https://github.com/python/cpython/commit/00e24cdca422f792b80016287562b6b3bccab239 --

[issue43011] DeprecationWarnings in test_ctypes

2021-01-23 Thread miss-islington
miss-islington added the comment: New changeset dce86c230bb91722e84cd3618c1ee9cb55cc220f by Miss Islington (bot) in branch '3.8': closes bpo-43011: Fix DeprecationWarnings in test_ctypes (GH-24305) https://github.com/python/cpython/commit/dce86c230bb91722e84cd3618c1ee9cb55cc220f --

[issue42967] [security] urllib.parse.parse_qsl(): Web cache poisoning - `; ` as a query args separator

2021-01-23 Thread Ken Jin
Ken Jin added the comment: I updated the PR to take in a sequence of separators from the user - eg: >>> urllib.parse.parse_qsl('a=1=2;c=3', separators=('&', ';')) [('a', '1'), ('b', '2'), ('c', '3')] >>> urllib.parse.parse_qsl('a=1=2;c=3', separators=('&',)) [('a', '1'), ('b', '2;c=3')] I

[issue43011] DeprecationWarnings in test_ctypes

2021-01-23 Thread miss-islington
Change by miss-islington : -- pull_requests: +23128 pull_request: https://github.com/python/cpython/pull/24307 ___ Python tracker ___

[issue43011] DeprecationWarnings in test_ctypes

2021-01-23 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +23127 pull_request: https://github.com/python/cpython/pull/24306 ___ Python tracker

[issue43011] DeprecationWarnings in test_ctypes

2021-01-23 Thread Benjamin Peterson
Benjamin Peterson added the comment: New changeset f7fa64f0e87edc61d990ed51b4da722906a10928 by Zackery Spytz in branch 'master': closes bpo-43011: Fix DeprecationWarnings in test_ctypes (GH-24305) https://github.com/python/cpython/commit/f7fa64f0e87edc61d990ed51b4da722906a10928 --

[issue43008] IDLE ignores sys.excepthook in normal, subprocess mode

2021-01-23 Thread Ken Hilton
Ken Hilton added the comment: Made requested changes, besides the tests. I didn't manage to figure out how to go about testing an excepthook in the first place, let alone a good or bad one. Hope that's not an issue. -- Added file: https://bugs.python.org/file49758/bpo-43008.patch.2

[issue43006] Changed behaviour of inspect.signature() in Python 3.10

2021-01-23 Thread Ken Jin
Ken Jin added the comment: For anyone interested, I went to do some digging on the 3 issues Zac listed: 1. Similar to the first message, this is caused by inspect.getfullarg/signature using get_type_hints in Py 3.10. get_type_hints internally converts None to NoneType. 2. I don't know

[issue43008] IDLE ignores sys.excepthook in normal, subprocess mode

2021-01-23 Thread Terry J. Reedy
Terry J. Reedy added the comment: I looked at all 4 hooks. sys.breakpointhook is invoked by breakpoint() in user code, so is not IDLE's concern at present. sys.unraiseablehook is invoked by the interpreter when user code messes up badly, so is not IDLE's condern. (And it is an expert

[issue43011] DeprecationWarnings in test_ctypes

2021-01-23 Thread Zackery Spytz
Change by Zackery Spytz : -- keywords: +patch pull_requests: +23126 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24305 ___ Python tracker ___

[issue43011] DeprecationWarnings in test_ctypes

2021-01-23 Thread Zackery Spytz
New submission from Zackery Spytz : ./python -m test test_ctypes 0:00:00 load avg: 1.65 Run tests sequentially 0:00:00 load avg: 1.65 [1/1] test_ctypes /home/lubuntu2/cpython/Lib/ctypes/test/test_parameters.py:243: DeprecationWarning: invalid escape sequence \(

[issue43010] @functools.wraps and abc.abstractmethod interoperability

2021-01-23 Thread Erez Zinman
New submission from Erez Zinman : Consider the following code: ``` from abc import ABC, abstractmethod from functools import wraps class A(ABC): @abstractmethod def f(self): pass @wraps(f) def wrapper(self): print('f is called!') f() class

[issue42628] binascii doesn't work on some base64

2021-01-23 Thread Kent Watsen
Change by Kent Watsen : -- nosy: -kwatsen2 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42628] binascii doesn't work on some base64

2021-01-23 Thread Kent Watsen
Kent Watsen added the comment: No activity in 3 weeks. Selecting a couple components to give it a bump. -- components: +C API, Library (Lib) nosy: +kwatsen ___ Python tracker

[issue43006] Changed behaviour of inspect.signature() in Python 3.10

2021-01-23 Thread Zac Hatfield-Dodds
Zac Hatfield-Dodds added the comment: And I promise this is the last one: import inspect import typing def f(): A = typing.TypeVar("A") def same_type_args(a: A, b: A): assert type(a) == type(b) print(inspect.signature(same_type_args))

[issue43006] Changed behaviour of inspect.signature() in Python 3.10

2021-01-23 Thread Zac Hatfield-Dodds
Zac Hatfield-Dodds added the comment: Aaaand it looks like another problem I'm having is also related: import inspect class T(typing.TypedDict): a: int print(inspect.signature(T)) was `(*args, **kwargs)` and now raises `ValueError: no signature found for builtin type

[issue43006] Changed behaviour of inspect.signature() in Python 3.10

2021-01-23 Thread Zac Hatfield-Dodds
Zac Hatfield-Dodds added the comment: A closely related problem, also via https://github.com/HypothesisWorks/hypothesis/issues/2767 import inspect def f(x) -> None: pass annotations = inspect.getfullargspec(f).annotations assert annotations == {"return": None},

[issue41798] [C API] Revisit usage of the PyCapsule C API with multi-phase initialization API

2021-01-23 Thread hai shi
hai shi added the comment: I have checked all capi instances have been allocated in the heap memory. So I think this bpo can be closed ;) Thanks Erlend for your contribution. Thanks victor, petr for your review -- resolution: -> fixed stage: patch review -> resolved status: open ->

[issue43009] Port curses capi pointer array to a struct

2021-01-23 Thread hai shi
Change by hai shi : -- keywords: +patch pull_requests: +23125 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24304 ___ Python tracker ___

[issue43009] Port curses capi pointer array to a struct

2021-01-23 Thread hai shi
New submission from hai shi : As the title mentioned. A entire py_curses capi struct would be better than pointer array. Related PR: PR 24186 -- assignee: shihai1991 messages: 385532 nosy: shihai1991, vstinner priority: normal severity: normal status: open title: Port curses capi

[issue43002] Exception chaining accepts exception classes

2021-01-23 Thread Mark Dickinson
Change by Mark Dickinson : -- pull_requests: +23124 pull_request: https://github.com/python/cpython/pull/24303 ___ Python tracker ___

[issue43002] Exception chaining accepts exception classes

2021-01-23 Thread Mark Dickinson
Mark Dickinson added the comment: Ram: I think you're conflating two separate things, here: (1) The ability to use an exception *class* instead of an exception *instance* in the "from" clause - that is, the ability to do "raise ValueError from TypeError" in place of "raise ValueError from

[issue43002] Exception chaining accepts exception classes

2021-01-23 Thread Steven D'Aprano
Steven D'Aprano added the comment: How do you "the wrong message" to implicitly chain exceptions rather than explicitly? The difference between: try: len(1) except TypeError as e: raise ValueError(msg) from e and try: len(1) except TypeError

[issue43008] IDLE ignores sys.excepthook

2021-01-23 Thread Ken Hilton
New submission from Ken Hilton : Similar to https://bugs.python.org/issue12643 - IDLE ignores sys.excepthook and always prints exceptions. -- assignee: terry.reedy components: IDLE files: bpo-43008.patch keywords: patch messages: 385529 nosy: kenny2minecraft, terry.reedy priority:

[issue43007] set_wakeup_fd() only works in main thread

2021-01-23 Thread MeneMeneTekel
New submission from MeneMeneTekel : This problem is marked as solved in issue38563, BUT the solution refers to some signal issues being solved - I'm using Python 3.8.7 on windows 10, where a signal solution may not work. I.e. my django (vers. 3.1.5) website crashes every second call with the

[issue42967] [security] urllib.parse.parse_qsl(): Web cache poisoning - `; ` as a query args separator

2021-01-23 Thread Ken Jin
Ken Jin added the comment: @Adam: >I haven't noticed, I'm sorry. I don't mind closing mine, just thought it could >be a nice first contribution. No worries :), please don't close yours. > Our PRs are different though - I feel like if we are to implement this, we > should let the

[issue43006] Changed behaviour of inspect.signature() in Python 3.10

2021-01-23 Thread Ken Jin
Ken Jin added the comment: > This is correct for typing.get_type_hints(), but *not* for > inspect.signature(). I therefore suspect that this is an accidental > side-effect from support for PEP-563 deferred evaluation of annotations. Spot on about PEP 563 becoming the default being the