[issue40790] Python should enable computed gotos on Mac by default

2020-05-27 Thread laike9m
New submission from laike9m : Issue is described here with more details: https://stackoverflow.com/q/61860463/2142577 Basically, when building on Mac, Python should enable computed gotos by default, because it is supported (https://stackoverflow.com/a/62037189/2142577). The documentation(htt

[issue40789] C-level destructor in PySide2 breaks gen_send_ex, which assumes it's safe to call Py_DECREF with a live exception

2020-05-27 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 27.05.2020 05:56, Nathaniel Smith wrote: > In CPython in general, it could be worked around by not invoking deallocators > with a live exception... I'm actually pretty surprised that this is even > possible! It seems like having a live exception when y

[issue40791] hmac.compare_digest could try harder to be constant-time.

2020-05-27 Thread Devin Jeanpierre
New submission from Devin Jeanpierre : `hmac.compare_digest` (via `_tscmp`) does not mark the accumulator variable `result` as volatile, which means that the compiler is allowed to short-circuit the comparison loop as long as it still reads from both strings. In particular, when `result` is n

[issue40792] Make PyNumber_Index() always returning an exact int instance

2020-05-27 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : Currently PyNumber_Index() can return something that's an instance of a strict subclass of int. For example PyNumber_Index(Py_True) returns Py_True. The same for operator.index(): >>> import operator >>> operator.index(True) True The proposed PR makes i

[issue40792] Make PyNumber_Index() always returning an exact int instance

2020-05-27 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +19699 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20443 ___ Python tracker ___

[issue40787] Mysql + unittest crash

2020-05-27 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Hi Lucas, this is probably not an issue with unittest but a bug in the test themselves. Can you attach an example to reproduce the issue? -- nosy: +remi.lapeyre ___ Python tracker

[issue40741] Upgrade to SQLite v3.32.1 in Windows and macOS builds

2020-05-27 Thread Ned Deily
Ned Deily added the comment: Note: Issue40784 documents a test failure introduced by running with v3.32+. -- ___ Python tracker ___ ___

[issue40784] test_sqlite: CheckFuncDeterministic() fails with SQLite 3.32

2020-05-27 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- nosy: +erlendaasland ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue40791] hmac.compare_digest could try harder to be constant-time.

2020-05-27 Thread Devin Jeanpierre
Change by Devin Jeanpierre : -- keywords: +patch pull_requests: +19700 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20444 ___ Python tracker ___

[issue40217] The garbage collector doesn't take in account that objects of heap allocated types hold a strong reference to their type

2020-05-27 Thread miss-islington
miss-islington added the comment: New changeset 1cf15af9a6f28750f37b08c028ada31d38e818dd by Pablo Galindo in branch 'master': bpo-40217: Ensure Py_VISIT(Py_TYPE(self)) is always called for PyType_FromSpec types (reverts GH-19414) (GH-20264) https://github.com/python/cpython/commit/1cf15af9a

[issue27657] urlparse fails if the path is numeric

2020-05-27 Thread Ned Deily
Change by Ned Deily : -- stage: patch review -> needs patch versions: +Python 3.10, Python 3.9 -Python 2.7, Python 3.7, Python 3.8 ___ Python tracker ___ __

[issue40762] Writing bytes using CSV module results in b prefixed strings

2020-05-27 Thread Eric V. Smith
Eric V. Smith added the comment: > Short of outright banning the use of bytes (raise a TypeError), I think > the current behaviour is least-worst. I agree. I'd like to see the TypeError raised for everything that's not a string or number (since the docs say that's what's accepted), but at th

[issue40763] zipfile.extractall is safe by now

2020-05-27 Thread Ama Aje My Fren
Ama Aje My Fren added the comment: On Tue, May 26, 2020 at 2:47 PM Va wrote: > > What hasn't been handled then? > The rules for naming files in Windows is long (https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file). It is e.g. possible to create files under WSL within Windows t

[issue40586] Pydoc should support https for hyperlinks.

2020-05-27 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch nosy: +python-dev nosy_count: 4.0 -> 5.0 pull_requests: +19701 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19976 ___ Python tracker _

[issue40586] Pydoc should support https for hyperlinks.

2020-05-27 Thread Cheryl Sabella
Change by Cheryl Sabella : -- resolution: -> duplicate stage: patch review -> resolved status: open -> closed superseder: -> Add parsing of https links to pydoc ___ Python tracker __

[issue40762] Writing bytes using CSV module results in b prefixed strings

2020-05-27 Thread Skip Montanaro
Skip Montanaro added the comment: This likely worked in the past because bytes == str in Python 2.x. This is just a corner case people porting from 2 to 3 need to address in their code. Papering over it so people using Pandas don't have to do the right thing is no reason to make changes. Byt

[issue40784] test_sqlite: CheckFuncDeterministic() fails with SQLite 3.32

2020-05-27 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Hi, folks. I took the liberty to create a PR for this; hope you don't mind. I've used partial indices to test deterministic behaviour. https://www.sqlite.org/partialindex.html -- ___ Python tracker

[issue40784] test_sqlite: CheckFuncDeterministic() fails with SQLite 3.32

2020-05-27 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- keywords: +patch pull_requests: +19702 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20448 ___ Python tracker _

[issue39580] Check for COMMAND_LINE_INSTALL variable in Python_Documentation.pkg

2020-05-27 Thread Ned Deily
Ned Deily added the comment: Thanks for the PR! It looks reasonable but I do want to test it first on older macOS versions that we support before merging it. I'll do that before the next releases. -- versions: +Python 3.10, Python 3.7, Python 3.9

[issue37999] No longer use implicit convertion to int with loss

2020-05-27 Thread Mark Dickinson
Mark Dickinson added the comment: There are some comments in the Objects/longobject.c code that still refer to __int__, and could use an update. For example: https://github.com/python/cpython/blob/7da46b676aed7111de34b57c8b942a7f3bb80327/Objects/longobject.c#L366 -- nosy: +mark.dick

[issue40792] Make PyNumber_Index() always returning an exact int instance

2020-05-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This change conflicts with the test added in issue26202. We perhaps should revert issue26202. This can also affect the user code which depends on range() attributes start, stop and step being instances of the int subclass. -- _

[issue37999] No longer use implicit convertion to int with loss

2020-05-27 Thread Mark Dickinson
Change by Mark Dickinson : -- pull_requests: +19703 pull_request: https://github.com/python/cpython/pull/20449 ___ Python tracker ___ __

[issue30462] urllib does not support NO_PROXY environment variable containing domain with asterisk

2020-05-27 Thread Cheryl Sabella
Cheryl Sabella added the comment: The original pull request has been closed for inactivity, so this is now available for anyone to work on. Please credit the original author if anyone change is based on the original PR. Thanks! -- nosy: +cheryl.sabella versions: +Python 3.10 -Pytho

[issue40793] print() performance problem with very large numbers

2020-05-27 Thread U.W.
New submission from U.W. : Printing very large numbers takes forever. Example: print((2**24)**(3840*2160)) That number has about 60 Million digits and my machine is busy now for more than an hour and still not finished. The calculation of the number is no problem, btw. and finishes in under

[issue40762] Writing bytes using CSV module results in b prefixed strings

2020-05-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Since Pandas opens an output file it has control on what encoding is used. It is a Pandas' responsibility to decode bytes, or raise an exception, or just ignore the problem if it is pretty uncommon case. Pandas already have a complex code for formatting ou

[issue40762] Writing bytes using CSV module results in b prefixed strings

2020-05-27 Thread Skip Montanaro
Skip Montanaro added the comment: I would also that tweaking Python to make this work with no change in Pandas would be a case of the tail wagging the dog. A big tail, but a tail nonetheless. -- ___ Python tracker

[issue40793] print() performance problem with very large numbers

2020-05-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is not a print() problem, it is a problem with converting an integer to decimal string representation. AFAIK it has quadratic complexity from the size of the integer. -- nosy: +mark.dickinson, serhiy.storchaka __

[issue40793] print() performance problem with very large numbers

2020-05-27 Thread Mark Dickinson
Mark Dickinson added the comment: Right; the naive algorithm for converting the internal binary representation to the decimal representation is quadratic time. In *theory* we could implement a subquadratic time algorithm, but the complexity of such an implementation outweighs the benefits. P

[issue40792] Make PyNumber_Index() always returning an exact int instance

2020-05-27 Thread Mark Dickinson
Mark Dickinson added the comment: The behaviour change for range sounds reasonable to me. Just to make sure I understand the impact of the change: - For Python < 3.10, we sometimes convert the range inputs to Python ints, and sometimes don't. For example, a start value of `np.int64(5)` would

[issue37999] No longer use implicit convertion to int with loss

2020-05-27 Thread Mark Dickinson
Mark Dickinson added the comment: New changeset 20941de0ddc39ce9f07e29b4cc770e8a9ef14d41 by Mark Dickinson in branch 'master': bpo-37999: Fix outdated __int__ and nb_int references in comments (GH-20449) https://github.com/python/cpython/commit/20941de0ddc39ce9f07e29b4cc770e8a9ef14d41 -

[issue40794] dataclass signatures and docstrings w/future-annotations

2020-05-27 Thread Batuhan Taskaya
New submission from Batuhan Taskaya : While I was working on making 'future annotations' default, I noticed that dataclasses acts differently under the annotation feature. One example would be the file [signature.py]: [ without future import] $ python t.py X(a: int, b: int) [ with future imp

[issue39573] [C API] Make PyObject an opaque structure in the limited C API

2020-05-27 Thread STINNER Victor
STINNER Victor added the comment: New changeset fe2978b3b940fe2478335e3a2ca5ad22338cdf9c by Victor Stinner in branch 'master': bpo-39573: Convert Py_REFCNT and Py_SIZE to functions (GH-20429) https://github.com/python/cpython/commit/fe2978b3b940fe2478335e3a2ca5ad22338cdf9c -- _

[issue40741] Upgrade to SQLite v3.32.1 in Windows and macOS builds

2020-05-27 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- nosy: +vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue40741] Upgrade to SQLite v3.32.1 in Windows and macOS builds

2020-05-27 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Ready with PR as soon as GH-20448 is merged and cpython-source-deps (https://github.com/python/cpython-source-deps/pull/19) is merged and tagged. -- ___ Python tracker

[issue40794] dataclass signatures and docstrings w/future-annotations

2020-05-27 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +gvanrossum, lukasz.langa, vstinner, yselivanov ___ Python tracker ___ ___ Python-bugs-list mail

[issue39073] email incorrect handling of crlf in Address objects.

2020-05-27 Thread miss-islington
miss-islington added the comment: New changeset 75635c6095bcfbb9fccc239115d3d03ae20a307f by Miss Islington (bot) in branch '3.8': bpo-39073: validate Address parts to disallow CRLF (GH-19007) https://github.com/python/cpython/commit/75635c6095bcfbb9fccc239115d3d03ae20a307f -- _

[issue39073] email incorrect handling of crlf in Address objects.

2020-05-27 Thread miss-islington
miss-islington added the comment: New changeset a93bf82980d7c02217a088bafa193f32a4d13abb by Miss Islington (bot) in branch '3.7': bpo-39073: validate Address parts to disallow CRLF (GH-19007) https://github.com/python/cpython/commit/a93bf82980d7c02217a088bafa193f32a4d13abb -- _

[issue40794] dataclass signatures and docstrings w/future-annotations

2020-05-27 Thread Guido van Rossum
Guido van Rossum added the comment: It,sounds like you are trying to get the effect of putting 'from __future__ import dataclasses' at the top of dataclasses'.py, right? Are you saying that without this, the output of the test script is correct? -- __

[issue40780] float.__format__() handles trailing zeros inconsistently in “general” format

2020-05-27 Thread Mark Dickinson
Change by Mark Dickinson : -- versions: -Python 3.7, Python 3.8 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue40794] dataclass signatures and docstrings w/future-annotations

2020-05-27 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: > It,sounds like you are trying to get the effect of putting 'from __future__ > import dataclasses' at the top of dataclasses'.py, right? Yes, since compile will automatically inherit the flags of the current frame to the compiled code I'm basically inserti

[issue39073] [security] email module incorrect handling of CR and LF newline characters in Address objects.

2020-05-27 Thread STINNER Victor
Change by STINNER Victor : -- title: email incorrect handling of crlf in Address objects. -> [security] email module incorrect handling of CR and LF newline characters in Address objects. ___ Python tracker

[issue39073] email incorrect handling of crlf in Address objects.

2020-05-27 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +vstinner nosy_count: 6.0 -> 7.0 pull_requests: +19704 stage: backport needed -> patch review pull_request: https://github.com/python/cpython/pull/20450 ___ Python tracker

[issue39073] email incorrect handling of crlf in Address objects.

2020-05-27 Thread STINNER Victor
STINNER Victor added the comment: I created PR 20450: backport to 3.5, since it's a security fix. -- versions: +Python 3.10, Python 3.5, Python 3.6, Python 3.7, Python 3.9 ___ Python tracker

[issue39073] email incorrect handling of crlf in Address objects.

2020-05-27 Thread STINNER Victor
STINNER Victor added the comment: FYI I created https://python-security.readthedocs.io/vuln/email-address-header-injection.html to track fixes of this vulnerability. -- ___ Python tracker _

[issue40790] Python should enable computed gotos on Mac by default

2020-05-27 Thread Benjamin Peterson
Benjamin Peterson added the comment: The configure script sets the result of compiler probing with HAVE_COMPUTED_GOTOS not USE_COMPUTED_GOTOS. -- nosy: +benjamin.peterson resolution: -> works for me stage: -> resolved status: open -> closed ___ P

[issue40794] dataclass signatures and docstrings w/future-annotations

2020-05-27 Thread Guido van Rossum
Guido van Rossum added the comment: Have you come up with a fix yet? (Preferably a fix that can be applied locally to dataclasses.py.) -- ___ Python tracker ___ _

[issue40794] dataclass signatures and docstrings w/future-annotations

2020-05-27 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: > Have you come up with a fix yet? (Preferably a fix that can be applied > locally to dataclasses.py.) I'm working on it, but no luck so far. -- ___ Python tracker __

[issue40794] dataclass signatures and docstrings w/future-annotations

2020-05-27 Thread Eric V. Smith
Eric V. Smith added the comment: Hmm. That's a regression, at least from 3.7, which is the only version I have ready access to: $ python3 Python 3.7.3 (default, Mar 27 2019, 13:36:35) [GCC 9.0.1 20190227 (Red Hat 9.0.1-0.8)] on linux Type "help", "copyright", "credits" or "license" for more

[issue40794] dataclass signatures and docstrings w/future-annotations

2020-05-27 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: > Hmm. That's a regression, at least from 3.7, which is the only version I have > ready access to: That is the same behavior with the current master, the problem I am having is related to using annotations feature on dataclasses itself rather than the prog

[issue14527] How to link with a non-system libffi?

2020-05-27 Thread Rupert Nash
Change by Rupert Nash : -- keywords: +patch nosy: +rnash nosy_count: 3.0 -> 4.0 pull_requests: +19705 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/20451 ___ Python tracker

[issue14527] How to link with a non-system libffi?

2020-05-27 Thread Rupert Nash
Rupert Nash added the comment: I have just struggled with building CPython with the _ctypes module. Fundamentally, the problem appears to be that configure uses pkgconfig to find the libffi include directory, while setup.py's detect_ctypes only uses the global list of library directories. I

[issue40795] ctypes: PyErr_WriteUnraisable() called with no exception set on converting callback result failure

2020-05-27 Thread STINNER Victor
New submission from STINNER Victor : Example: --- from ctypes import c_int, CFUNCTYPE def func(): return (1, 2, 3) cb = CFUNCTYPE(c_int)(func) cb() --- Output: --- Traceback (most recent call last): File "_ctypes/callbacks.c", line 262, in 'converting callback result' TypeError: an inte

[issue40794] dataclass signatures and docstrings w/future-annotations

2020-05-27 Thread Guido van Rossum
Guido van Rossum added the comment: To clarify, for Eric: what Batuhan did is effectively adding `from __future__ import annotations` to the top of dataclasses.py. I believe the root cause is that dataclasses creates functions by synthesizing `def` statements (in _create_fn()) and the annota

[issue40795] ctypes: PyErr_WriteUnraisable() called with no exception set on converting callback result failure

2020-05-27 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +19707 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20452 ___ Python tracker ___ _

[issue14562] urllib2 maybe blocks too long with small chunks

2020-05-27 Thread Zackery Spytz
Zackery Spytz added the comment: Python 2 is EOL, so I think this issue should be closed. -- nosy: +ZackerySpytz ___ Python tracker ___ ___

[issue40794] dataclass signatures and docstrings w/future-annotations

2020-05-27 Thread Eric V. Smith
Eric V. Smith added the comment: I see. Not sure how I overlooked that. Thanks. At first blush, I think your approach would work. -- ___ Python tracker ___ __

[issue13097] [easy C issue] ctypes: segfault with large number of callback arguments

2020-05-27 Thread STINNER Victor
STINNER Victor added the comment: New changeset 29a1384c040d39659e7d01f1fd7b6eb71ef2634e by Sean Gillespie in branch 'master': bpo-13097: ctypes: limit callback to 1024 arguments (GH-19914) https://github.com/python/cpython/commit/29a1384c040d39659e7d01f1fd7b6eb71ef2634e -- ___

[issue13097] [easy C issue] ctypes: segfault with large number of callback arguments

2020-05-27 Thread miss-islington
Change by miss-islington : -- pull_requests: +19710 pull_request: https://github.com/python/cpython/pull/20455 ___ Python tracker ___ __

[issue13097] [easy C issue] ctypes: segfault with large number of callback arguments

2020-05-27 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 6.0 -> 7.0 pull_requests: +19708 pull_request: https://github.com/python/cpython/pull/20453 ___ Python tracker _

[issue13097] [easy C issue] ctypes: segfault with large number of callback arguments

2020-05-27 Thread miss-islington
Change by miss-islington : -- pull_requests: +19709 pull_request: https://github.com/python/cpython/pull/20454 ___ Python tracker ___ __

[issue40791] hmac.compare_digest could try harder to be constant-time.

2020-05-27 Thread Zachary Ware
Change by Zachary Ware : -- nosy: +christian.heimes, gregory.p.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubs

[issue40791] hmac.compare_digest could try harder to be constant-time.

2020-05-27 Thread Raymond Hettinger
Raymond Hettinger added the comment: +1 for both of these suggestions -- nosy: +rhettinger type: -> security versions: -Python 3.5, Python 3.6 ___ Python tracker ___ ___

[issue40794] dataclass signatures and docstrings w/future-annotations

2020-05-27 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: I have applied Guido's suggestion and it looks like it is working. -- ___ Python tracker ___ ___

[issue40794] dataclass signatures and docstrings w/future-annotations

2020-05-27 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: (I applied it to my own branch, don't know if a seperate PR needed) -- ___ Python tracker ___ __

[issue40794] dataclass signatures and docstrings w/future-annotations

2020-05-27 Thread Guido van Rossum
Guido van Rossum added the comment: You can do this as part of your mega-PR to turn on `from __future__ import annotations` by default. -- ___ Python tracker ___

[issue2897] Deprecate structmember.h

2020-05-27 Thread Matthias Braun
Matthias Braun added the comment: This wasn't mentioned before: Having PyMemberDef part of the structmember.h is a big problem for users of PEP384/limited API, because structmember.h is not part of it. Which results in the odd situation that `Py_tp_members` or `PyDescr_NewMember()` are part

[issue2897] Deprecate structmember.h

2020-05-27 Thread Matthias Braun
Change by Matthias Braun : -- components: +C API versions: +Python 3.10 -Python 3.8 ___ Python tracker ___ ___ Python-bugs-list maili

[issue13097] [easy C issue] ctypes: segfault with large number of callback arguments

2020-05-27 Thread miss-islington
miss-islington added the comment: New changeset 788d7bfe189e715eab3855c20ea5d6da0d8bed70 by Miss Islington (bot) in branch '3.9': bpo-13097: ctypes: limit callback to 1024 arguments (GH-19914) https://github.com/python/cpython/commit/788d7bfe189e715eab3855c20ea5d6da0d8bed70 --

[issue2897] Deprecate structmember.h

2020-05-27 Thread STINNER Victor
STINNER Victor added the comment: > The proposed patch here, would fix this! The issue title is misleading, it says "Deprecate structmember.h". Is the plan still to deprecate it? Or to make it usable in the limited C API? Please update the title. --

[issue40794] dataclass signatures and docstrings w/future-annotations

2020-05-27 Thread STINNER Victor
Change by STINNER Victor : -- nosy: -vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue13097] [easy C issue] ctypes: segfault with large number of callback arguments

2020-05-27 Thread miss-islington
miss-islington added the comment: New changeset 1c4dcafd0b025e771f4dbd7197d0b5f263c9cb54 by Miss Islington (bot) in branch '3.7': bpo-13097: ctypes: limit callback to 1024 arguments (GH-19914) https://github.com/python/cpython/commit/1c4dcafd0b025e771f4dbd7197d0b5f263c9cb54 --

[issue13097] [easy C issue] ctypes: segfault with large number of callback arguments

2020-05-27 Thread miss-islington
miss-islington added the comment: New changeset a285af7e626d1b81cf09f8b2bf7656f100bc1237 by Miss Islington (bot) in branch '3.8': bpo-13097: ctypes: limit callback to 1024 arguments (GH-19914) https://github.com/python/cpython/commit/a285af7e626d1b81cf09f8b2bf7656f100bc1237 --

[issue2897] Deprecate structmember.h

2020-05-27 Thread Matthias Braun
Matthias Braun added the comment: > The issue title is misleading, it says "Deprecate structmember.h". Is the > plan still to deprecate it? Or to make it usable in the limited C API? Please > update the title. As far as I understand it: The attached diff, moves the interesting declaration t

[issue13097] [easy C issue] ctypes: segfault with large number of callback arguments

2020-05-27 Thread STINNER Victor
STINNER Victor added the comment: Thanks Meador Inge for the bug report and thanks Sean Gillespie for the fix! It just took 9 years to fix this corner case ;-) Copy of the comment on the PR: https://github.com/python/cpython/pull/19914#pullrequestreview-419331432 I tried to rewrite _ctypes_c

[issue2897] Deprecate structmember.h

2020-05-27 Thread STINNER Victor
STINNER Victor added the comment: Also, the bare minimum enhancement would be add rename READONLY to PY_READONLY, but keep a deprecated alias READONLY to PY_READONLY, and update CPython code base to use PY_READONLY. (Same for other similar flags.) --

[issue2897] PyMemberDef missing in limited API / Deprecate structmember.h

2020-05-27 Thread Matthias Braun
Change by Matthias Braun : -- title: Deprecate structmember.h -> PyMemberDef missing in limited API / Deprecate structmember.h ___ Python tracker ___ __

[issue2897] PyMemberDef missing in limited API / Deprecate structmember.h

2020-05-27 Thread Matthias Braun
Matthias Braun added the comment: Happy to take the proposed diff here (assuming @belopolsky wont mind) and include it into a pull request that also renames the uses of the READONLY flags (and maybe removes the RESTRICTED flags) within cpython source itself. -- _

[issue40791] hmac.compare_digest could try harder to be constant-time.

2020-05-27 Thread Gregory P. Smith
Gregory P. Smith added the comment: Christian - Devin could likely use some help with the build/ifdef plumbing required for (2) to use CRYPTO_memcmp from Modules/_operator.c when OpenSSL is available. -- assignee: -> christian.heimes ___ Python t

[issue2897] Deprecate structmember.h

2020-05-27 Thread STINNER Victor
STINNER Victor added the comment: > Note that structmember.h pollutes global namespace with macros that do not > have conventional Py_ or PY_ prefix. READONLY and RESTRICTED macros seem to > be most likely to conflict with other code. One small enhance would be to add such prefix when Py_LI

[issue40791] hmac.compare_digest could try harder to be constant-time.

2020-05-27 Thread Christian Heimes
Change by Christian Heimes : -- pull_requests: +19711 pull_request: https://github.com/python/cpython/pull/20456 ___ Python tracker ___

[issue40791] hmac.compare_digest could try harder to be constant-time.

2020-05-27 Thread Christian Heimes
Christian Heimes added the comment: GPS, I got you covered :) CRYPTO_memcmp() was on my TODO list for a while. Thanks for nagging me. _operator is a built-in module. I don't want to add libcrypto dependency to libpython. I copied the code, made some adjustments and added it to _hashopenssl.

[issue40275] test.support has way too many imports

2020-05-27 Thread hai shi
Change by hai shi : -- pull_requests: +19712 pull_request: https://github.com/python/cpython/pull/20459 ___ Python tracker ___ ___ P

[issue40701] tempfile mixes str and bytes in an inconsistent manner

2020-05-27 Thread Gregory P. Smith
Gregory P. Smith added the comment: We consider it closer to new feature as it changes existing behavior in a way that people cannot _depend_ on being present in older Python releases as it'd only appear in a bugfix release, so most people could never write code depending on it while claimin

[issue40667] [Windows] Add global python and python3 commands

2020-05-27 Thread Steve Dower
Steve Dower added the comment: After thinking this through some more, I don't think this solves the problem, but only changes it. And we're better off leaving things as they are than just moving them around. -- resolution: -> rejected stage: patch review -> resolved status: open ->

[issue40796] dataclasses.make_dataclass: Exception when called with different field orders

2020-05-27 Thread Darrick Yee
New submission from Darrick Yee : https://docs.python.org/3/library/dataclasses.html#module-dataclasses `make_dataclass` takes a `field` parameter, which is an iterable whose entries may be tuples of `(name, type)` or `(name, type, dataclasses.Field)`. However, an exception is thrown if such

[issue40796] dataclasses.make_dataclass: Exception when called with different field orders

2020-05-27 Thread Eric V. Smith
Eric V. Smith added the comment: Isn't this error that you're providing a field without a default value after one with a default value? What's the exception look like? -- nosy: +eric.smith ___ Python tracker _

[issue40796] dataclasses.make_dataclass: Exception when called with different field orders

2020-05-27 Thread Darrick Yee
Change by Darrick Yee : -- stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

[issue40796] dataclasses.make_dataclass: Exception when called with different field orders

2020-05-27 Thread Darrick Yee
Darrick Yee added the comment: TypeError: non-default argument 'field1' follows default argument You are right. For some reason I believed it would automatically gather the required fields first when creating the new class' signature. -- ___ Pyth

[issue40796] dataclasses.make_dataclass: Exception when called with different field orders

2020-05-27 Thread Eric V. Smith
Eric V. Smith added the comment: No problem! It can't reorder fields, because you might not be passing them by name. There's some discussion about requiring keyword-only parameters, in which case what you're doing would work (as long as they were keyword-only params). -- resolution:

[issue40796] dataclasses.make_dataclass: Exception when called with different field orders

2020-05-27 Thread Darrick Yee
Darrick Yee added the comment: Yes, that makes sense. Thank you! On Wed, May 27, 2020, 1:40 PM Eric V. Smith wrote: > > Eric V. Smith added the comment: > > No problem! > > It can't reorder fields, because you might not be passing them by name. > There's some discussion about requiring keyw

[issue40787] Mysql + unittest crash

2020-05-27 Thread Lucas
Lucas added the comment: While trying to simplify my program for you, I found that the problem was caused by a very specific interaction of one of the functions that was being tested with the restore command, which did not happen when I tried to rule this problem out in other ways. Anyways,

[issue37028] Implement asyncio repl

2020-05-27 Thread Éric Araujo
Éric Araujo added the comment: Compared to the vanilla REPL, this doesn’t include readline setup for tab completion and history file. Was it on purpose? -- nosy: +eric.araujo ___ Python tracker

[issue40787] Mysql + unittest crash

2020-05-27 Thread Lucas
Lucas added the comment: The problem was that I didn't close the 1st connection to the database and then made another request, which had to wait for the 1st to close, to be exact. -- ___ Python tracker

[issue27657] urlparse fails if the path is numeric

2020-05-27 Thread Michał Górny
Michał Górny added the comment: I'm sorry but does this change mean that it's not final or...? My main concern is whether we should be adjusting our packages to the new behavior in py3.9, or wait for further changes. -- ___ Python tracker

[issue40791] hmac.compare_digest could try harder to be constant-time.

2020-05-27 Thread Christian Heimes
Christian Heimes added the comment: Greg, is GH-20456 a bug fix / security enhancement or a new feature? I'm hesitant to backport it to 3.7 and 3.8. 3.9 might be ok. -- ___ Python tracker __

[issue40791] hmac.compare_digest could try harder to be constant-time.

2020-05-27 Thread Gregory P. Smith
Gregory P. Smith added the comment: I'd feel fine doing that for 3.9 given 3.9.0 is only in beta and this changes no public APIs. For 3.8 and 3.7 i wouldn't. Be sure to update the versionchanged in the docs if you choose to do it for 3.9. -- ___

[issue30064] BaseSelectorEventLoop.sock_{recv, sendall}() don't remove their callbacks when canceled

2020-05-27 Thread Yury Selivanov
Yury Selivanov added the comment: New changeset 210a137396979d747c2602eeef46c34fc4955448 by Fantix King in branch 'master': bpo-30064: Fix asyncio loop.sock_* race condition issue (#20369) https://github.com/python/cpython/commit/210a137396979d747c2602eeef46c34fc4955448 --

[issue30064] BaseSelectorEventLoop.sock_{recv, sendall}() don't remove their callbacks when canceled

2020-05-27 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 8.0 -> 9.0 pull_requests: +19713 pull_request: https://github.com/python/cpython/pull/20460 ___ Python tracker _

[issue40791] hmac.compare_digest could try harder to be constant-time.

2020-05-27 Thread Christian Heimes
Christian Heimes added the comment: New changeset db5aed931f8a617f7b63e773f62db468fe9c5ca1 by Christian Heimes in branch 'master': bpo-40791: Use CRYPTO_memcmp() for compare_digest (#20456) https://github.com/python/cpython/commit/db5aed931f8a617f7b63e773f62db468fe9c5ca1 -- ___

[issue40025] enum: _generate_next_value_ is not called if its definition occurs after calls to auto()

2020-05-27 Thread Ethan Furman
Ethan Furman added the comment: New changeset b5ecbf02e4dbdea6d1c9a6d7189137f76e70c073 by Miss Islington (bot) in branch '3.8': bpo-40025: Require _generate_next_value_ to be defined before members(GH-19763) https://github.com/python/cpython/commit/b5ecbf02e4dbdea6d1c9a6d7189137f76e70c073 -

  1   2   >