[issue36674] "unittest.TestCase.debug" should honour "skip" (and other test controls)

2021-09-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There are too many issues with TestResult.debug(). It does not call tearDown() and doCleanups() if the test is skipped, failed or raises other exception (including errors in cleanup). It does not support skipping decorators. It does not support the

[issue44848] Upgrade macOS and Windows installers to use SQLite 3.36.0

2021-09-05 Thread Ned Deily
Ned Deily added the comment: New changeset 5024dc1c6e08247693aea6ad6e225ec5dcaf0721 by Erlend Egeberg Aasland in branch 'main': bpo-44848: Update macOS installer to use SQLite 3.36.0 (GH-27621) https://github.com/python/cpython/commit/5024dc1c6e08247693aea6ad6e225ec5dcaf0721 --

[issue39298] add BLAKE3 to hashlib

2021-09-05 Thread Jack O'Connor
Jack O'Connor added the comment: Hi Michał, no I haven't done any more work on this since my comments back in April. If you wanted to get started on a PyPI implementation, I think that would be fantastic. I'd be happy to collaborate over email: oconnor...@gmail.com. The branches I linked are

[issue45110] argparse repeats itself when formatting help metavars

2021-09-05 Thread Forest
New submission from Forest : When argparse actions have multiple option strings and at least one argument, the default formatter presents them like this: -t ARGUMENT, --task ARGUMENT Perform a task with the given argument. -p STRING, --print STRING

[issue45110] argparse repeats itself when formatting help metavars

2021-09-05 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +paul.j3, rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue45108] frame.f_lasti points at DICT_MERGE instead of CALL_FUNCTION_EX in Windows only

2021-09-05 Thread Samuel Colvin
Samuel Colvin added the comment: Perhaps worth adding that the tests don't fail on python 3.6, 3.7 or 3.8. -- nosy: +samuelcolvin ___ Python tracker ___

[issue39355] The Python library will not compile with a C++2020 compiler because the code uses the reserved “module” keyword

2021-09-05 Thread Keith
Keith added the comment: the word "module" should be treated as a reserved keyword. Any use of "module" as an argument name should be changed to something else throughout the code base. On Fri, Aug 20, 2021 at 11:28 PM Hasan wrote: > > Hasan added the comment: > > We have tested with

[issue45105] Incorrect handling of unicode character \U00010900

2021-09-05 Thread Max Bachmann
Max Bachmann added the comment: As far as a I understood this is caused by the same reason: ``` >>> s = '123\U00010900456' >>> s '123ऀ456' >>> list(s) ['1', '2', '3', 'ऀ', '4', '5', '6'] # note that everything including the commas is mirrored until ] is reached >>> s[3] 'ऀ' >>> list(s)[3] 'ऀ'

[issue45100] Improve help() by making typing.overload() information accessible at runtime

2021-09-05 Thread Raymond Hettinger
Raymond Hettinger added the comment: Note, I'm not proposing a create_function() decorator. That is just for the proof of concept. The actual logic would go into normal function creation, the same place that __annotations__ gets added. Also, there may be a better place than

[issue21302] time.sleep (floatsleep()) should use clock_nanosleep() on Linux

2021-09-05 Thread Benjamin Szőke
Benjamin Szőke added the comment: Can you review my final implementation? https://github.com/python/cpython/pull/28111 -- versions: +Python 3.11 ___ Python tracker ___

[issue44863] Allow TypedDict to inherit from Generics

2021-09-05 Thread Guido van Rossum
Guido van Rossum added the comment: Updating an existing (standards track) PEP significantly is not traditional. I recommend writing a new PEP. On Sun, Sep 5, 2021 at 01:24 Ken Jin wrote: > > Ken Jin added the comment: > > Guido, OP has kindly written a mini PEP for this. Do you think just

[issue45107] Improve LOAD_METHOD specialization

2021-09-05 Thread Ken Jin
Change by Ken Jin : -- keywords: +patch pull_requests: +26604 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28177 ___ Python tracker ___

[issue30856] unittest.TestResult.addSubTest should be called immediately after subtest finishes

2021-09-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Before b3468f79efa45c8adaf86c0b9b797b9b3d4c12a2 the TestResult methods (addFailure, addError, addSkip, addExpectedFailure, addUnexpectedSuccess) were called immediately after running the test method. After that change all skips, failures and errors were

[issue45110] argparse repeats itself when formatting help metavars

2021-09-05 Thread Raymond Hettinger
Raymond Hettinger added the comment: I don't agree this should be changed. The repetition helps improve understanding because not everyone would assume that a METAVAR shown once would automatically also apply to its long form. Also, showing the METAVAR more than one is a norm. For

[issue45105] Incorrect handling of unicode character \U00010900

2021-09-05 Thread Steven D'Aprano
Steven D'Aprano added the comment: Hmmm, digging deeper, I saved the page source code and opened it with hexdump. The relevant lines are: 7780 60 60 0d 0a 26 67 74 3b 26 67 74 3b 26 67 74 3b |``..| 7790 20 73 20 3d 20 27 30 f0 90 a4 80 30 30 27 0d 0a | s = '000'..| which

[issue45100] Teach help about typing.overload()

2021-09-05 Thread Raymond Hettinger
Raymond Hettinger added the comment: > The two @overload definitions will be overwritten by > the non-overload one at runtime, and hence will ever > been seen by help(). We can fix this by adding an __overloads__ attribute. The overload decorator can accumulate the chain in an external

[issue45107] Improve LOAD_METHOD specialization

2021-09-05 Thread Ken Jin
New submission from Ken Jin : I plan to do two improvements over the initial implementation: 1. General comments cleanup and optimize LOAD_METHOD_CLASS. 2. Implement LOAD_METHOD_SUPER, for super().meth() calls. See Issue44889 for the precursor. -- components: Interpreter Core

[issue1705520] API for excluding methods from unittest stack traces

2021-09-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What to do with comprehensions and classes? Corresponding code objects are not easily accessible and they do not have corresponding function. It would be difficult to use the locals of the frame with comprehensions. Maybe use per-module registries of

[issue45109] pipes seems designed for bytes but is str-only

2021-09-05 Thread Richard Tollerton
New submission from Richard Tollerton : 1. https://github.com/python/cpython/blob/3.9/Lib/pipes.py#L6 > Suppose you have some data that you want to convert to another format, > such as from GIF image format to PPM image format. 2. https://docs.python.org/3.9/library/pipes.html > Because the

[issue35741] unittest.skipUnless(time._STRUCT_TM_ITEMS == 11, "needs tm_zone support") doesn't work

2021-09-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: _STRUCT_TM_ITEMS was always set to 11 since issue25283. On what platform test_localtime_timezone fails now? -- nosy: +serhiy.storchaka ___ Python tracker

[issue45110] argparse repeats itself when formatting help metavars

2021-09-05 Thread Jeremy Kloth
Jeremy Kloth added the comment: Except that the output in question is not for manpages but for the command-line. The analogous would be for `grep --help` (again an excerpt): Context control: -B, --before-context=NUM print NUM lines of leading context -A, --after-context=NUM print NUM

[issue45100] Improve help() by making typing.overload() information accessible at runtime

2021-09-05 Thread Raymond Hettinger
Change by Raymond Hettinger : -- title: Teach help about typing.overload() -> Improve help() by making typing.overload() information accessible at runtime versions: +Python 3.11 ___ Python tracker

[issue45034] Improve struct.pack out of range error messages

2021-09-05 Thread Nikita Sobolev
Change by Nikita Sobolev : -- keywords: +patch pull_requests: +26605 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28178 ___ Python tracker ___

[issue45108] frame.f_lasti points at DICT_MERGE instead of CALL_FUNCTION_EX in Windows only

2021-09-05 Thread Alex Hall
New submission from Alex Hall : In this script: import inspect import dis def foo(**_): frame = inspect.currentframe().f_back print(frame.f_lasti) dis.dis(frame.f_code) d = {'a': 1, 'b': 2} foo(**d) dis shows these instructions for

[issue45110] argparse repeats itself when formatting help metavars

2021-09-05 Thread Forest
Forest added the comment: By the way, I would be happy to submit a patch, either to remove the repeat text or to make it optional via an easily overridden class attribute. -- ___ Python tracker

[issue45105] Incorrect handling of unicode character \U00010900

2021-09-05 Thread Max Bachmann
Max Bachmann added the comment: > That is using Python 3.9 in the xfce4-terminal. Which xterm are you using? This was in the default gnome terminal that is pre-installed on Fedora 34 and on windows I directly opened the Python Terminal. I just installed xfce4-terminal on my Fedora 34 machine

[issue45106] Issue formating for log on Linux machines

2021-09-05 Thread Andrew Suttle
New submission from Andrew Suttle : Using the format option for Python logging works fine on all windows machines: logging.basicConfig(filename='log.log', encoding='utf-8', level=logging.DEBUG,format='%(asctime)s : %(message)s ') But error occurs on Linux mint 64 20.2 using Python 3.8 when

[issue45105] Incorrect handling of unicode character \U00010900

2021-09-05 Thread Steven D'Aprano
Steven D'Aprano added the comment: > what's really there when I copy it from Firefox is '0\U000109', > which matches the result Max gets for individual index operations such as > s[1]. But *not* the result that Max got from calling list(). Can you reproduce that difference between

[issue41031] Inconsistency in C and python traceback printers

2021-09-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 9e31b3952f6101ef71ec029481b972169ab0e0f1 by Irit Katriel in branch 'main': bpo-41031: Match C and Python code formatting of unprintable exceptions and exceptions in the __main__ module. (GH-28139)

[issue25894] unittest subTest failure causes result to be omitted from listing

2021-09-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Any suggestions for the format of output? Currently PR 28082 formats lines for subtest skipping, failure or error with a 2-space identation. Lines for skipping, failure or error in tearDown() or functions registered with addCallback() do not differ from a

[issue30856] unittest.TestResult.addSubTest should be called immediately after subtest finishes

2021-09-05 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch nosy: +serhiy.storchaka nosy_count: 4.0 -> 5.0 pull_requests: +26606 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28180 ___ Python tracker

[issue45110] argparse repeats itself when formatting help metavars

2021-09-05 Thread Forest
Forest added the comment: On Mon, 06 Sep 2021 03:11:16 +, Raymond Hettinger wrote: >The repetition helps improve understanding because not everyone would assume >that a METAVAR shown once would automatically also apply to its long form. I'm struggling to think of a real-world example

[issue45110] argparse repeats itself when formatting help metavars

2021-09-05 Thread paul j3
paul j3 added the comment: https://bugs.python.org/issue42980 argparse: GNU-style help formatter https://bugs.python.org/issue33389 argparse redundant help string https://bugs.python.org/issue29626 Issue with spacing in argparse module while using help https://bugs.python.org/issue27303

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

2021-09-05 Thread hai shi
hai shi added the comment: > PyStructSequence_InitType2() is not compatible with subinterpreters: it uses > static types. Moreover, it allocates tp_members memory which is not released > when the type is destroyed. But I'm not sure that the type is ever destroyed, > since this API is

[issue45110] argparse repeats itself when formatting help metavars

2021-09-05 Thread paul j3
paul j3 added the comment: This is has been requested various times on StackOverflow, and possibly here (I'd have to do a search). The closest thing to making a compact action_invocation is to set the metavar to '', and even thing we get a space, eg. -f , --foo Help text This

[issue45110] argparse repeats itself when formatting help metavars

2021-09-05 Thread Forest
Forest added the comment: On Mon, 06 Sep 2021 04:58:38 +, paul j3 wrote: >This repeat has been a part of argparse from the beginning, so I can't >see changing the default behavior. Yes, I guessed as much, which is why I first suggested making it optional. >But we could add a

[issue40059] Provide a toml module in the standard library

2021-09-05 Thread Michał Górny
Michał Górny added the comment: Is there any progress happening? FWIU the common "toml" module on pypi has been discontinued now, projects are switching to yet another one and this is exactly the kind of problem a built-in module would have avoided. --

[issue39298] add BLAKE3 to hashlib

2021-09-05 Thread Michał Górny
Michał Górny added the comment: Jack, are you still working on this? I was considering allocating the time to write the bindings for the C library myself but I've stumbled upon this bug and I suppose there's no point in duplicating work. I'd love to see it on pypi, so we could play with it

[issue45105] Incorrect handling of unicode character \U00010900

2021-09-05 Thread Eryk Sun
Eryk Sun added the comment: > I think you may be mistaken. In Max's original post, he has > s = '000X' It displays that way for me under Firefox in Linux, but what's really there when I copy it from Firefox is '0\U000109', which matches the result Max gets for individual index

[issue45105] Incorrect handling of unicode character \U00010900

2021-09-05 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- status: open -> pending ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45105] Incorrect handling of unicode character \U00010900

2021-09-05 Thread Max Bachmann
New submission from Max Bachmann : I noticed that when using the Unicode character \U00010900 when inserting the character as character: Here is the result on the Python console both for 3.6 and 3.9: ``` >>> s = '0ऀ00' >>> s '0ऀ00' >>> ls = list(s) >>> ls ['0', 'ऀ', '0', '0'] >>> s[0] '0' >>>

[issue45105] Incorrect handling of unicode character \U00010900

2021-09-05 Thread Max Bachmann
Max Bachmann added the comment: This is the result of copy pasting example posted above on windows using ``` Python 3.7.8 (tags/v3.7.8:4b47a5b6ba, Jun 28 2020, 08:53:46) [MSC v.1916 64 bit (AMD64)] on win32 ``` which appears to run into similar problems: ``` >>> s = '0��00'

[issue45100] Teach help about typing.overload()

2021-09-05 Thread Alex Waygood
Alex Waygood added the comment: There is a similar issue with `functools.singledispatch` ``` >>> from functools import singledispatch >>> @singledispatch ... def flip(x: str) -> int: ... """Signature when given a string""" ... return int(x) ... >>> @flip.register ... def _(x: int) ->

[issue44892] [configparser] Module configparser fails when the config file contains a "%" inside a commentary

2021-09-05 Thread Diego Ramirez
Diego Ramirez added the comment: Any commentaries about this issue? -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue44892] [configparser] Module configparser fails when the config file contains a "%" inside a commentary

2021-09-05 Thread Diego Ramirez
Change by Diego Ramirez : -- type: crash -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45100] Teach help about typing.overload()

2021-09-05 Thread Diego Ramirez
Change by Diego Ramirez : -- nosy: +DiddiLeija ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45105] Incorrect handling of unicode character \U00010900

2021-09-05 Thread Eryk Sun
Eryk Sun added the comment: AFAICT, there is no bug here. It's just confusing how Unicode right-to-left characters in the repr() can modify how it's displayed in the console/terminal. Use the ascii() representation to avoid the problem. > The same behavior does not occur when directly using

[issue45105] Incorrect handling of unicode character \U00010900

2021-09-05 Thread Steven D'Aprano
Steven D'Aprano added the comment: I'm afraid I cannot reproduce the problem. >>> s = '000ऀ' # \U00010900 >>> s '000ऀ' >>> s[0] '0' >>> s[1] '0' >>> s[2] '0' >>> s[3] 'ऀ' >>> list(s) ['0', '0', '0', 'ऀ'] That is using Python 3.9 in the xfce4-terminal. Which xterm are you using? I am very

[issue45026] More compact range iterator

2021-09-05 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +26603 pull_request: https://github.com/python/cpython/pull/28176 ___ Python tracker ___

[issue45105] Incorrect handling of unicode character \U00010900

2021-09-05 Thread Steven D'Aprano
Steven D'Aprano added the comment: Eryk Sun said: > The original string has the Phoenician right-to-left character at index 1, > not at index 3. I think you may be mistaken. In Max's original post, he has s = '000X' where the X is actually the Phoenician ALF character. At least that

[issue45026] More compact range iterator

2021-09-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: PR 28176 implements idea proposed by Dennis in msg400396. It keeps the current and stop values instead of the initial start, index and initial length. I do not have data yet, but it is expected that it's iteration may be faster (for large integers), but

[issue45042] Many multiprocessing tests are silently skipped since 3.9

2021-09-05 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue45102] unittest: add tests for skipping and errors in cleanup

2021-09-05 Thread miss-islington
Change by miss-islington : -- pull_requests: +26602 pull_request: https://github.com/python/cpython/pull/28175 ___ Python tracker ___

[issue45102] unittest: add tests for skipping and errors in cleanup

2021-09-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 28264269de9ff88d9ee7110fc56ac2d2db275bec by Serhiy Storchaka in branch 'main': bpo-45102: unittest: add tests for skipping and errors in cleanup (GH-28166) https://github.com/python/cpython/commit/28264269de9ff88d9ee7110fc56ac2d2db275bec

[issue45102] unittest: add tests for skipping and errors in cleanup

2021-09-05 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +26601 pull_request: https://github.com/python/cpython/pull/28174 ___ Python tracker

[issue45100] Teach help about typing.overload()

2021-09-05 Thread Ronald Oussoren
Ronald Oussoren added the comment: I agree that this would be nice to have, but wonder how help() could access that information. The two @overload definitions will be overwritten by the non-overload one at runtime, and hence will ever been seen by help(). -- nosy: +ronaldoussoren

[issue44863] Allow TypedDict to inherit from Generics

2021-09-05 Thread Ken Jin
Ken Jin added the comment: Guido, OP has kindly written a mini PEP for this. Do you think just updating PEP 589 is sufficient, or do we need a full PEP? (PS. Changed version to 3.11 since we've missed the train for 3.10 enhancements). -- versions: -Python 3.10

[issue45100] Teach help about typing.overload()

2021-09-05 Thread Ken Jin
Change by Ken Jin : -- nosy: +gvanrossum, kj ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45102] unittest: add tests for skipping and errors in cleanup

2021-09-05 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue45042] Many multiprocessing tests are silently skipped since 3.9

2021-09-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset ab58269ab3b784bef33a613cd0a68914065a9134 by Serhiy Storchaka in branch '3.9': [3.9] bpo-45042: Now test classes decorated with `requires_hashdigest` are not skipped (GH-28060) (GH-28169)

[issue45102] unittest: add tests for skipping and errors in cleanup

2021-09-05 Thread miss-islington
miss-islington added the comment: New changeset f91d974ce61b2a9922391f723b388a623284fb0a by Miss Islington (bot) in branch '3.9': bpo-45102: unittest: add tests for skipping and errors in cleanup (GH-28166) https://github.com/python/cpython/commit/f91d974ce61b2a9922391f723b388a623284fb0a

[issue45102] unittest: add tests for skipping and errors in cleanup

2021-09-05 Thread miss-islington
miss-islington added the comment: New changeset 8342c526e9cf138a10668fa9e487d92ee1a3a42c by Miss Islington (bot) in branch '3.10': bpo-45102: unittest: add tests for skipping and errors in cleanup (GH-28166) https://github.com/python/cpython/commit/8342c526e9cf138a10668fa9e487d92ee1a3a42c