[issue16576] ctypes: structure with bitfields as argument

2020-01-11 Thread Vinay Sajip
Vinay Sajip added the comment: The issue is being reopened, see this comment on bpo-16575: https://bugs.python.org/msg359834 -- resolution: fixed -> stage: resolved -> status: closed -> open ___ Python tracker

[issue16575] ctypes: unions as arguments

2020-01-11 Thread Vinay Sajip
Vinay Sajip added the comment: It seems that notwithstanding the issues identified in the original bug report, calls by value of structs containing unions are being used out there in the wild. Examples: The comtypes library (Windows): https://github.com/python/cpython/pull/16799#issuecomment

[issue39259] poplib.POP3/POP3_SSL should reject timeout = 0 (non-blocking mode)

2020-01-11 Thread Dong-hee Na
Change by Dong-hee Na : -- pull_requests: +17366 pull_request: https://github.com/python/cpython/pull/17958 ___ Python tracker ___ _

[issue35561] Valgrind reports Syscall param epoll_ctl(event) points to uninitialised byte(s)

2020-01-11 Thread Zackery Spytz
Zackery Spytz added the comment: Thank you, Victor, for the comments. I will update PR 17782. -- ___ Python tracker ___ ___ Python

[issue36351] the ipv6type variable in configure.ac may be set incorrectly when cross-compiling

2020-01-11 Thread Zackery Spytz
Change by Zackery Spytz : -- nosy: +ZackerySpytz versions: +Python 3.9 -Python 3.8 ___ Python tracker ___ ___ Python-bugs-list maili

[issue36351] the ipv6type variable in configure.ac may be set incorrectly when cross-compiling

2020-01-11 Thread Zackery Spytz
Change by Zackery Spytz : -- pull_requests: +17365 pull_request: https://github.com/python/cpython/pull/17956 ___ Python tracker ___ ___

[issue39292] syslog constants behind rfc

2020-01-11 Thread Vinay Sajip
Change by Vinay Sajip : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 3.7, Python 3.8 ___ Python tracker ___ __

[issue39309] Please delete my account

2020-01-11 Thread Sfjwlejfawnfsfjwlejfawnf
Change by Sfjwlejfawnfsfjwlejfawnf : -- nosy: sfjwlejfawnf priority: normal severity: normal status: open title: Please delete my account ___ Python tracker ___ ___

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

2020-01-11 Thread Nick Coghlan
Nick Coghlan added the comment: Aye, adding "floor" to the existing footnote would be the minimal fix. I'm just wondering whether it's also worth stating that this means that positive integers saturate at zero, while negative integers saturate at -1. -- _

[issue39308] Literal[True] prints as Literal[1] in some cases

2020-01-11 Thread Guido van Rossum
Guido van Rossum added the comment: No need to open the attachment -- a simpler repro is: >>> from typing import Literal >>> Literal[1] typing.Literal[1] >>> Literal[True] typing.Literal[1] >>> However, in a fresh session >>> from typing import Literal >>> Literal[True] typing.Literal[True]

[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-01-11 Thread hai shi
hai shi added the comment: FWIW, i counted the difference of each file's refs after `Py_Finalize()`. [('Objects/dictobject.c', 21434), ('Python/marshal.c', 8135), ('Objects/codeobject.c', 6245), ('Objects/listobject.c', 6037), ('Objects/tupleobject.c', 4169), ('Objects/boolobject.c', 2433),

[issue34732] uuid returns version more than 5

2020-01-11 Thread Cheryl Sabella
Cheryl Sabella added the comment: Updating version and adding some people to the nosy list to review the two suggested pull requests for this issue. Thanks! -- nosy: +barry, cheryl.sabella, taleinat, twouters versions: +Python 3.9 -Python 3.7 ___

[issue33471] string format with 'n' failling with french locales

2020-01-11 Thread Cheryl Sabella
Change by Cheryl Sabella : -- resolution: -> duplicate stage: patch review -> resolved status: open -> closed superseder: -> float.__format__('n') fails with _PyUnicode_CheckConsistency assertion error for locales with non-ascii thousands separator __

[issue32978] Issues with reading large float values in AIFC files

2020-01-11 Thread Cheryl Sabella
Change by Cheryl Sabella : -- versions: +Python 3.9 -Python 2.7, Python 3.6, Python 3.7 ___ Python tracker ___ ___ Python-bugs-list

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

2020-01-11 Thread Raymond Hettinger
Raymond Hettinger added the comment: I suggest "next_after" instead of "nextafter". -- ___ Python tracker ___ ___ Python-bugs-list

[issue39304] Don't accept a negative number for the count argument in str.replace(old, new[, count])

2020-01-11 Thread Raymond Hettinger
Change by Raymond Hettinger : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Pyt

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

2020-01-11 Thread STINNER Victor
STINNER Victor added the comment: I chose to make y mandatory in nextafter(x, y). Implement your own flavor if nextUp(x) if you want to omit y. I prefer to make y explicit, becauseit has been said in this discussion that "nextafter" name is ambiguous. Thanks all for the constructive discussi

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

2020-01-11 Thread STINNER Victor
STINNER Victor added the comment: New changeset 100fafcf20e8fc67cd8ef512074f9c0a253cb427 by Victor Stinner in branch 'master': bpo-39288: Add math.nextafter(x, y) (GH-17937) https://github.com/python/cpython/commit/100fafcf20e8fc67cd8ef512074f9c0a253cb427 -- ___

[issue27195] Crash when RawIOBase.write(b) evaluates b.format

2020-01-11 Thread Cheryl Sabella
Change by Cheryl Sabella : -- resolution: -> wont fix stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue32524] Python 2.7 leaks a packages __init__.py module object on SyntaxError

2020-01-11 Thread Cheryl Sabella
Change by Cheryl Sabella : -- resolution: -> wont fix stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue39296] Windows register keys

2020-01-11 Thread Tony
Tony added the comment: The attachment I forgot.. Greetings, Tony. Van: Steve Dower Verzonden: zaterdag 11 januari 2020 17:30 Aan: factoryx.c...@gmail.com Onderwerp: [issue39296] Windows register keys Steve Dower added the comment: Have you read PEP 514? Does that help? If not, can you pro

[issue39296] Windows register keys

2020-01-11 Thread Tony
Tony added the comment: Hello Steve, I just red the PEP 514. Thank you for pointing this out. However, when installing the latest version (3.8.1), the multi-user install is registered under key “HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\” as the PEP describes. The key “HKEY_LOCAL_MACHINE\SOFTWA

[issue39168] Generic type subscription is a huge toll on Python performance

2020-01-11 Thread calebj
Change by calebj : -- nosy: +calebj ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/m

[issue39308] Literal declarations are not typed. Literal[True] can be Literal[1] if declared after latter.

2020-01-11 Thread Tomasz Trębski
Tomasz Trębski added the comment: Also happens in `3.8`, so right when `Literal` got moved to core `Python`. -- versions: +Python 3.8 ___ Python tracker ___ ___

[issue39308] Literal declarations are not typed. Literal[True] can be Literal[1] if declared after latter.

2020-01-11 Thread Ned Deily
Change by Ned Deily : -- nosy: +gvanrossum, levkivskyi ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:

[issue39308] Literal declarations are not typed. Literal[True] can be Literal[1] if declared after latter.

2020-01-11 Thread Tomasz Trębski
Change by Tomasz Trębski : -- title: Literal[True] interpreted as Literal[1] -> Literal declarations are not typed. Literal[True] can be Literal[1] if declared after latter. ___ Python tracker ___

[issue39308] Literal[True] interpreted as Literal[1]

2020-01-11 Thread Tomasz Trębski
New submission from Tomasz Trębski : Consider code (in attachment) that is being run on Python 3.9. An expected output of such code ought to be: (typing_extensions.Literal[1], typing_extensions.Literal[0]) (typing_extensions.Literal[True], typing_extensions.Literal[False]) However that's not t

[issue31485] Tkinter widget.unbind(sequence, funcid) unbind all bindings

2020-01-11 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch pull_requests: +17364 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17954 ___ Python tracker ___ __

[issue39307] Memory leak in parsetok

2020-01-11 Thread Alex Henrie
Change by Alex Henrie : -- keywords: +patch pull_requests: +17363 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17953 ___ Python tracker ___

[issue39307] Memory leak in parsetok

2020-01-11 Thread Alex Henrie
New submission from Alex Henrie : The parsetok function currently contains the following code: if (!growable_comment_array_init(&type_ignores, 10)) { err_ret->error = E_NOMEM; PyTokenizer_Free(tok); return NULL; } if ((ps = PyParser_New(g, start)) == NULL) {

[issue39306] Lib/configparser.py - RawConfigParser.set does not pass non-truthy values through to Interpolation.before_set

2020-01-11 Thread Hans Strijker
New submission from Hans Strijker : Method ```configparser.RawConfigParser.set()``` has optional parameter *value* with default value ```None``` resulting in the behavior that actually trying to set a config parameter to ```None``` will not be propagated to ```Interpolation.before_set()```. I

[issue39275] Traceback off by one line when

2020-01-11 Thread Facundo Batista
Facundo Batista added the comment: This is a duplicate of https://bugs.python.org/issue16482 -- closing it. -- resolution: -> duplicate stage: -> resolved status: open -> closed ___ Python tracker

[issue39300] dataclasses non-default argument follows default argument

2020-01-11 Thread Eric V. Smith
Eric V. Smith added the comment: > 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 the fields are > kept in an ordered mapping Correct. -- assignee: -> eric.smith resolution: -> not a bug s

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

2020-01-11 Thread Mark Dickinson
Mark Dickinson added the comment: Is the fix as simple as adding the word "floor" before "division" in the "equivalent to division by [...]" phrase? > A right shift by n bits is equivalent to floor division by pow(2, n) without > overflow check. This text was probably written before // was

[issue23139] syntax diagram after EBNF description?

2020-01-11 Thread Batuhan
Batuhan added the comment: I am not sure but I suspect it would look to complex to a reader if all grammar visualized. -- nosy: +BTaskaya ___ Python tracker ___ _

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

2020-01-11 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: +mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue39259] poplib.POP3/POP3_SSL should reject timeout = 0 (non-blocking mode)

2020-01-11 Thread STINNER Victor
STINNER Victor added the comment: New changeset 1b335ae281631a12201fdec29b3c55d97166fc06 by Victor Stinner (Dong-hee Na) in branch 'master': bpo-39259: nntplib.NNTP/NNTP_SSL now reject timeout = 0 (GH-17936) https://github.com/python/cpython/commit/1b335ae281631a12201fdec29b3c55d97166fc06 -

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

2020-01-11 Thread Mark Dickinson
Mark Dickinson added the comment: > Do you mean nextafter(x, y=inf, /): toward positive infinity by default? Yes; I believe that was what Steven was suggesting in the last part of msg359779. I don't have strong feelings either way. -- ___ Python t

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

2020-01-11 Thread Mark Dickinson
Mark Dickinson added the comment: [Steven] > I know Wikipedia isn't a primary source, but it says IEEE 754 recommends > nextafter(x, y). Um. Then it sounds as though Wikipedia is out of date. Which page was this on? IEEE 754-1985 did recommend nextafter, but only in Annex A, which is not s

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

2020-01-11 Thread STINNER Victor
STINNER Victor added the comment: Mark: > Making the second argument optional sounds reasonable to me, but doesn't > necessarily have to happen in the existing PR; we can always add that option > later. Do you mean nextafter(x, y=inf, /): toward positive infinity by default? I prefer to keep

[issue27069] webbrowser creates zombi processes in the background mode

2020-01-11 Thread kernc
Change by kernc : -- nosy: +kernc versions: +Python 3.7, Python 3.8, Python 3.9 ___ Python tracker ___ ___ Python-bugs-list mailing

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

2020-01-11 Thread Mark Dickinson
Mark Dickinson added the comment: "nextafter" is fine with me. I just wanted to make sure that we'd considered the options, and weren't choosing nextafter simply because it's the easiest thing to implement. [Victor] > It mentions for example "If x== y, y (of the type x) shall be returned" an

[issue39299] Improve test coverage for mimetypes module

2020-01-11 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: With the proposed PR the coverage [0] stands at 80% with Windows tests for registry not covered as part of the coverage report. The tests also now use tearDownModule to restore the value of mimetypes.knownfiles which was being accidentally set empt

[issue39304] Don't accept a negative number for the count argument in str.replace(old, new[, count])

2020-01-11 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Thanks for the details. I looked into the tests for this behavior too and agree it's a tested behavior. issue5416 already had similar discussion and the documentation was committed to be later reverted upon Raymond's suggestion. So I will leave it

[issue39304] Don't accept a negative number for the count argument in str.replace(old, new[, count])

2020-01-11 Thread Steven D'Aprano
Steven D'Aprano added the comment: Oops, I meant Lib/test/string_tests.py not "test_string.py". -- ___ Python tracker ___ ___ Pytho

[issue39304] Don't accept a negative number for the count argument in str.replace(old, new[, count])

2020-01-11 Thread Steven D'Aprano
Steven D'Aprano added the comment: Sorry, I disagree that this is a mere implementation detail. The term "implementation detail" normally implies behaviour which occurs *by accident* due to the specific implementation, rather than being intentionally chosen. A good example is early versions

[issue39297] Synchronize importlib.metadata with importlib_metadata 1.4

2020-01-11 Thread Jason R. Coombs
Change by Jason R. Coombs : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ _

[issue39296] Windows register keys

2020-01-11 Thread Steve Dower
Steve Dower added the comment: Have you read PEP 514? Does that help? If not, can you provide specific suggestions in terms of that standard to help us understand what you are suggesting? -- ___ Python tracker

[issue39304] Don't accept a negative number for the count argument in str.replace(old, new[, count])

2020-01-11 Thread Steven D'Aprano
Steven D'Aprano added the comment: This behaviour that goes all the way back to Python 1.5, if not older, before strings even had methods: [steve@ando ~]$ python1.5 Python 1.5.2 (#1, Aug 27 2012, 09:09:18) [GCC 4.1.2 20080704 (Red Hat 4.1.2-52)] on linux2 Copyright 1991-1995

[issue39297] Synchronize importlib.metadata with importlib_metadata 1.4

2020-01-11 Thread Jason R. Coombs
Jason R. Coombs added the comment: New changeset 98b1c0c7ac7c80aac8bce8648fe14b55abeb382a by Jason R. Coombs (Miss Islington (bot)) in branch '3.8': bpo-39297: Update for importlib_metadata 1.4. (GH-17947) (GH-17952) https://github.com/python/cpython/commit/98b1c0c7ac7c80aac8bce8648fe14b55ab

[issue39305] Merge nntplib._NNTPBase and nntplib.NNTP

2020-01-11 Thread Dong-hee Na
New submission from Dong-hee Na : See: https://github.com/python/cpython/pull/17939#pullrequestreview-341290152 There was partial refactoring through PR 17939. I and Victor think that nntplib._NNTPBase can be removed by merging nntplib._NNTPBase and nntplib.NNTP. The only care point would be

[issue39297] Synchronize importlib.metadata with importlib_metadata 1.4

2020-01-11 Thread miss-islington
Change by miss-islington : -- pull_requests: +17361 pull_request: https://github.com/python/cpython/pull/17952 ___ Python tracker ___ __

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

2020-01-11 Thread STINNER Victor
STINNER Victor added the comment: Oh, I forgot to also give the nextafer() link to the POSIX standard: https://pubs.opengroup.org/onlinepubs/009695399/functions/nextafter.html It mentions for example "If x== y, y (of the type x) shall be returned" and "If x or y is NaN, a NaN shall be returne

[issue39297] Synchronize importlib.metadata with importlib_metadata 1.4

2020-01-11 Thread Jason R. Coombs
Jason R. Coombs added the comment: New changeset 136735c1a2efb320e4cbb64b40f1191228745b39 by Jason R. Coombs in branch 'master': bpo-39297: Update for importlib_metadata 1.4. (GH-17947) https://github.com/python/cpython/commit/136735c1a2efb320e4cbb64b40f1191228745b39 -- __

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

2020-01-11 Thread STINNER Victor
STINNER Victor added the comment: PR 17937 is ready to be reviewed. The tests passed on the regular CIs and buildbots: good. > That last assumes you want -0 and +0 to act differently It is the case: I wrote an unit test checking exactly that, and it works as expected on all platforms (Windo

[issue39259] poplib.POP3/POP3_SSL should reject timeout = 0 (non-blocking mode)

2020-01-11 Thread STINNER Victor
STINNER Victor added the comment: New changeset 5d978a2e73e9ad934bcd260ae0a0db5cd0ca27d0 by Victor Stinner (Dong-hee Na) in branch 'master': bpo-39259: nntplib.NNTP/NNTP_SSL refactoring (GH-17939) https://github.com/python/cpython/commit/5d978a2e73e9ad934bcd260ae0a0db5cd0ca27d0 --

[issue39304] Don't accept a negative number for the count argument in str.replace(old, new[, count])

2020-01-11 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: negative value is an implementation detail where count < 0 is similar to replace all [0]. See also issue5416 [0] https://github.com/python/cpython/blob/43682f1e39a3c61f0e8a638b887bcdcbfef766c5/Objects/unicodeobject.c#L10578 -- nosy: +rhett

[issue21498] configparser accepts keys beginning with comment_chars when writing

2020-01-11 Thread Batuhan
Batuhan added the comment: Any update on this? Discussion over Python-Dev looks like finished without a consensus/resolution. -- nosy: +BTaskaya ___ Python tracker ___ __

[issue39298] add BLAKE3 to hashlib

2020-01-11 Thread Larry Hastings
Larry Hastings added the comment: For what it's worth, I spent some time producing clean benchmarks. All these were run on the same laptop, and all pre-load the same file (406668786 bytes) and run one update() on the whole thing to minimize overhead. K12 and BLAKE3 are using a hand-written

[issue39304] Don't accept a negative number for the count argument in str.replace(old, new[, count])

2020-01-11 Thread Aurora
New submission from Aurora : It's meaningless for the count argument to have a negative value, since there's no such thing as negative count for something. -- components: Library (Lib) messages: 359795 nosy: opensource-assist priority: normal severity: normal status: open title: Don't

[issue39298] add BLAKE3 to hashlib

2020-01-11 Thread Christian Heimes
Christian Heimes added the comment: I've been playing with the new algorithm, too. Pretty impressive! Let's give the reference implementation a while to stabilize. The code has comments like: "This is only for benchmarking. The guy who wrote this file hasn't touched C since college. Please d

[issue39292] syslog constants behind rfc

2020-01-11 Thread Ryan
Ryan added the comment: Thank you, this looks good. I'm pinned to 3.6 so while it won't work for me currently, maybe it will in a few years. For clarity and because I can't edit my original message, the RFC is 5424 (I had mistakenly said 5454 but you got it right). -- __

[issue26515] Update extending/embedding docs to new way to build modules in C

2020-01-11 Thread Nick Coghlan
Nick Coghlan added the comment: Changed target version as per Petr's comment (PEP 573 is close to being accepted for 3.9 - it just needs some editing to improve clarity in the PEP itself, rather than needing any changes to the technical proposal) -- versions: +Python 3.9 -Python 3.6,

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

2020-01-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Sorry, wrong issue number. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscr

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

2020-01-11 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +17360 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17828 ___ Python tracker ___

[issue34311] locale.format() and locale.format_string() cast Decimals to float

2020-01-11 Thread Steve Holden
Steve Holden added the comment: Verified. Methododology: 1. Copied test_localise.py from the PR into a master checkout. 2. Added a null locale.localize. 3. Verified that all new tests failed. .. code-block:: Ran 64 tests in 0.023s FAILED (errors=4, skipped=4) (base) blockhead:cpython

[issue39303] Refactor cmd module

2020-01-11 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch pull_requests: +17358 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17951 ___ Python tracker ___ __

[issue39303] Refactor cmd module

2020-01-11 Thread Dan Arad
New submission from Dan Arad : I've stumbled across the `cmd` module, had some difficulties in reading it, and wanted to help in making it more readable. I'm new to contributing to open source, and thought this could be a good exercise for me, and that if I could contribute along the way, the

[issue39302] Language reference does not clearly describe modern operand coercion

2020-01-11 Thread Nick Coghlan
New submission from Nick Coghlan : While reviewing ISO-IECJTC1-SC22-WG23's latest draft of their Python security annex, I found a description of operand coercion that was based on the legacy coercion model described at https://docs.python.org/2.5/ref/coercion-rules.html That's still the secon