[issue42584] Upgrade macOS and Windows installers to use SQLite 3.34.0

2021-01-03 Thread Ned Deily
Ned Deily added the comment: New changeset c94ee13ad596d26d1859078bc09806aa59bb by Erlend Egeberg Aasland in branch 'master': bpo-42584: Update macOS installer to use SQLite 3.34.0 (GH-23674) https://github.com/python/cpython/commit/c94ee13ad596d26d1859078bc09806aa59bb --

[issue28937] str.split(): allow removing empty strings (when sep is not None)

2021-01-03 Thread Raymond Hettinger
Change by Raymond Hettinger : -- nosy: -rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue28937] str.split(): allow removing empty strings (when sep is not None)

2021-01-03 Thread Guido van Rossum
Guido van Rossum added the comment: This issue probably needs a new champion. There is broad agreement but some bike shedding, so a PEP isn’t needed.-- --Guido (mobile) -- ___ Python tracker

[issue28937] str.split(): allow removing empty strings (when sep is not None)

2021-01-03 Thread karl
Change by karl : -- nosy: +karlcow ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42820] Sphinx conf.py needs_version entry is outdated

2021-01-03 Thread Tim Hoffmann
New submission from Tim Hoffmann : The sphinx conf.py entry `needs_version=1.8` (https://github.com/python/cpython/blob/1470edd6131c29b8a09ce012cdfee3afa269d553/Doc/conf.py#L48) is not in sync with the doc build requirements

[issue42681] Incorrect range checks/documentation in curses

2021-01-03 Thread STINNER Victor
STINNER Victor added the comment: > This change seems to broke some buildbots. Yep, see also bpo-42789. -- nosy: +vstinner ___ Python tracker ___

[issue42789] Do not skip test_curses on non-tty

2021-01-03 Thread STINNER Victor
STINNER Victor added the comment: > Buildbot failure: ARM Raspbian 3.x: (...) As expected, the 3.8 and 3.9 change also broke 11 buildbots (3.8 and 3.8) ;-) I understand that bpo-42681 will fix buildbots. -- ___ Python tracker

[issue42681] Incorrect range checks/documentation in curses

2021-01-03 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: This change seems to broke some buildbots. For instance: https://buildbot.python.org/all/#/builders/119/builds/153 == ERROR: test_colors_funcs (test.test_curses.TestCurses)

[issue42681] Incorrect range checks/documentation in curses

2021-01-03 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +22913 pull_request: https://github.com/python/cpython/pull/24079 ___ Python tracker ___

[issue42681] Incorrect range checks/documentation in curses

2021-01-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset b0ee2b492dbf550fbd2a63b82de0a4dc9d67f32e by Serhiy Storchaka in branch '3.9': [3.9] bpo-42681: Fix range checks for color and pair numbers in curses (GH-23874). (GH-24077)

[issue42789] Do not skip test_curses on non-tty

2021-01-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 645174abe0d13cce2cb339cc80b095ad484428ea by Serhiy Storchaka in branch '3.8': [3.8] [3.9] bpo-42789: Don't skip curses tests on non-tty. (GH-24009) (GH-24076) (GH-24078)

[issue42817] timedelta zeropadding hh

2021-01-03 Thread Kevin Rasmussen
Kevin Rasmussen added the comment: Eric makes a pretty good point about how that ends up looking with days included and backward compatibility. Thanks everyone for humouring me and talking me through this one I'm going to close the issue as "not a bug". -- resolution: -> not a bug

[issue42681] Incorrect range checks/documentation in curses

2021-01-03 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- title: mistake in curses documentation -> Incorrect range checks/documentation in curses ___ Python tracker ___

[issue42789] Do not skip test_curses on non-tty

2021-01-03 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +22912 pull_request: https://github.com/python/cpython/pull/24078 ___ Python tracker ___

[issue42681] mistake in curses documentation

2021-01-03 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +22911 pull_request: https://github.com/python/cpython/pull/24077 ___ Python tracker ___

[issue42789] Do not skip test_curses on non-tty

2021-01-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 0303008ebceb6ac6035cd9722d1393267304171d by Serhiy Storchaka in branch '3.9': [3.9] bpo-42789: Don't skip curses tests on non-tty. (GH-24009) (GH-24076) https://github.com/python/cpython/commit/0303008ebceb6ac6035cd9722d1393267304171d

[issue42819] readline 8.1 bracketed paste

2021-01-03 Thread Dustin Rodrigues
New submission from Dustin Rodrigues : Readline 8.1 enables bracketed paste by default. Package managers like Homebrew for macOS and distributions like Arch Linux which use the latest version of readline (released December 2020) now have new behavior when pasting multiline strings into the

[issue42681] mistake in curses documentation

2021-01-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 1470edd6131c29b8a09ce012cdfee3afa269d553 by Serhiy Storchaka in branch 'master': bpo-42681: Fix range checks for color and pair numbers in curses (GH-23874) https://github.com/python/cpython/commit/1470edd6131c29b8a09ce012cdfee3afa269d553

[issue42817] timedelta zeropadding hh

2021-01-03 Thread Andrei Kulakov
Andrei Kulakov added the comment: In a date, hours are zero-padded probably because that's a common standard for military time dates. But there is no such standard for time periods, therefore timedelta don't have to match date display in respect to zero-padding, in my opinion. --

[issue41463] Avoid duplicating jump information from opcode.py in compile.c

2021-01-03 Thread Irit Katriel
Irit Katriel added the comment: This seems complete, unless you still want to backport? -- nosy: +iritkatriel resolution: -> fixed status: open -> pending ___ Python tracker

[issue40077] Convert static types to heap types: use PyType_FromSpec()

2021-01-03 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Ok, perhaps we should leave a comment about that? It already has a comment about multi-phase init. What about Modules/_testbuffer.c and the xx-modules? $ grep -E 'static PyTypeObject .* =' $(find . -name "*.c"|grep -vE

[issue42812] @overload-ing method of parent class without actual implementation

2021-01-03 Thread Chaim Gewirtz
Chaim Gewirtz added the comment: Thanks for your perspective. To summarize here is how my proposed enhancement might look in practice: class Parent: def foo(self, **kwargs): """Argument names of foo vary depending on the child class.""" class Child(Parent): @overload

[issue42817] timedelta zeropadding hh

2021-01-03 Thread Eric V. Smith
Eric V. Smith added the comment: I don't think zero padding makes sense. For example: >>> td = datetime.timedelta(hours=100) >>> str(td) '4 days, 4:00:00' I think '4 days, 04:00:00' would not be very user friendly. In any event, backward compatibility would prevent us from changing this.

[issue42812] @overload-ing method of parent class without actual implementation

2021-01-03 Thread Yurii Karabas
Yurii Karabas <1998uri...@gmail.com> added the comment: > What is better? Sorry, I can't answer this question. I am a regular python user and I just tried to help with your issue. I believe we should wait for someone from core team to answer this question. > In your example, does Child foo

[issue42812] @overload-ing method of parent class without actual implementation

2021-01-03 Thread Chaim Gewirtz
Chaim Gewirtz added the comment: In your example, does Child foo call Parent foo? Because the intent is to use the parent's foo method. -- ___ Python tracker ___

[issue42812] @overload-ing method of parent class without actual implementation

2021-01-03 Thread Chaim Gewirtz
Chaim Gewirtz added the comment: What is better? A. Keeping Python as is, with four separate signature declarations (1x Parent, 2x @overload Child, and 1x actual signature in Child), and a second method call overhead at runtime (to satisfy mypy as it exists now). --or-- B. Simplify Python

[issue42812] @overload-ing method of parent class without actual implementation

2021-01-03 Thread Yurii Karabas
Yurii Karabas <1998uri...@gmail.com> added the comment: I think the simplest solution in your case is not to use `@overload`, as far as I understand you want to override the signature of base method. This code won't produce any error when used with `mypy`: ``` class Parent: def

[issue42812] @overload-ing method of parent class without actual implementation

2021-01-03 Thread Chaim Gewirtz
Chaim Gewirtz added the comment: Interesting. PyCharm has no problem with this code. It also autocompletes the argument names for me, which is very useful, especially since there a dozen different Child classes. Isn't "Simple is better than complex", and doesn't "...practicality beat

[issue42812] @overload-ing method of parent class without actual implementation

2021-01-03 Thread Yurii Karabas
Yurii Karabas <1998uri...@gmail.com> added the comment: `mypy` will produce an error on such code: ``` class Parent: def foo(self, **kwargs): """Argument names of foo vary depending on the child class.""" class Child(Parent): @overload def foo(self, a, b): pass

[issue42812] @overload-ing method of parent class without actual implementation

2021-01-03 Thread Chaim Gewirtz
Chaim Gewirtz added the comment: To clarify, this is how it's being done now a dozen times in actual production code: class Child(Parent): @overload foo(a, b): ... def overload(**kwargs): return super().foo(**kwargs) The goal of this proposed enhancement is to remove two

[issue42812] @overload-ing method of parent class without actual implementation

2021-01-03 Thread Chaim Gewirtz
Chaim Gewirtz added the comment: "The purpose of `@overload` is quite different." So, this would overload the @overload decorator. Hmmm... Is there a better way to accomplish this goal? What would you suggest, a new decorator? -- ___ Python

[issue42817] timedelta zeropadding hh

2021-01-03 Thread Kevin Rasmussen
Kevin Rasmussen added the comment: Question: Why should it be zeropadded to 2? Answer: Why wouldn't it be zeropadded to match the rest of the library? Honestly it just seemed like an inconsistency with the rest of the datetime module. It caught me off guard when I went I tried to pull

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

2021-01-03 Thread STINNER Victor
STINNER Victor added the comment: New changeset 7c83eaa536d2f436ae46211ca48692f576c732f0 by Hai Shi in branch 'master': bpo-41798: pyexpat: Allocate the expat_CAPI on the heap memory (GH-24061) https://github.com/python/cpython/commit/7c83eaa536d2f436ae46211ca48692f576c732f0 --

[issue17343] Add a version of str.split which returns an iterator

2021-01-03 Thread Martin Winks
Martin Winks added the comment: > Perhaps the use case is already served by re.finditer() def split_whitespace_ascii(s: str): return (pt.group(0) for pt in re.finditer(r"[A-Za-z']+", s)) solution above does not cover all possible data and is incorrect for bytes-like objects. writing

[issue42789] Do not skip test_curses on non-tty

2021-01-03 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +22910 pull_request: https://github.com/python/cpython/pull/24076 ___ Python tracker ___

[issue42818] AttributeError: 'zipimporter' object has no attribute 'find_spec'

2021-01-03 Thread Klaus Ethgen
New submission from Klaus Ethgen : I encountered the bug when installing a package with `python3 setup.py install --user`. After that, a second installation failed with this stack trace: ``` Traceback (most recent call last):

[issue42817] timedelta zeropadding hh

2021-01-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Why should it be zeropadded to 2? It is likely this option was considered when that code was added, and rejected. -- nosy: +serhiy.storchaka ___ Python tracker

[issue42817] timedelta zeropadding hh

2021-01-03 Thread Kevin Rasmussen
Kevin Rasmussen added the comment: Current behaviour: ``` # python Python 3.9.1 (default, Dec 18 2020, 05:16:04) [GCC 8.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import datetime >>> td = datetime.timedelta(hours=3) >>> str(td) '3:00:00' >>> dt =

[issue42816] Add str.split_iter function

2021-01-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Issue17343 mentions also a separate method str.itersplit, so I close this issue as a duplicate. -- nosy: +serhiy.storchaka resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Add a version of str.split which returns

[issue42816] Add str.split_iter function

2021-01-03 Thread Steven D'Aprano
Steven D'Aprano added the comment: See also discussion here: #17343 -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue42816] Add str.split_iter function

2021-01-03 Thread Steven D'Aprano
Steven D'Aprano added the comment: I am pretty sure this has been discussed and rejected on the Python-Ideas mailing list before. If not rejected, the idea didn't go very far. You may wish to search the mailing list archives for previous discussions. Either way, I think this should be

[issue42817] timedelta zeropadding hh

2021-01-03 Thread Kevin Rasmussen
Change by Kevin Rasmussen : -- keywords: +patch pull_requests: +22908 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24075 ___ Python tracker ___

[issue42817] timedelta zeropadding hh

2021-01-03 Thread Kevin Rasmussen
New submission from Kevin Rasmussen : It looks like hh should be zeropadded to 2 and isn't for timedelta. -- messages: 384273 nosy: krasmussen priority: normal severity: normal status: open title: timedelta zeropadding hh type: behavior versions: Python 3.10

[issue40077] Convert static types to heap types: use PyType_FromSpec()

2021-01-03 Thread Petr Viktorin
Petr Viktorin added the comment: Yes, please keep _testcapimodule.c as it is. Static types are still supported and need to be tested. -- ___ Python tracker ___

[issue40077] Convert static types to heap types: use PyType_FromSpec()

2021-01-03 Thread Petr Viktorin
Petr Viktorin added the comment: New changeset b8eb3765908c0063f0739595ba4b296cc8863d19 by Erlend Egeberg Aasland in branch 'master': bpo-40077: Add traverse/clear/free to arraymodule (GH-24066) https://github.com/python/cpython/commit/b8eb3765908c0063f0739595ba4b296cc8863d19 --

[issue42816] Add str.split_iter function

2021-01-03 Thread Martin Winks
New submission from Martin Winks : Split string by given separator and return iterator as a result. The naive and not very efficient solution would be using current str.split: def split_iter(self: str, sep: str) -> 'Iterator[str]': return iter(self.split(sep)) Probably, need we'll some

[issue42455] Add decorator_factory function to functools module

2021-01-03 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: I also agree with Raymond's opinion, and from the point that it didn't get much attention I'd assume not many people need it. So count me as -1 -- nosy: +BTaskaya ___ Python tracker

[issue38308] Add optional weighting to statistics.harmonic_mean()

2021-01-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 66136768615472a8d1a18b5018095b9737dbab8c by Zackery Spytz in branch 'master': bpo-38308: Fix the "versionchanged" for the *weights* of harmonic_mean() (GH-23919)

[issue42814] Undefined behavior in Objects/genericaliasobject.c

2021-01-03 Thread STINNER Victor
STINNER Victor added the comment: Thanks for the fix! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue42814] Undefined behavior in Objects/genericaliasobject.c

2021-01-03 Thread STINNER Victor
STINNER Victor added the comment: New changeset 5d3553b0a8959e7505bbec4de03077dbf135ee4b by Zackery Spytz in branch 'master': bpo-42814: Fix undefined behavior in Objects/genericaliasobject.c (GH-24073) https://github.com/python/cpython/commit/5d3553b0a8959e7505bbec4de03077dbf135ee4b

[issue42815] new thread doesn't copy context of the parent thread

2021-01-03 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +yselivanov ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42812] @overload-ing method of parent class without actual implementation

2021-01-03 Thread Yurii Karabas
Yurii Karabas <1998uri...@gmail.com> added the comment: The purpose of `@overload` is quite different. I believe you thought that this is smth like `@override` in Java world but it different. Basically, the correct usage of `@overaload` is: ``` @overload def process(response: None) -> None:

[issue38946] IDLE on macOS 10.15 Catalina does not open double-clicked files if app already launched

2021-01-03 Thread Ronald Oussoren
Ronald Oussoren added the comment: As another datapoint: This works for me on macOS 11.1 with the universal2 installer for Python 3.9.1 (which includes Tk 8.6.10). -- ___ Python tracker

[issue42455] Add decorator_factory function to functools module

2021-01-03 Thread Yurii Karabas
Yurii Karabas <1998uri...@gmail.com> added the comment: What we should do with this issue? There was no much discussion at python-ideas. I have received only one -1 opinion. -- ___ Python tracker

[issue42815] new thread doesn't copy context of the parent thread

2021-01-03 Thread Yurii Karabas
Change by Yurii Karabas <1998uri...@gmail.com>: -- keywords: +patch pull_requests: +22907 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24074 ___ Python tracker

[issue42815] new thread doesn't copy context of the parent thread

2021-01-03 Thread Yurii Karabas
New submission from Yurii Karabas <1998uri...@gmail.com>: New thread doesn't copy context of the parent thread. The minimal example to reproduce the issue: ``` from threading import Thread from contextvars import ContextVar foo: ContextVar[str] = ContextVar("foo") def temp():

[issue42814] Undefined behavior in Objects/genericaliasobject.c

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

[issue42814] Undefined behavior in Objects/genericaliasobject.c

2021-01-03 Thread Zackery Spytz
New submission from Zackery Spytz : In is_typing_name(), va_end() is not always called before the function returns. It is undefined behavior to call va_start() without also calling va_end(). -- components: Interpreter Core messages: 384261 nosy: ZackerySpytz priority: normal

[issue42789] Do not skip test_curses on non-tty

2021-01-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I guess I should merge a PR for issue42681 first. -- ___ Python tracker ___ ___

[issue41748] HTMLParser: comma in attribute values with/without space

2021-01-03 Thread karl
Change by karl : -- keywords: +patch pull_requests: +22904 stage: test needed -> patch review pull_request: https://github.com/python/cpython/pull/24072 ___ Python tracker ___

[issue41748] HTMLParser: comma in attribute values with/without space

2021-01-03 Thread Ezio Melotti
Ezio Melotti added the comment: Writing tests that verify the expected behavior is a great first step. The expected output in the tests should match the behavior described by the HTML 5 specs (which should also correspond to the browsers' behavior), and should initially fail. You can start

[issue41748] HTMLParser: comma in attribute values with/without space

2021-01-03 Thread karl
karl added the comment: Ah! This is fixing it diff --git a/Lib/html/parser.py b/Lib/html/parser.py index 6083077981..790666 100644 --- a/Lib/html/parser.py +++ b/Lib/html/parser.py @@ -44,7 +44,7 @@ (?:\s*=+\s*# value indicator (?:'[^']*'

[issue42813] Extra spaces cause unexpected EOF error in "compile" function with mode "single"

2021-01-03 Thread Xinmeng Xia
New submission from Xinmeng Xia : Running the following program will lead to an unexpected EOF error. If we delete the space before triple-quotation mark("""), the error will gone. If we replace the content of snippet with "a = 1", the program will work well. However, if we replace the

[issue41748] HTMLParser: comma in attribute values with/without space

2021-01-03 Thread karl
Change by karl : -- title: HTMLParser: parsing error -> HTMLParser: comma in attribute values with/without space ___ Python tracker ___

[issue41748] HTMLParser: parsing error

2021-01-03 Thread karl
karl added the comment: Ezio, TL,DR: Testing in browsers and adding two tests for this issue. Should I create a PR just for the tests? https://github.com/python/cpython/blame/63298930fb531ba2bb4f23bc3b915dbf1e17e9e1/Lib/test/test_htmlparser.py#L479-L485 A: comma without spaces