[issue37674] Is imp module deprecated or pending deprecation?

2020-05-27 Thread Zackery Spytz
Change by Zackery Spytz : -- keywords: +patch nosy: +ZackerySpytz nosy_count: 5.0 -> 6.0 pull_requests: +19729 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20480 ___ Python tracker

[issue40800] asyncio.sleep(0) should "yield" back to the event loop, but it doesn't behave as expected

2020-05-27 Thread Davy Durham
New submission from Davy Durham : I was searching for a way to "yield" from task/coroutinue back to the event loop (not yielding a value in terms of a generator) and not finding anything documented, I found this bug report and PR: https://github.com/python/asyncio/issues/284 It states tha

[issue40275] test.support has way too many imports

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

[issue37824] IDLE: Handle Shell input warnings properly.

2020-05-27 Thread Terry J. Reedy
Change by Terry J. Reedy : -- versions: +Python 3.10 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[issue37824] IDLE: Handle Shell input warnings properly.

2020-05-27 Thread Terry J. Reedy
Terry J. Reedy added the comment: codeop._maybe_compile wraps each compile in try ... except SyntaxError. It can later reraise just once. I think it a bug that it is not similarly careful about SyntaxWarning and DeprecationWarning to only emit a particular warning just once. Cheryl, would

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

2020-05-27 Thread laike9m
laike9m added the comment: Hi Benjamin, do you mean that disabling computed gotos on Mac is the expected behavior? -- ___ Python tracker ___ _

[issue14562] urllib2 maybe blocks too long with small chunks

2020-05-27 Thread Benjamin Peterson
Change by Benjamin Peterson : -- resolution: -> out of date stage: needs patch -> resolved status: open -> closed ___ Python tracker ___ __

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

2020-05-27 Thread Kyle Stanley
Kyle Stanley added the comment: > The new test_sock_client_racing() test seems to have... a race condition... I'm also a bit skeptical about relying on `time.sleep(0.01)` at the end of the loop in `_basetest_sock_recv_racing()`, but I don't have an idea for a better approach at the moment.

[issue40799] Create Lib/_pydecimal.py file to optimize "import datetime" when _decimal is available

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

[issue30665] pass big values for arg to fcntl.ioctl

2020-05-27 Thread Ned Deily
Change by Ned Deily : -- versions: +Python 3.10, Python 3.9 -Python 2.7, Python 3.5, Python 3.6, Python 3.7 ___ Python tracker ___

[issue39939] PEP 616: Add str.removeprefix and str.removesuffix methods

2020-05-27 Thread STINNER Victor
STINNER Victor added the comment: New changeset de6b6841098e1a5967cb7a50b665ca7473d0ddad by Miss Islington (bot) in branch '3.9': bpo-39939: Fix removeprefix issue number in the What's New in Python 3.9 (GH-20473) (GH-20474) https://github.com/python/cpython/commit/de6b6841098e1a5967cb7a50b6

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

2020-05-27 Thread Fantix King
Fantix King added the comment: Not a simple one - FreeBSD is returning ECONNREFUSED immediately when trying to connect to a non-listening port on the loopback address: https://lists.freebsd.org/pipermail/freebsd-current/2005-May/049876.html Then all following connect attempts on the same soc

[issue39939] PEP 616: Add str.removeprefix and str.removesuffix methods

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

[issue39939] PEP 616: Add str.removeprefix and str.removesuffix methods

2020-05-27 Thread STINNER Victor
STINNER Victor added the comment: New changeset 56853d8ec6ed89bf5a9b81c3781a4df46ac391d3 by Elazar Gershuni in branch 'master': bpo-39939: Fix removeprefix issue number in the What's New in Python 3.9 (GH-20473) https://github.com/python/cpython/commit/56853d8ec6ed89bf5a9b81c3781a4df46ac391

[issue39939] PEP 616: Add str.removeprefix and str.removesuffix methods

2020-05-27 Thread Elazar Gershuni
Change by Elazar Gershuni : -- nosy: +elazar nosy_count: 8.0 -> 9.0 pull_requests: +19726 pull_request: https://github.com/python/cpython/pull/20473 ___ Python tracker ___

[issue37028] Implement asyncio repl

2020-05-27 Thread STINNER Victor
STINNER Victor added the comment: This issue is now closed. If someone wants to enhane the asyncio REPL, please open a new issue. -- resolution: -> fixed ___ Python tracker

[issue37129] Add os.RWF_APPEND flag for os.pwritev

2020-05-27 Thread STINNER Victor
STINNER Victor added the comment: Thanks YoSTEALTH. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue23897] Update Python 3 extension module porting guide

2020-05-27 Thread Sumana Harihareswara
Sumana Harihareswara added the comment: Following the large rewrite in https://github.com/python/cpython/pull/9317 to point to other guides (including py3c) instead of providing a guide, should we a) add a pointer to Barry's notes as well b) migrate this bug to request enhancements to py3c do

[issue40275] test.support has way too many imports

2020-05-27 Thread STINNER Victor
STINNER Victor added the comment: See also bpo-40799: Create Lib/_pydecimal.py file to optimize "import datetime" when _decimal is available. -- ___ Python tracker ___ __

[issue40799] Create Lib/_pydecimal.py file to optimize "import datetime" when _decimal is available

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

[issue40799] Create Lib/_pydecimal.py file to optimize "import datetime" when _decimal is available

2020-05-27 Thread Ezio Melotti
Change by Ezio Melotti : -- nosy: +ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue40799] Create Lib/_pydecimal.py file to optimize "import datetime" when _decimal is available

2020-05-27 Thread STINNER Victor
New submission from STINNER Victor : Currently, "import datetime" starts by importing time, math, sys and operator modules, and then execute 2500 lines of Python code, define 7 classes, etc. For what? Just to remove all classes, functions, etc. to replace them with symbols from _decimal modul

[issue40275] test.support has way too many imports

2020-05-27 Thread STINNER Victor
STINNER Victor added the comment: New changeset aa890630bc877c73ec806c9982d8b7b2e7019723 by Victor Stinner in branch 'master': bpo-40275: test.support imports subprocess lazily (GH-20471) https://github.com/python/cpython/commit/aa890630bc877c73ec806c9982d8b7b2e7019723 -- _

[issue40275] test.support has way too many imports

2020-05-27 Thread STINNER Victor
STINNER Victor added the comment: Attached count_imports.py script counts how many modules are imported by "import test.support". With PR 20471, we are down to 74 modules. It's way better than 171 (when I created this issue)! -- Added file: https://bugs.python.org/file49197/count_im

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

2020-05-27 Thread Ned Deily
Ned Deily added the comment: New changeset 7df32f844efed33ca781a016017eab7050263b90 by Miss Islington (bot) in branch '3.6': bpo-39073: validate Address parts to disallow CRLF (GH-19007) (#19224) https://github.com/python/cpython/commit/7df32f844efed33ca781a016017eab7050263b90 -- no

[issue40275] test.support has way too many imports

2020-05-27 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +19723 pull_request: https://github.com/python/cpython/pull/20471 ___ Python tracker ___ __

[issue40797] multiprocessing.Semaphore has undocumented get_value() method

2020-05-27 Thread Ned Deily
Change by Ned Deily : -- nosy: +davin, pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[issue40798] The deprecated-removed Sphinx extension need to change the error message based on the Python version

2020-05-27 Thread Ned Deily
Change by Ned Deily : -- nosy: +mdk ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/m

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

2020-05-27 Thread STINNER Victor
Change by STINNER Victor : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8 ___ Python tracker ___

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

2020-05-27 Thread miss-islington
miss-islington added the comment: New changeset 9e3c583954f75a6396d1935e000df85d89b78a3d by Miss Islington (bot) in branch '3.9': bpo-40795: ctypes calls unraisablehook with an exception (GH-20452) https://github.com/python/cpython/commit/9e3c583954f75a6396d1935e000df85d89b78a3d --

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

2020-05-27 Thread miss-islington
miss-islington added the comment: New changeset 45ce0dbc4f8c68fe22ae97860faa8f2ec7faf27b by Miss Islington (bot) in branch '3.8': bpo-40795: ctypes calls unraisablehook with an exception (GH-20452) https://github.com/python/cpython/commit/45ce0dbc4f8c68fe22ae97860faa8f2ec7faf27b --

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

2020-05-27 Thread Fantix King
Fantix King added the comment: Ouch ... looks like FreeBSD also needs a few more retries than a single retry. I'll test on a FreeBSD and create a PR for that. -- ___ Python tracker _

[issue40275] test.support has way too many imports

2020-05-27 Thread STINNER Victor
STINNER Victor added the comment: New changeset b0461e19b5ecb2d89917b23efb5ce1048fab1b22 by Victor Stinner in branch 'master': bpo-40275: test.support.check_impl_detail() uses sys.implementation (GH-20468) https://github.com/python/cpython/commit/b0461e19b5ecb2d89917b23efb5ce1048fab1b22 ---

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

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

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

2020-05-27 Thread STINNER Victor
STINNER Victor added the comment: New changeset 10228bad0452d94e66c964b625a0b61befa08e59 by Victor Stinner in branch 'master': bpo-40795: ctypes calls unraisablehook with an exception (GH-20452) https://github.com/python/cpython/commit/10228bad0452d94e66c964b625a0b61befa08e59 -- __

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

2020-05-27 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 1.0 -> 2.0 pull_requests: +19721 pull_request: https://github.com/python/cpython/pull/20469 ___ Python tracker _

[issue27779] Sync-up docstrings in C version of the the decimal module

2020-05-27 Thread Furkan Onder
Furkan Onder added the comment: Patches are prepared but not continued. It can be merge by small additions to the patches. -- nosy: +furkanonder ___ Python tracker ___

[issue40275] test.support has way too many imports

2020-05-27 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +19720 pull_request: https://github.com/python/cpython/pull/20468 ___ Python tracker ___ __

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

2020-05-27 Thread STINNER Victor
STINNER Victor added the comment: The new test_sock_client_racing() test seems to have... a race condition... AMD64 FreeBSD Non-Debug 3.9: https://buildbot.python.org/all/#/builders/750/builds/11 ERROR: test_sock_client_racing (test.test_asyncio.test_sock_lowlevel.KqueueEventLoopTests) ERROR

[issue40275] test.support has way too many imports

2020-05-27 Thread STINNER Victor
STINNER Victor added the comment: New changeset e80697d687b610bd7fb9104af905dec8f0bc55a7 by Hai Shi in branch 'master': bpo-40275: Adding threading_helper submodule in test.support (GH-20263) https://github.com/python/cpython/commit/e80697d687b610bd7fb9104af905dec8f0bc55a7 -- _

[issue40798] The deprecated-removed Sphinx extension need to change the error message based on the Python version

2020-05-27 Thread Rémi Lapeyre
New submission from Rémi Lapeyre : The new deprecated-removed extension in the documentation always produces text like this: Deprecated since version 3.4, will be removed in version 3.8: MD5 as implicit default digest This message should be used in the documentation of 3.4 to 3.7 and then

[issue32604] [subinterpreters] PEP 554 implementation: add interpreters module

2020-05-27 Thread STINNER Victor
STINNER Victor added the comment: New changeset 7d80b35af1ee03834ae4af83e920dee89c2bc273 by Pablo Galindo in branch 'master': Revert "bpo-32604: PEP 554 for use in test suite (GH-19985)" (#20465) https://github.com/python/cpython/commit/7d80b35af1ee03834ae4af83e920dee89c2bc273 -- _

[issue37129] Add os.RWF_APPEND flag for os.pwritev

2020-05-27 Thread STINNER Victor
STINNER Victor added the comment: New changeset 76ef255bde772005bbd0761399b274c2240e61d3 by YoSTEALTH in branch 'master': bpo-37129: Add os.RWF_APPEND flag for os.pwritev() (GH-20336) https://github.com/python/cpython/commit/76ef255bde772005bbd0761399b274c2240e61d3 -- _

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

2020-05-27 Thread Matthias Braun
Matthias Braun added the comment: While working on the pull request I felt that the type and constants better fit `descrobject.h` rather than `object.h`. -- ___ Python tracker ___

[issue34204] Bump the default pickle protocol in shelve

2020-05-27 Thread STINNER Victor
STINNER Victor added the comment: I wrote a short script to see the impact of file size depending on the protocol: --- import shelve import os.path print("== Short value ==") for proto in (0, 1, 2, 3, 4, 5): filename = 'shelve-picklev%s' % proto with shelve.open(filename, protocol=prot

[issue40690] unittest: if FunctionTestCase is imported, the loader loads "tests" from it

2020-05-27 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: I checked and FunctionTestCase seems to completely break the loader. The tests for FunctionTestCase in the standard library instantiate the class from inside the method of a TestCase so the loader never see them but even the simple test file I attached complete

[issue40614] ast.parse doesn't respect feature_version for debug f-strings

2020-05-27 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 9b83829e7d476acecc86d48978acc5813ec51e65 by Pablo Galindo in branch '3.9': [3.9] bpo-40614: Respect feature version for f-string debug expressions (GH-20196) (GH-20464) https://github.com/python/cpython/commit/9b83829e7d476acecc86d48978a

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

2020-05-27 Thread Raymond Hettinger
Raymond Hettinger added the comment: +1 for 3.9 and later. -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing

[issue37028] Implement asyncio repl

2020-05-27 Thread Matthias Bussonnier
Matthias Bussonnier added the comment: > Compared to the vanilla REPL, this doesn’t include readline setup for tab > completion and history file. Was it on purpose? Not particularly, it was mostly to show it is possible. I'm guessing any improvement to make it more consistent with the normal

[issue40614] ast.parse doesn't respect feature_version for debug f-strings

2020-05-27 Thread Shantanu
Change by Shantanu : -- pull_requests: +19718 pull_request: https://github.com/python/cpython/pull/20466 ___ Python tracker ___ ___

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

2020-05-27 Thread miss-islington
miss-islington added the comment: New changeset 3a2667d91e33493ccde113ddf5092afefc3c89fa by Miss Islington (bot) in branch '3.9': bpo-30064: Fix asyncio loop.sock_* race condition issue (GH-20369) https://github.com/python/cpython/commit/3a2667d91e33493ccde113ddf5092afefc3c89fa --

[issue32604] [subinterpreters] PEP 554 implementation: add interpreters module

2020-05-27 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Commit 9d17cbf33df7cfb67ca0f37f6463ba5c18676641 is causing all refleak buildbots to fail and is masking other issues and causing some confusion already in other PRs (like https://github.com/python/cpython/pull/20433) so I opened a revert in PR 20465 f

[issue32604] [subinterpreters] PEP 554 implementation: add interpreters module

2020-05-27 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- nosy: +pablogsal nosy_count: 13.0 -> 14.0 pull_requests: +19717 pull_request: https://github.com/python/cpython/pull/20465 ___ Python tracker _

[issue40614] ast.parse doesn't respect feature_version for debug f-strings

2020-05-27 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +19716 pull_request: https://github.com/python/cpython/pull/20464 ___ Python tracker ___ ___

[issue40797] multiprocessing.Semaphore has undocumented get_value() method

2020-05-27 Thread Rémi Lapeyre
New submission from Rémi Lapeyre : The threading.Semaphore class does not have this method, it is undocumented and useless on some system (at least MacOS): >>> s.get_value() Traceback (most recent call last): File "", line 1, in File "/Library/Frameworks/Python.framework/Versions/3.8/lib/

[issue40614] ast.parse doesn't respect feature_version for debug f-strings

2020-05-27 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset c116c94ff119485761460f1033cdee425bed0310 by Shantanu in branch 'master': bpo-40614: Respect feature version for f-string debug expressions (GH-20196) https://github.com/python/cpython/commit/c116c94ff119485761460f1033cdee425bed0310

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

2020-05-27 Thread Gregory P. Smith
Gregory P. Smith added the comment: I expect the best decision to be to get rid of tempfile.tempdir entirely. That would need be its own issue with a deprecation period involved. A process global that alters behavior of all calls into a module that don't explicitly opt-out is a bad API. --

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

2020-05-27 Thread Matthias Braun
Change by Matthias Braun : -- pull_requests: +19715 stage: commit review -> patch review pull_request: https://github.com/python/cpython/pull/20462 ___ Python tracker ___ __

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

2020-05-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Well, the behavior for an existing bytes path was not unintended, but some people can depend on it. But before making it an official feature, we should also check other cases of an unintended behavior. What if set tempfile.tempdir to a Path object or to a

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

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

[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 -

[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 -- ___

[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 _

[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 --

[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. -- ___

[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 __

[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

[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

[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: 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,

[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

[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: 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 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 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
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

[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 ->

[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

[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

[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.

[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 ___

[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 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] 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. -- _

[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] 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.) --

[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

[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 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 --

[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

[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. --

[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 Matthias Braun
Change by Matthias Braun : -- components: +C API versions: +Python 3.10 -Python 3.8 ___ Python tracker ___ ___ Python-bugs-list maili

[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

[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 ___

[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 Batuhan Taskaya
Batuhan Taskaya added the comment: I have applied Guido's suggestion and it looks like it is working. -- ___ Python tracker ___ ___

[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 ___ ___

[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

  1   2   >