[issue36207] robotsparser deny all with some rules

2021-09-29 Thread Nico
Nico added the comment: Had same problem today for my website (https://www.bonus4casino.fr/), following for a fix -- nosy: +nico.bonefato ___ Python tracker ___ _

[issue45320] Remove deprecated inspect functions

2021-09-29 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Slightly related, inspect.getfullargspec was also deprecated and later undeprecated. Please find the discussion post this message https://bugs.python.org/issue36751#msg341128 https://bugs.python.org/issue37010 -- nosy: +xtreak ___

[issue41710] acquire(timeout) of threading.Lock and threading.Condition is affected by jumps in system time: Python should use sem_clockwait(CLOCK_MONOTONIC)

2021-09-29 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +26999 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28629 ___ Python tracker ___ _

[issue45116] Performance regression 3.10b1 and later on Windows: Py_DECREF() not inlined in PGO build

2021-09-29 Thread neonene
Change by neonene : -- pull_requests: +27000 pull_request: https://github.com/python/cpython/pull/28630 ___ Python tracker ___ ___ P

[issue45116] Performance regression 3.10b1 and later on Windows: Py_DECREF() not inlined in PGO build

2021-09-29 Thread neonene
Change by neonene : -- pull_requests: +27001 pull_request: https://github.com/python/cpython/pull/28631 ___ Python tracker ___ ___ P

[issue36207] robotsparser deny all with some rules

2021-09-29 Thread STINNER Victor
Change by STINNER Victor : -- Removed message: https://bugs.python.org/msg402889 ___ Python tracker ___ ___ Python-bugs-list mailing

[issue45116] Performance regression 3.10b1 and later on Windows: Py_DECREF() not inlined in PGO build

2021-09-29 Thread neonene
neonene added the comment: I submitted 2 drafts in a hurry. Sorry for short explanations. I'll add more reports. -- ___ Python tracker ___

[issue36521] Consider removing docstrings from co_consts in code objects

2021-09-29 Thread Guido van Rossum
Guido van Rossum added the comment: Not so fast. I'm not in favor of (c) co_doc either any more (for the reasons you state). I would go for (b), a CO_DOCSTRING flag plus co_consts[0]. I expect that co_consts sharing to be a very minor benefit, but you could easily count this with another sm

[issue45116] Performance regression 3.10b1 and later on Windows: Py_DECREF() not inlined in PGO build

2021-09-29 Thread neonene
neonene added the comment: @pablogsal I'm OK with more effective fixes in 3.10.1 and later. Thanks all, thanks kj and malin for many help. -- ___ Python tracker ___ _

[issue44751] crypt.h should be in _cryptmodule.c, not in public header

2021-09-29 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis added the comment: Could you backport this fix to at least 3.9 and 3.10 branches? This is fix for regression which was previously backported to 2.7 and 3.6 branches. -- nosy: +Arfrever ___ Python tracker

[issue44751] crypt.h should be in _cryptmodule.c, not in public header

2021-09-29 Thread Sam James
Change by Sam James : -- nosy: +thesamesam ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue45324] The frozen importer should capture info in find_spec().

2021-09-29 Thread Eric Snow
New submission from Eric Snow : Currently FrozenImporter (in Lib/importlib/_bootstrap.py) does minimal work in its find_spec() method. It only checks whether or not the module is frozen. However, in doing so it has gathered all the info we need to load the module. We end up repeating that

[issue45324] The frozen importer should capture info in find_spec().

2021-09-29 Thread Eric Snow
Eric Snow added the comment: Taking care of this will also be necessary (probably) as we work on adding __file__ to frozen stdlib modules. (See bpo-21736.) -- ___ Python tracker ___

[issue45324] The frozen importer should capture info in find_spec().

2021-09-29 Thread Barry A. Warsaw
Change by Barry A. Warsaw : -- nosy: +barry ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue45325] Allow "p" in Py_BuildValue

2021-09-29 Thread Pablo Galindo Salgado
New submission from Pablo Galindo Salgado : We should allow Py_BuildValue to take a "p" argument that takes a C int and produces a Python Bool so it would be symmetric with the p format code for PyArg_Parse that takes a Python object and returns a C int containing PyObject_IsTrue(obj). -

[issue45324] The frozen importer should capture info in find_spec().

2021-09-29 Thread Eric Snow
Change by Eric Snow : -- keywords: +patch pull_requests: +27002 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/28633 ___ Python tracker ___

[issue45325] Allow "p" in Py_BuildValue

2021-09-29 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch pull_requests: +27003 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28634 ___ Python tracker __

[issue45020] Freeze all modules imported during startup.

2021-09-29 Thread Eric Snow
Change by Eric Snow : -- pull_requests: +27004 pull_request: https://github.com/python/cpython/pull/28635 ___ Python tracker ___ ___

[issue45020] Freeze all modules imported during startup.

2021-09-29 Thread Eric Snow
Eric Snow added the comment: New changeset 45ca1c04139300ec0289a32f78c7ac922a4f7b07 by Eric Snow in branch 'main': bpo-45020: Do not freeze /__init__.py twice. (gh-28635) https://github.com/python/cpython/commit/45ca1c04139300ec0289a32f78c7ac922a4f7b07 -- __

[issue45325] Allow "p" in Py_BuildValue

2021-09-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There was no much need of this feature. In rare cases when we needed to build a bool in Py_BuildValue (I have found only 2 cases in the stdlib, and one of them is added by me) we use the following idiom: Py_BuildValue("...O...", ..., expr ? Py_True : Py

[issue45325] Allow "p" in Py_BuildValue

2021-09-29 Thread STINNER Victor
STINNER Victor added the comment: I would be interested to see how the "p" format could be used in existing code. I found a few places would benefit of it. Either create a new draft PR, or put it in the same PR 28634. Modules/_itertoolsmodule.c: return Py_BuildValue("O(N)(OO)", Py_T

[issue45325] Allow "p" in Py_BuildValue

2021-09-29 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > Either create a new draft PR, or put it in the same PR 28634. I prefer to reach an agreement first here before I add more things to the PR -- ___ Python tracker _

[issue44751] crypt.h should be in _cryptmodule.c, not in public header

2021-09-29 Thread miss-islington
Change by miss-islington : -- pull_requests: +27005 pull_request: https://github.com/python/cpython/pull/28636 ___ Python tracker ___ __

[issue45229] Always use unittest for collecting tests in regrtests

2021-09-29 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +27006 pull_request: https://github.com/python/cpython/pull/28637 ___ Python tracker ___

[issue45325] Allow "p" in Py_BuildValue

2021-09-29 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > There was no much need of this feature. In rare cases when we needed to build > a bool in Py_BuildValue (I have found only 2 cases in the stdlib, and one of > them is added by me) we use the following idiom: Is true that this is not very common, but

[issue44751] crypt.h should be in _cryptmodule.c, not in public header

2021-09-29 Thread miss-islington
Change by miss-islington : -- pull_requests: +27007 pull_request: https://github.com/python/cpython/pull/28638 ___ Python tracker ___ __

[issue45229] Always use unittest for collecting tests in regrtests

2021-09-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset d441437ee71ae174c008c23308b749b91020ba77 by Serhiy Storchaka in branch 'main': bpo-45229: Make datetime tests discoverable (GH-28615) https://github.com/python/cpython/commit/d441437ee71ae174c008c23308b749b91020ba77 -- _

[issue45229] Always use unittest for collecting tests in regrtests

2021-09-29 Thread miss-islington
Change by miss-islington : -- pull_requests: +27008 pull_request: https://github.com/python/cpython/pull/28639 ___ Python tracker ___ __

[issue45325] Allow "p" in Py_BuildValue

2021-09-29 Thread STINNER Victor
STINNER Victor added the comment: > but there is a catch -- the arguments should be a C int. If it is not, you > can break a stack. I never understood how "..." arguments work under the hood. What happens if you pass a double, it is stored as a double on the C stack, and then Py_BuildValue(

[issue45262] crash if asyncio is used before and after re-initialization if using python embedded in an application

2021-09-29 Thread STINNER Victor
STINNER Victor added the comment: > "Assertion failed: Py_IS_TYPE(rl, &PyRunningLoopHolder_Type), file > D:\a\1\s\Modules_asynciomodule.c, line 261" The _asyncio extension uses static types and doesn't implement the multiphase initialization API. It doesn't work well with your "deinitialize/

[issue45320] Remove deprecated inspect functions

2021-09-29 Thread Hugo van Kemenade
Hugo van Kemenade added the comment: Of the 188 repos I managed to clone of 200 top PyPI packages, looks like these 9 are still calling them: botocore client_python cython google-api-python-client grpc ipython pycodestyle pyrsistent wrapt Details at https://github.com/python/cpython/pull/286

[issue25653] ctypes+callbacks+fork+selinux = crash

2021-09-29 Thread STINNER Victor
STINNER Victor added the comment: Another recent crash involving libffi, closure, fork and SELinux: https://bugzilla.redhat.com/show_bug.cgi?id=1977410 This bug comes from libffi, not from Python (but it can be easily reproducing using ctypes which uses libffi). -- nosy: +vstinner

[issue45325] Allow "p" in Py_BuildValue

2021-09-29 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: The va_start macro just sets up a pointer to the first function parameter, e.g.:- void func (int a, ...) { // va_start char *p = (char *) &a + sizeof a; } which makes p point to the second parameter. The va_arg macro does this:- void func

[issue42813] Extra spaces cause unexpected EOF error in "compile" function with mode "single"

2021-09-29 Thread Terry J. Reedy
Terry J. Reedy added the comment: I believe that this should be closed as not-a-bug. Ending a file with *is* a syntax error. Previous, it was assumed that the problem, in retrospect, was the 'extra' indent. But one can equally say that the problem is the 'missing' statement after the oth

[issue44751] crypt.h should be in _cryptmodule.c, not in public header

2021-09-29 Thread miss-islington
miss-islington added the comment: New changeset 9626ac8b7421aa5fc04a30359521d24f40105141 by Miss Islington (bot) in branch '3.9': closes bpo-44751: Move crypt.h include from public header to _cryptmodule (GH-27394) https://github.com/python/cpython/commit/9626ac8b7421aa5fc04a30359521d24f4010

[issue42813] Extra spaces cause unexpected EOF error in "compile" function with mode "single"

2021-09-29 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: I concur -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue42813] Extra spaces cause unexpected EOF error in "compile" function with mode "single"

2021-09-29 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- Removed message: https://bugs.python.org/msg402911 ___ Python tracker ___ ___ Python-bugs-list

[issue42813] Extra spaces cause unexpected EOF error in "compile" function with mode "single"

2021-09-29 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: I concur with Terry, ending a file with *is* a syntax error. -- ___ Python tracker ___ _

[issue37080] Cannot compile Python3.7.3 on Alt-F (ARM)

2021-09-29 Thread Terry J. Reedy
Terry J. Reedy added the comment: Jarl, I don't know if we support compiling on such devices, even though the OS is linux. I suggest that you ask on python-list, where someone might have the experience to help you. -- ___ Python tracker

[issue45326] Unexpected TypeError with type alias+issubclass+ABC

2021-09-29 Thread Dmitry Marakasov
New submission from Dmitry Marakasov : Here's a curious problem. issubclass() check of a type against an ABC-derived class raises TypeError claiming that type is not a class, however inspect.isclass() says it's a class, and issubclass() check against a simple class works fine: ``` from abc i

[issue45325] Allow "p" in Py_BuildValue

2021-09-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > What happens if you pass a double, it is stored as a double on the C stack, > and then Py_BuildValue() will read junk data? AFAIK, it is complicated. On old computer primitive compilers just pushed arguments one by one on the stack (in platform-depending

[issue45291] Some instructions in the "Using Python on Unix platforms" document do no work on CentOS 7

2021-09-29 Thread Christian Heimes
Christian Heimes added the comment: Thanks! The documentation was not up to date for OpenSSL 3.0.0. The default for --libdir was changed late in the development cycle. -- nosy: +christian.heimes status: open -> closed ___ Python tracker

[issue45325] Allow "p" in Py_BuildValue

2021-09-29 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: You can see how is implemented on am64 for example here: https://blog.nelhage.com/2010/10/amd64-and-va_arg/ -- ___ Python tracker ___

[issue45325] Allow "p" in Py_BuildValue

2021-09-29 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > My concern is that such feature can provoke bugs. The risk can exceed the > minor benefit. But isn't that risk the same for other formatting parameters? -- ___ Python tracker

[issue43753] [C API] Add Py_Is(x, y) and Py_IsNone(x) functions

2021-09-29 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +27009 pull_request: https://github.com/python/cpython/pull/28641 ___ Python tracker ___ __

[issue44751] crypt.h should be in _cryptmodule.c, not in public header

2021-09-29 Thread STINNER Victor
STINNER Victor added the comment: New changeset 80285ecc8deaa2b0e7351bf4be863d1a0ad3c188 by Miss Islington (bot) in branch '3.10': closes bpo-44751: Move crypt.h include from public header to _cryptmodule (GH-27394) (GH-28636) https://github.com/python/cpython/commit/80285ecc8deaa2b0e7351bf4

[issue44751] crypt.h should be in _cryptmodule.c, not in public header

2021-09-29 Thread STINNER Victor
STINNER Victor added the comment: > Could you backport this fix to at least 3.9 and 3.10 branches? Done. > This is fix for regression which was previously backported to 2.7 and 3.6 > branches. I'm not sure what you mean. In Python 2.7 and Python 3.6, was already included by Include/Pytho

[issue45325] Allow "p" in Py_BuildValue

2021-09-29 Thread Matt Wozniski
Matt Wozniski added the comment: > but there is a catch -- the arguments should be a C int Or a type that promotes to int. If you pass a C short or char, or a C++ bool, it is implicitly promoted to int. > so you will need to write "expr ? 1 : 0" Or alternatively "!!expr" > which is not muc

[issue43753] [C API] Add Py_Is(x, y) and Py_IsNone(x) functions

2021-09-29 Thread STINNER Victor
STINNER Victor added the comment: New changeset 8d3e7eff0936926554db6162c992af5829dc8160 by Victor Stinner in branch 'main': bpo-43753: _operator.is_() uses Py_Is() (GH-28641) https://github.com/python/cpython/commit/8d3e7eff0936926554db6162c992af5829dc8160 -- _

[issue42813] Extra spaces cause unexpected EOF error in "compile" function with mode "single"

2021-09-29 Thread Terry J. Reedy
Change by Terry J. Reedy : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python

[issue45325] Allow "p" in Py_BuildValue

2021-09-29 Thread Matt Wozniski
Matt Wozniski added the comment: I spotted three other uses in the stdlib: Modules/_io/_iomodule.c raw = PyObject_CallFunction(RawIO_class, "OsOO", path_or_fd, rawmode, closefd ? Py_True : Py_False,

[issue45325] Allow "p" in Py_BuildValue

2021-09-29 Thread Matt Wozniski
Matt Wozniski added the comment: The leftmost argument of the ternary is an int for every example that Victor and I found in the stdlib, so no casting would be required in any of these cases. -- ___ Python tracker

[issue41710] acquire(timeout) of threading.Lock and threading.Condition is affected by jumps in system time: Python should use sem_clockwait(CLOCK_MONOTONIC)

2021-09-29 Thread STINNER Victor
STINNER Victor added the comment: New changeset 09796f2f142fdb1214f34a3ca917959ecb32a88b by Victor Stinner in branch 'main': bpo-41710: Add _PyTime_AsTimespec_clamp() (GH-28629) https://github.com/python/cpython/commit/09796f2f142fdb1214f34a3ca917959ecb32a88b -- ___

[issue40718] Support out-of-band pickling for builtin types

2021-09-29 Thread jakirkham
Change by jakirkham : -- components: +Library (Lib) ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue41226] Supporting `strides` in `memoryview.cast`

2021-09-29 Thread jakirkham
Change by jakirkham : -- components: +Library (Lib) type: -> enhancement ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue41710] acquire(timeout) of threading.Lock and threading.Condition is affected by jumps in system time: Python should use sem_clockwait(CLOCK_MONOTONIC)

2021-09-29 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +27010 pull_request: https://github.com/python/cpython/pull/28642 ___ Python tracker ___ __

[issue45326] Unexpected TypeError with type alias+issubclass+ABC

2021-09-29 Thread Dong-hee Na
Change by Dong-hee Na : -- nosy: +corona10 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue41710] acquire(timeout) of threading.Lock and threading.Condition is affected by jumps in system time: Python should use sem_clockwait(CLOCK_MONOTONIC)

2021-09-29 Thread STINNER Victor
STINNER Victor added the comment: New changeset d62d925823b005c33b432e527562b573a3a89635 by Victor Stinner in branch 'main': bpo-41710: Add pytime_add() and pytime_mul() (GH-28642) https://github.com/python/cpython/commit/d62d925823b005c33b432e527562b573a3a89635 --

[issue45326] Unexpected TypeError with type alias+issubclass+ABC

2021-09-29 Thread Dong-hee Na
Change by Dong-hee Na : -- nosy: +gvanrossum ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue45326] Unexpected TypeError with type alias+issubclass+ABC

2021-09-29 Thread Dong-hee Na
Change by Dong-hee Na : -- versions: +Python 3.10, Python 3.11 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41710] acquire(timeout) of threading.Lock and threading.Condition is affected by jumps in system time: Python should use sem_clockwait(CLOCK_MONOTONIC)

2021-09-29 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +27011 pull_request: https://github.com/python/cpython/pull/28643 ___ Python tracker ___ __

[issue36521] Consider removing docstrings from co_consts in code objects

2021-09-29 Thread Inada Naoki
Inada Naoki added the comment: > I'm not in favor of (c) co_doc either any more (for the reasons you state). I > would go for (b), a CO_DOCSTRING flag plus co_consts[0]. I expect that > co_consts sharing to be a very minor benefit, but you could easily count this > with another small change

[issue45116] Performance regression 3.10b1 and later on Windows: Py_DECREF() not inlined in PGO build

2021-09-29 Thread Ma Lin
Ma Lin added the comment: I think this is a bug of MSVC2019, not a really regression of CPython. So changing the code of CPython is just a workaround, maybe the right direction is to prompt MSVC to fix the bug, otherwise there will be more trouble when 3.11 is released a year later. Seeing

[issue41710] acquire(timeout) of threading.Lock and threading.Condition is affected by jumps in system time: Python should use sem_clockwait(CLOCK_MONOTONIC)

2021-09-29 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +27012 pull_request: https://github.com/python/cpython/pull/28644 ___ Python tracker ___ __

[issue37080] Cannot compile Python3.7.3 on Alt-F (ARM)

2021-09-29 Thread STINNER Victor
STINNER Victor added the comment: > Use GCC option -fPIC for shared objects, please Did you try that? I guess that the configure.ac block about CCSHARED="-fPIC" doesn't handle your operating system. Try to modify manually Makefile to use "CCSHARED=-fPIC", make clean, and try make again. I

[issue1596321] KeyError at exit after 'import threading' in other thread

2021-09-29 Thread STINNER Victor
Change by STINNER Victor : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue45116] Performance regression 3.10b1 and later on Windows: Py_DECREF() not inlined in PGO build

2021-09-29 Thread neonene
neonene added the comment: _PyEval_EvalFrameDefault() may also need to be divided. -- ___ Python tracker ___ ___ Python-bugs-list m

[issue41710] acquire(timeout) of threading.Lock and threading.Condition is affected by jumps in system time: Python should use sem_clockwait(CLOCK_MONOTONIC)

2021-09-29 Thread STINNER Victor
STINNER Victor added the comment: New changeset 0231b6da45b610d33ee4e99bf190e31488d6ab26 by Victor Stinner in branch 'main': bpo-41710: Fix building pytime.c on Windows (GH-28644) https://github.com/python/cpython/commit/0231b6da45b610d33ee4e99bf190e31488d6ab26 -- _

[issue45291] Some instructions in the "Using Python on Unix platforms" document do no work on CentOS 7

2021-09-29 Thread Yiyang Zhan
Yiyang Zhan added the comment: Thank you for reviewing the pull request 😄 -- ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue45327] json loads is stuck infinitely when the file name is Boolean

2021-09-29 Thread Vinayak Hosamani
New submission from Vinayak Hosamani : Below snippet works fine on Python2 >>> import json >>> tc_report_file = False >>> tc_data = json.load(open(tc_report_file)) Traceback (most recent call last): File "", line 1, in TypeError: coercing to Unicode: need string or buffer, bool found >>> as

[issue45327] json loads is stuck infinitely when the file name is Boolean

2021-09-29 Thread Eric V. Smith
Eric V. Smith added the comment: You can demonstrate this without the json module: # python2 >>> open(False) Traceback (most recent call last): File "", line 1, in TypeError: coercing to Unicode: need string or buffer, bool found # python3 >>> open(False).readlines() The python3 version d

[issue45327] Reading from a file is stuck infinitely when the file name is Boolean

2021-09-29 Thread Eric V. Smith
Change by Eric V. Smith : -- components: +Interpreter Core -Library (Lib) title: json loads is stuck infinitely when the file name is Boolean -> Reading from a file is stuck infinitely when the file name is Boolean type: -> behavior ___ Python trac

[issue45327] Reading from a file is stuck infinitely when the file name is Boolean

2021-09-29 Thread Eric V. Smith
Eric V. Smith added the comment: The issue is that False is causing a read from stdin, since False == 0. >>> open(0).readlines() test ['test\n'] Here I typed "test", followed by Ctrl-D (end of file). readlines() then completed and printed its result. I think the basic answer here is "don't

<    1   2