[issue39219] Fix attributes of syntax errors raized in the tokenizer

2020-01-10 Thread Terry J. Reedy
Terry J. Reedy added the comment: On entry of '0xz', IDLE from 3.6 to date highlights the '0x' part of the original entry. I presume it can do this because it ignores the text attribute, and because bytes == chars for at least '0x'. The 'proposed PR' is not listed here. Is it not yet subm

[issue39228] traceback.FrameSummary does not handle exceptions from `repr()`

2020-01-10 Thread Terry J. Reedy
Terry J. Reedy added the comment: As is true for most special methods, it is a bug for __repr__ methods to raise. They should return a string, as documented. Special method wrappers generally assume that the wrapped methods work. In particular, repr assumes this, and so do the __repr__ met

[issue39288] Add math.nextafter(a, b)

2020-01-10 Thread STINNER Victor
STINNER Victor added the comment: > NumPy has nextafter. That's why I proposed math.nextafter() name. Moreover, in the math module, most functions reuse the same names than C function names: expm1(), atan2(), erf(), etc. > IEEE 754, on the other hand, requires instead nextUp and nextDown,

[issue39231] Mistaken notion in tutorial

2020-01-10 Thread Terry J. Reedy
Terry J. Reedy added the comment: https://docs.python.org/3/tutorial/controlflow.html#function-annotations is the direct link. As Mark said, 'ham' is a required positional-or-keyword argument. 'eggs' is an optional 'positional-or-keyword. The sentence as is is wrong, even if Robert garbled t

[issue39297] Synchronize importlib.metadata with importlib_metadata 1.4

2020-01-10 Thread Jason R. Coombs
New submission from Jason R. Coombs : Importlib_metadata 1.4 adds performance improvements to the distribution discovery mechanism. Let's incorporate those upstream. -- components: Library (Lib) messages: 359773 nosy: jaraco priority: normal severity: normal status: open title: Synchro

[issue39249] difflib SequenceMatcher 200 char length limitation for ratio calculation

2020-01-10 Thread Terry J. Reedy
Change by Terry J. Reedy : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> difflib SequenceMatcher ratio() still have unpredictable behavior ___ Python tracker ___

[issue39274] Conversion from fractions.Fraction to bool

2020-01-10 Thread Terry J. Reedy
Change by Terry J. Reedy : -- Removed message: https://bugs.python.org/msg359674 ___ Python tracker ___ ___ Python-bugs-list mailing

[issue39297] Synchronize importlib.metadata with importlib_metadata 1.4

2020-01-10 Thread Jason R. Coombs
Change by Jason R. Coombs : -- keywords: +patch pull_requests: +17355 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17947 ___ Python tracker ___

[issue39275] Traceback off by one line when

2020-01-10 Thread Terry J. Reedy
Change by Terry J. Reedy : -- versions: -Python 3.6 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[issue39247] dataclass defaults and property don't work together

2020-01-10 Thread Eric V. Smith
Eric V. Smith added the comment: > During this processing of fields, couldn't you just special case > property/descriptor objects? What if you want the field to be a descriptor? I think the best way of handling this would be to use some sentinel value for the default, and if found look up t

[issue39288] Add math.nextafter(a, b)

2020-01-10 Thread Tim Peters
Tim Peters added the comment: No doubt that something along these lines would be useful. `nextafter()` is too widely implemented to fight against, despite the sucky name ;-) I believe the rest should be straightforward (for those who want them) to do with one-liners, so there's not much of

[issue39200] Fix inaccurate TypeError messages when calling with insufficient arguments

2020-01-10 Thread Dong-hee Na
Dong-hee Na added the comment: CPython or stdlib: There is no code depends on the error message of range and min/max. 3rd party: IMHO, if somebody relies on the error message, not error type, I think that the code pattern is bad usage And as I mentioned on msg359243, other python compatible

[issue39298] add BLAKE3 to hashlib

2020-01-10 Thread Larry Hastings
New submission from Larry Hastings : >From 3/4 of the team that brought you BLAKE2, now comes... BLAKE3! https://github.com/BLAKE3-team/BLAKE3 BLAKE3 is a brand new hashing function. It's fast, it's paralellizeable, and unlike BLAKE2 there's only one variant. I've experimented with it a lit

[issue39207] concurrent.futures.ProcessPoolExecutor does not properly reap jobs and spawns too many workers

2020-01-10 Thread Kyle Stanley
Kyle Stanley added the comment: > What "ignores the max_workers argument" means? >From my understanding, their argument was that the parameter name >"max_workers" and documentation implies that it will spawn processes as needed >up to *max_workers* based on the number of jobs scheduled. >

[issue39288] Add math.nextafter(a, b)

2020-01-10 Thread Steven D'Aprano
Steven D'Aprano added the comment: I agree, "nextafter" is so widely used it's probably pointless to fight against the name :-) Mark: "IEEE 754, on the other hand, requires instead nextUp and nextDown". I know Wikipedia isn't a primary source, but it says IEEE 754 recommends nextafter(x, y)

[issue39288] Add math.nextafter(a, b)

2020-01-10 Thread Tim Peters
Tim Peters added the comment: [Steven] > I think the second argument should also be optional, so > that nextafter(x) returns the next representable float. That's why the name sucks - there are, in general, two adjacent floats, so "next" is ambiguous. I expect you intend that y default to mat

[issue39299] Improve test coverage for mimetypes module

2020-01-10 Thread Karthikeyan Singaravelan
New submission from Karthikeyan Singaravelan : Currently the test coverage for mimetypes module is at 57% https://codecov.io/gh/python/cpython/src/43682f1e39a3c61f0e8a638b887bcdcbfef766c5/Lib/mimetypes.py . I propose adding the following tests to increase the coverage. * Add test for case ins

[issue39299] Improve test coverage for mimetypes module

2020-01-10 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- keywords: +patch pull_requests: +17356 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17949 ___ Python tracker ___

[issue39298] add BLAKE3 to hashlib

2020-01-10 Thread Dong-hee Na
Change by Dong-hee Na : -- nosy: +corona10 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue39298] add BLAKE3 to hashlib

2020-01-10 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +xtreak ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue39300] dataclasses non-default argument follows default argument

2020-01-10 Thread lijok
New submission from lijok : from dataclasses import dataclass @dataclass class A: PARAM: int @dataclass class B(A): ARG: int PARAM: int = 1 Traceback (most recent call last): File "", line 2, in File "C:\Users\user\AppData\Local\Programs\Python\Python38\lib\dataclasses.py"

[issue39300] dataclasses non-default argument follows default argument

2020-01-10 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: > TypeError will be raised if a field without a default value follows a field > with a default value. This is true either when this occurs in a single class, > or as a result of class inheritance. I think this is a combination of the above statemen

[issue38704] Prevent installation on unsupported Windows versions

2020-01-10 Thread Zackery Spytz
Change by Zackery Spytz : -- keywords: +patch pull_requests: +17357 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/17950 ___ Python tracker ___

[issue39300] dataclasses non-default argument follows default argument

2020-01-10 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: See also issue36077 -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue38704] Prevent installation on unsupported Windows versions

2020-01-10 Thread Zackery Spytz
Change by Zackery Spytz : -- nosy: +ZackerySpytz ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue17718] boolop constant checking for if/while

2020-01-10 Thread Zackery Spytz
Zackery Spytz added the comment: I think this issue should be closed. -- nosy: +ZackerySpytz ___ Python tracker ___ ___ Python-bugs

[issue17718] boolop constant checking for if/while

2020-01-10 Thread Benjamin Peterson
Change by Benjamin Peterson : -- resolution: -> rejected stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Pyth

[issue39301] Specification of bitshift on integers should clearly state floor division used

2020-01-10 Thread Nick Coghlan
New submission from Nick Coghlan : While reviewing ISO-IECJTC1-SC22-WG23's latest draft of their Python security annex, I noticed that https://docs.python.org/3.7/library/stdtypes.html#bitwise-operations-on-integer-types doesn't explicitly state that *floor* division is used for right shift

[issue39300] dataclasses non-default argument follows default argument

2020-01-10 Thread lijok
lijok added the comment: > I think this is a combination of the above statement at end of [0] and > inheritance following the order of the fields at [1] Ah, I see, so if I understand correctly the init method for the example given would become __init__(self, PARAM: int = 1, ARG: int) since t

<    1   2