[issue43179] Remove 31/32-bit s390 Linux support (s390-linux-gnu triplet)

2021-02-18 Thread John Paul Adrian Glaubitz
John Paul Adrian Glaubitz added the comment: > To get a platform supported by Python, we also need a volunteer to fix issues > specific to the 31 bit s390 platform: see PEP 11. You do not need to support every platform. Just allow your users to use them. If something breaks downstream on a c

[issue43238] python picking garbage values randomly incase running palindrome function

2021-02-18 Thread Mark Dickinson
Change by Mark Dickinson : -- stage: -> resolved status: pending -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue43246] Dict copy optimization violates subclass invariant

2021-02-18 Thread Phil
Change by Phil : -- nosy: +pgjones ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/ma

[issue15108] Incomplete tuple created by PyTuple_New() and accessed via the GC can trigged a crash

2021-02-18 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Should we still fix sqlite3, or wait for an agreement on GH-24510? -- ___ Python tracker ___

[issue43115] locale.getlocale fails if locale is set

2021-02-18 Thread Eryk Sun
Eryk Sun added the comment: > Is this the same as the other issue where get_locale is normalising > the result according to some particular glibc logic and isn't at > all portable? If I understand Anders' immediate problem correctly, I think it can be addressed by using setlocale() to save

[issue43246] Dict copy optimization violates subclass invariant

2021-02-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The choice of testing __iter__ was because OrderedDict overrides __iter__, and since dicts are ordered now, the order of insertion does matter. -- nosy: +serhiy.storchaka ___ Python tracker

[issue43237] datetime.__eq__ returns true when timezones don't match

2021-02-18 Thread Mark Dickinson
Mark Dickinson added the comment: I'm going to close here. While changing the behaviour isn't completely out of the question, it would need (a) a clear proposal on how to deal with order comparisons and backwards compatibility, and (b) strong support from the community. A PEP is probably the

[issue41100] Support macOS 11 and Apple Silicon Macs

2021-02-18 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: -mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[issue43115] locale.getlocale fails if locale is set

2021-02-18 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 18.02.2021 10:36, Eryk Sun wrote: > It's not just a Windows problem. For example, getlocale() doesn't return the > POSIX locale modifier in a 3-tuple (language, encoding, modifier). So it > can't be used to restore a locale for which the modifier is ma

Re: [issue43115] locale.getlocale fails if locale is set

2021-02-18 Thread M.-A. Lemburg
On 17.02.2021 15:02, Anders Munch wrote: >> BTW: What is wxWidgets doing with the returned values ? > > wxWidgets doesn't call getlocale, it's a C++ library (wrapped by wxPython) > that uses C setlocale. > > What does use getlocale is time.strptime and datetime.datetime.strptime, so > when getl

[issue43228] Regression in function builtins

2021-02-18 Thread Mark Shannon
Mark Shannon added the comment: I don't think PR 24559 will be sufficient to fix this. Pickled functions need to share the builtins dict, not just have a copy of it. Adding a "builtins" parameter to types.FunctionType() should be be enough. So: function(code, globals, name=None, argdefs=Non

[issue35134] Add a new Include/cpython/ subdirectory for the "CPython API" with implementation details

2021-02-18 Thread Nicholas Sim
Change by Nicholas Sim : -- pull_requests: +23342 pull_request: https://github.com/python/cpython/pull/24561 ___ Python tracker ___

[issue43248] platform.libc_ver() returns no information on Alpine Linux

2021-02-18 Thread Omer Katz
New submission from Omer Katz : When calling platform.libc_ver() on Alpine I get the following tuple: ('', '') Instead, I expect to get ('muslc', '') or an exception if the libc type & version cannot be detected. If one of them is not detected, the returned value shouldn't be an empty string

[issue43249] sqlite3_column_bytes() should be called after sqlite3_column_blob()

2021-02-18 Thread Erlend Egeberg Aasland
New submission from Erlend Egeberg Aasland : sqlite3_column_bytes() should be called _after_ sqlite3_column_blob(). There two calls to sqlite3_column_blob() are both preceeded by calls to sqlite3_column_bytes(). Currently it does not do any harm, but it is bad API usage. I suggest to fix the

[issue43250] [C API] Depreate or remove PyFPE_START_PROTECT() and PyFPE_END_PROTECT()

2021-02-18 Thread STINNER Victor
New submission from STINNER Victor : In Python 3.6, there was a WANT_SIGFPE_HANDLER macro defined if Python was built with ./configure --with-fpectl. By default, the macro was not defined. The fpectl module installed a SIGFPE signal handler which uses longjmp(). If the WANT_SIGFPE_HANDLER mac

[issue43251] sqlite3_column_name() failures should call PyErr_NoMemory()

2021-02-18 Thread Erlend Egeberg Aasland
New submission from Erlend Egeberg Aasland : AFAICS, the docs for sqlite3_column_name() says that if it returns NULL, we are out of memory, thus we should call PyErr_NoMemory() and bail. FYI, there are the calls to sqlite3_column_name() in Modules/_sqlite//cursor.c Ref: - http://sqlite.org/c3

[issue43250] [C API] Depreate or remove PyFPE_START_PROTECT() and PyFPE_END_PROTECT()

2021-02-18 Thread STINNER Victor
STINNER Victor added the comment: Latest commit related to these macros: commit be143ec99674ba38c5811f34cdb85ef39c2dc8f8 Author: Victor Stinner Date: Wed Nov 20 02:51:30 2019 +0100 bpo-38835: Don't use PyFPE_START_PROTECT and PyFPE_END_PROTECT (GH-17231) The PyFPE_START_PROTEC

[issue43249] sqlite3_column_bytes() should be called after sqlite3_column_blob()

2021-02-18 Thread Berker Peksag
Berker Peksag added the comment: Good catch! Sounds good to me but I'd say designing APIs relying on call order is bad too :) -- ___ Python tracker ___ __

[issue29137] Fix fpectl-induced ABI breakage

2021-02-18 Thread STINNER Victor
STINNER Victor added the comment: I created bpo-43250: "[C API] Depreate or remove PyFPE_START_PROTECT() and PyFPE_END_PROTECT()". By the way, I close this issue: there is no activity since 2019. -- status: open -> closed ___ Python tracker

[issue43250] [C API] Depreate or remove PyFPE_START_PROTECT() and PyFPE_END_PROTECT()

2021-02-18 Thread STINNER Victor
STINNER Victor added the comment: Another related change from bpo-37474: commit 5e0ea7540f577c9684e272000fdfc80d29bb78a2 Author: Victor Stinner Date: Tue Oct 1 13:12:29 2019 +0200 bpo-37474: Don't call fedisableexcept() on FreeBSD (GH-16515) On FreeBSD, Python no longer calls

[issue43250] [C API] Depreate or remove PyFPE_START_PROTECT() and PyFPE_END_PROTECT()

2021-02-18 Thread STINNER Victor
STINNER Victor added the comment: I explicitly excluded the PyFPE macros from the limited C API in Python 3.9: commit 488d02a24142948bfb1fafd19fa48e61fcbbabc5 Author: Victor Stinner Date: Wed Nov 20 12:17:09 2019 +0100 bpo-38835: Exclude PyFPE macros from the stable API (GH-17228)

[issue43250] [C API] Depreate or remove PyFPE_START_PROTECT() and PyFPE_END_PROTECT()

2021-02-18 Thread STINNER Victor
STINNER Victor added the comment: See also bpo-38835: "pyfpe.h: Exclude PyFPE_START_PROTECT and PyFPE_END_PROTECT from the Py_LIMITED_API". -- ___ Python tracker ___

[issue43249] sqlite3_column_bytes() should be called after sqlite3_column_blob()

2021-02-18 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: > Sounds good to me but I'd say designing APIs relying on call order is bad too > :) Yes, it's too easy to mess up things with this part of the SQLite API :) I'll throw up a PR. BTW (small digression): I really want to refactor _pysqlite_fetch_one_

[issue43228] Regression in function builtins

2021-02-18 Thread STINNER Victor
STINNER Victor added the comment: > but __builtins__.__dict__ cannot be pickled. I don't see why cloudpickle calls LambdaType() directly. It could use a helper in their cloudpickle.cloudpickle_fast which calls LambdaType() with the proper arguments, especially to get __builtins__. I don't th

[issue42990] Improve the C code for calling Python code: _PyEval_EvalCode()

2021-02-18 Thread STINNER Victor
STINNER Victor added the comment: New changeset a3c3ffa68e6fc4524b1149a6a14d56c3a2e9b612 by Victor Stinner in branch 'master': bpo-42990: Add __builtins__ attribute to functions (GH-24559) https://github.com/python/cpython/commit/a3c3ffa68e6fc4524b1149a6a14d56c3a2e9b612 --

[issue43249] sqlite3_column_bytes() should be called after sqlite3_column_blob()

2021-02-18 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- keywords: +patch pull_requests: +23343 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24562 ___ Python tracker _

[issue15108] Incomplete tuple created by PyTuple_New() and accessed via the GC can trigged a crash

2021-02-18 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > Should we still fix sqlite3, or wait for an agreement on GH-24510? I suggest to let's all agree on how to fix this on the bigger scale first. -- ___ Python tracker ___

[issue43250] [C API] Depreate or remove PyFPE_START_PROTECT() and PyFPE_END_PROTECT()

2021-02-18 Thread STINNER Victor
STINNER Victor added the comment: Using INADA-san recipe https://github.com/methane/notes/tree/master/2020/wchar-cache I found the 62 projects on the PyPI top 4000 which contain "PyFPE" pattern: asyncpg-0.22.0.tar.gz auditwheel-3.3.1.tar.gz av-8.0.3.tar.gz bcolz-1.2.1.tar.gz BDQuaternions-0.

[issue43252] deepcopy of weakref proxies

2021-02-18 Thread Konrad Schwarz
New submission from Konrad Schwarz : copy.deepcopy()-ing a tree structure that has internal parent and cross-reference links implemented as weakref.proxy() objects causes the weak reference proxies themselves to be copied (still refering to their original referents) rather than weak reference

[issue43179] Remove 31/32-bit s390 Linux support (s390-linux-gnu triplet)

2021-02-18 Thread Charalampos Stratakis
Charalampos Stratakis added the comment: > You do not need to support every platform. Just allow your users to use them. This is kinda missing the point though. For example I've dealt a lot with the CPython codebase (and I'm also one of the Red Hat maintainers for RHEL and Fedora) and althou

[issue38822] Inconsistent os.stat behavior for directory with Access Denied

2021-02-18 Thread Nicholas Sim
Change by Nicholas Sim : -- nosy: +nw0 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.or

[issue40512] [subinterpreters] Meta issue: per-interpreter GIL

2021-02-18 Thread Nicholas Sim
Change by Nicholas Sim : -- nosy: +nw0 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.or

[issue29086] Document C API that is not part of the limited API

2021-02-18 Thread Nicholas Sim
Change by Nicholas Sim : -- nosy: +nw0 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.or

[issue43253] asyncio open_connection fails when a socket is explicitly closed

2021-02-18 Thread Daniel Engel
New submission from Daniel Engel : Python 3.9.0 (tags/v3.9.0:9cf6752, Oct 5 2020, 15:34:40) [MSC v.1927 64 bit (AMD64)] Type 'copyright', 'credits' or 'license' for more information IPython 7.18.1 -- An enhanced Interactive Python. Type '?' for help. In [1]: import socket ...: s1, s2 = soc

[issue29086] Document C API that is not part of the limited API

2021-02-18 Thread Petr Viktorin
Petr Viktorin added the comment: PEP 652 is currently draft & it's discussed at https://discuss.python.org/t/pep-652-maintaining-the-stable-abi/6986 -- ___ Python tracker ___

[issue40077] Convert static types to heap types: use PyType_FromSpec()

2021-02-18 Thread Nicholas Sim
Change by Nicholas Sim : -- nosy: +nw0 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.or

[issue43254] Fix *snprintf() man page links

2021-02-18 Thread Erlend Egeberg Aasland
New submission from Erlend Egeberg Aasland : Both snprintf and vsnprintf belong to man section 3 (library functions), not section 2 (system calls). Affected doc page: https://docs.python.org/3.10/c-api/conversion.html -- assignee: docs@python components: Documentation messages: 387230

[issue43254] Fix *snprintf() man page links

2021-02-18 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- keywords: +patch pull_requests: +23344 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24563 ___ Python tracker _

[issue43255] Ceil division with /// operator

2021-02-18 Thread Boštjan Mejak
New submission from Boštjan Mejak : I hope I'm not too late for a Python 3.10 feature request. I love the fact that Python 3.x does floor division with the // operator. We, however, don't have a ceil division operator, besides importing the math module and using its math.ceil() function. Is i

[issue42990] Improve the C code for calling Python code: _PyEval_EvalCode()

2021-02-18 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +23345 pull_request: https://github.com/python/cpython/pull/24564 ___ Python tracker ___ __

[issue43228] Regression in function builtins

2021-02-18 Thread STINNER Victor
STINNER Victor added the comment: I proposed PR 24564: "bpo-42990: Functions inherit current builtins" which should also to fix cloudpickle. -- ___ Python tracker ___ ___

[issue42990] Improve the C code for calling Python code: _PyEval_EvalCode()

2021-02-18 Thread STINNER Victor
STINNER Victor added the comment: I reopen the issue since there is bpo-43228 regression, caused by this issue, which is still under discussion, and Mark also proposed to add a new builtins parameter to the function constructor (FunctionType). I wrote PR 24564 to help fixing bpo-43228 regres

[issue42990] Improve the C code for calling Python code: _PyEval_EvalCode()

2021-02-18 Thread STINNER Victor
Change by STINNER Victor : -- versions: +Python 3.10 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[issue43256] Document that PyErr_SetInterrupt is async-signal-safe

2021-02-18 Thread Antoine Pitrou
New submission from Antoine Pitrou : While this makes sense given the exposed functionality, the reader may be wary of calling PyErr_SetInterrupt from a C signal handler if it's not explicitly documented as signal-safe. -- assignee: docs@python components: C API, Documentation message

[issue43253] asyncio open_connection fails when a socket is explicitly closed

2021-02-18 Thread Emmanuel Arias
Emmanuel Arias added the comment: I cannot reproduce on a Debian machine. Seems to be a Windows component issue? -- nosy: +eamanu ___ Python tracker ___ __

[issue43255] Ceil division with /// operator

2021-02-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Since adding new operator is a syntax-level change, it needs a PEP. It is better to start with discussing on the Python-ideas mailing list (https://mail.python.org/mailman3/lists/python-ideas.python.org/). Let's see if this idea will be accepted favorably.

[issue43255] Ceil division with /// operator

2021-02-18 Thread STINNER Victor
STINNER Victor added the comment: I'm not convinced that this operation is so common that it deserves a new operator. As Serhiy wrote, it must be first on python-ideas first. I close the issue. -- floor division is x//y integer ceil division can be implemented with math.ceil(x/y) for small

[issue43253] asyncio open_connection fails when a socket is explicitly closed

2021-02-18 Thread Daniel Engel
Daniel Engel added the comment: It reproduced on a windows machine -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue42960] resources module, FreeBSD update adding RLIMIT_KQUEUES constant

2021-02-18 Thread STINNER Victor
STINNER Victor added the comment: New changeset 7be00ee64a2ced73c00ec855c7265e2ba795213d by David CARLIER in branch 'master': bpo-42960: Add resource.RLIMIT_KQUEUES constant from FreeBSD (GH-24251) https://github.com/python/cpython/commit/7be00ee64a2ced73c00ec855c7265e2ba795213d --

[issue42960] resources module, FreeBSD update adding RLIMIT_KQUEUES constant

2021-02-18 Thread STINNER Victor
STINNER Victor added the comment: Thanks David, I merged your PR. -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___ __

[issue43249] sqlite3_column_bytes() should be called after sqlite3_column_blob()

2021-02-18 Thread Berker Peksag
Berker Peksag added the comment: New changeset 47feb1feb28631b6647699b7633109aa85340966 by Erlend Egeberg Aasland in branch 'master': bpo-43249: sqlite3_column_bytes() must follow sqlite_column_blob() (GH-24562) https://github.com/python/cpython/commit/47feb1feb28631b6647699b7633109aa85340966

[issue43253] asyncio open_connection fails when a socket is explicitly closed

2021-02-18 Thread Emmanuel Arias
Change by Emmanuel Arias : -- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware ___ Python tracker ___ ___

[issue28429] ctypes fails to import with grsecurity's TPE

2021-02-18 Thread Petr Viktorin
Petr Viktorin added the comment: Glandos, thank you for the report and fix, and apologies that it wasn't seen by the right set of eyes. -- nosy: +petr.viktorin resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python

[issue42990] Improve the C code for calling Python code: _PyEval_EvalCode()

2021-02-18 Thread Yury Selivanov
Yury Selivanov added the comment: > So you think that even a dedicated "LEN" opcode would not be any faster? > (This is getting in Paul Sokolovsky territory -- IIRC he has a variant of > Python that doesn't allow overriding builtins.) Yeah, a dedicated LEN opcode could only be faster if it w

[issue43249] sqlite3_column_bytes() should be called after sqlite3_column_blob()

2021-02-18 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- pull_requests: +23346 pull_request: https://github.com/python/cpython/pull/24565 ___ Python tracker ___ __

[issue42990] Improve the C code for calling Python code: _PyEval_EvalCode()

2021-02-18 Thread Guido van Rossum
Guido van Rossum added the comment: Victor > the new globals has no "__builtins__" key. This change is backward > incompatible on purpose. If someone really wants to run a function in a > different builtins namespace, globals['__builtins__'] must be set explicitly. You say it's on purpose, w

[issue42990] Improve the C code for calling Python code: _PyEval_EvalCode()

2021-02-18 Thread STINNER Victor
STINNER Victor added the comment: > You say it's on purpose, what's the purpose? Aren't you worried this is going > to break stuff? There is a subtle behavior difference between Python 3.9 and Python 3.10. func_builtins2.py of bpo-43228 works on Python 3.9 but fails on Python 3.10. With my

[issue39853] Segmentation fault with urllib.request.urlopen and threads

2021-02-18 Thread Gilles Duboscq
Gilles Duboscq added the comment: I'm not sure it's the same but we have seen stack traces looking like the one there: https://github.com/astropy/astropy/issues/9699 Current thread 0x7fffa857e3c0 (most recent call first): File "/sw/lib/python3.7/socket.py", line 748 in getaddrinfo Fil

[issue43249] sqlite3_column_bytes() should be called after sqlite3_column_blob()

2021-02-18 Thread Berker Peksag
Berker Peksag added the comment: New changeset cc96231f0a59cc7393943064800ecb6c18892662 by Erlend Egeberg Aasland in branch 'master': bpo-43249: Improve scoping in _pysqlite_fetch_one_row() (GH-24565) https://github.com/python/cpython/commit/cc96231f0a59cc7393943064800ecb6c18892662

[issue43249] sqlite3_column_bytes() should be called after sqlite3_column_blob()

2021-02-18 Thread Berker Peksag
Change by Berker Peksag : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue43255] Ceil division with /// operator

2021-02-18 Thread Mark Dickinson
Mark Dickinson added the comment: I can't recall where I saw this originally, but you can use the spaceship operator "--0--" to turn floor division into ceiling division: >>> 12//5 2 >>> --0-- 12//5 3 There's also the ++0++ operator when you want to emphasize that you really *do* mean floor

[issue39853] Segmentation fault with urllib.request.urlopen and threads

2021-02-18 Thread STINNER Victor
STINNER Victor added the comment: "Segmentation fault with (...) threads (...) getaddrinfo" Aha, another victim on a getaddrinfo() implementation which is not thread safe. See this code in Modules/socketmodule.c: /* Lock to allow python interpreter to continue, but only allow one thread t

[issue39853] Segmentation fault with urllib.request.urlopen and threads

2021-02-18 Thread Gilles Duboscq
Gilles Duboscq added the comment: I get '0' so it was not built with HAVE_GETHOSTBYNAME_R. -- ___ Python tracker ___ ___ Python-bug

[issue43255] Ceil division with /// operator

2021-02-18 Thread Mark Dickinson
Change by Mark Dickinson : -- resolution: not a bug -> rejected ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe

[issue42429] Behavior of general (%g, :g) formatting inconsistent for decimal.Decimal

2021-02-18 Thread Mark Dickinson
Mark Dickinson added the comment: The documentation did get updates: see #39096 for details. Closing here. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker _

[issue13433] [doc] Improve string format documentation regarding %g

2021-02-18 Thread Mark Dickinson
Mark Dickinson added the comment: Closing; the documentation was updated recently. See #39096 for details. -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker _

[issue2142] difflib.unified_diff(...) produces invalid patches

2021-02-18 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: -mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue42990] Improve the C code for calling Python code: _PyEval_EvalCode()

2021-02-18 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +23347 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/24566 ___ Python tracker ___ __

[issue39853] Segmentation fault with urllib.request.urlopen and threads

2021-02-18 Thread STINNER Victor
STINNER Victor added the comment: Oh wait, I removed that lock: commit 0de437de6210c2b32b09d6c47a805b23d023bd59 Author: Victor Stinner Date: Thu May 28 17:23:39 2020 +0200 bpo-25920: Remove socket.getaddrinfo() lock on macOS (GH-20177) On macOS, socket.getaddrinfo() no longer

[issue43179] Remove 31/32-bit s390 Linux support (s390-linux-gnu triplet)

2021-02-18 Thread David Edelsohn
David Edelsohn added the comment: gcc -m31 -dM -E - < /dev/null -- Added file: https://bugs.python.org/file49817/gcc-s390.txt ___ Python tracker ___ __

[issue43179] Remove 31/32-bit s390 Linux support (s390-linux-gnu triplet)

2021-02-18 Thread David Edelsohn
David Edelsohn added the comment: gcc -dM -E - < /dev/null -- Added file: https://bugs.python.org/file49818/gcc-s390x.txt ___ Python tracker ___ __

[issue43115] locale.getlocale fails if locale is set

2021-02-18 Thread Eryk Sun
Eryk Sun added the comment: > The APIs were written at a time where locale modifiers > simply did mot exist. Technically, locale modifiers did exist circa 2000, but I suppose you mean that they were uncommon to the point of being unheard of at the time. The modifier field was specified in

[issue39853] Segmentation fault with urllib.request.urlopen and threads

2021-02-18 Thread STINNER Victor
STINNER Victor added the comment: > For us it happens when using multiprocessing: the main process forks 2 > processes and both use urlopen at roughly the same time. We are seeing this > on Python 3.7.2 on macOS 10.14.3. >From what I understood, calling fork() (and then continue to execute r

[issue18163] Add a 'key' attribute to KeyError

2021-02-18 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: -mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[issue42686] include built-in Math functions in SQLite to 3.35.0 of march 2021

2021-02-18 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: -mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[issue43179] Remove 31/32-bit s390 Linux support (s390-linux-gnu triplet)

2021-02-18 Thread STINNER Victor
STINNER Victor added the comment: I'm not sure why people insists to say that it's 31 bit CPU, gcc-s390.txt shows that it uses a classic 32-bit ABI (32-bit long/size_t): #define __SIZE_MAX__ 0xUL #define __LONG_WIDTH__ 32 31-bit is a limit of the address space (memory), not the ALU.

[issue39853] Segmentation fault with urllib.request.urlopen and threads

2021-02-18 Thread Gilles Duboscq
Gilles Duboscq added the comment: Thanks Victor we'll look into moving away from this pattern. -- ___ Python tracker ___ ___ Python

[issue42990] Improve the C code for calling Python code: _PyEval_EvalCode()

2021-02-18 Thread STINNER Victor
STINNER Victor added the comment: New changeset 44085a3fc9a150478aec1872dd1079c60dcc42f6 by Victor Stinner in branch 'master': bpo-42990: Refactor _PyFrame_New_NoTrack() (GH-24566) https://github.com/python/cpython/commit/44085a3fc9a150478aec1872dd1079c60dcc42f6 --

[issue43179] Remove 31/32-bit s390 Linux support (s390-linux-gnu triplet)

2021-02-18 Thread David Edelsohn
David Edelsohn added the comment: I am not aware of significant use of 31 bit mode. But I don't see the benefit of annoying and discouraging users who want to experiment with Python and with Linux on Z in 31 bit mode. Yes, maintenance theoretically is a burden, but there have been no recent

[issue43179] Remove 31/32-bit s390 Linux support (s390-linux-gnu triplet)

2021-02-18 Thread David Edelsohn
David Edelsohn added the comment: Victor: https://en.wikipedia.org/wiki/31-bit_computing :-) -- ___ Python tracker ___ ___ Python-b

[issue43179] Remove 31/32-bit s390 Linux support (s390-linux-gnu triplet)

2021-02-18 Thread Matej Cepl
Matej Cepl added the comment: > Do you actually know someone who is actively interested in the usecase of > building a 32 bit python on an s390x system? Or do you know someone who owns > an s390 system? Well, yes, I have just got it confirmed from our PM, SUSE has living and breathing (and w

[issue43255] Ceil division with /// operator

2021-02-18 Thread Boštjan Mejak
Boštjan Mejak added the comment: The spaceship operator is kinda cool! :) Well, I was hoping to avoid importing the math module just to have ceil division capabilities. Anyway, my need for ceiling is that I am coding a chess GUI where I have a table with 2 columns and I create a new row when

[issue43179] Remove 31/32-bit s390 Linux support (s390-linux-gnu triplet)

2021-02-18 Thread John Paul Adrian Glaubitz
John Paul Adrian Glaubitz added the comment: > But I don't see the benefit of annoying and discouraging users who want to > experiment with Python and with Linux on Z in 31 bit mode. Fully agree. > Yes, maintenance theoretically is a burden, but there have been no recent > issues that were

[issue18163] Add a 'key' attribute to KeyError

2021-02-18 Thread Andre Roberge
Change by Andre Roberge : -- nosy: +aroberge ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue43257] get_type_hints evaluates class variables before type hints

2021-02-18 Thread Josue Balandrano Coronel
New submission from Josue Balandrano Coronel : Using typing.get_type_hints() on classes returns the wrong value when a class variable has the same name as a type and a default value. For instance: from dataclasses import dataclass from typing import get_type_hints @dataclass

[issue43255] Ceil division with /// operator

2021-02-18 Thread Tim Peters
Tim Peters added the comment: (len(moves) + 1) // 2 -- nosy: +tim.peters ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue43255] Ceil division with /// operator

2021-02-18 Thread STINNER Victor
STINNER Victor added the comment: > Anyway, my need for ceiling is that I am coding a chess GUI where I have a > table with 2 columns and I create a new row whenever White makes a move. So, > my implementation for row creation is math.ceil(len(moves) // 2) where moves > is a list of chess mo

[issue2142] difflib.unified_diff(...) produces invalid patches

2021-02-18 Thread Dirkjan Ochtman
Change by Dirkjan Ochtman : -- nosy: -djc ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue43255] Ceil division with /// operator

2021-02-18 Thread Boštjan Mejak
Boštjan Mejak added the comment: My hat off to you, Mr. Peters! Your suggestion (len(moves) + 1) // 2 works perfectly and is much more elegant than --0-- len(moves) // 2. :) Mr. Stinner, in what way would int.bit_count() be beneficial to me? -- ___

[issue43255] Ceil division with /// operator

2021-02-18 Thread STINNER Victor
STINNER Victor added the comment: > Mr. Stinner, in what way would int.bit_count() be beneficial to me? I found https://www.chessprogramming.org/Population_Count when I investigated the C implementation of _Py_popcount32(), which is used by int.bit_count(). I read it when I tried to document

[issue42840] `type` takes **kwargs for __init_subclass__

2021-02-18 Thread Erik Soma
Erik Soma added the comment: The CPython PR has gone stale waiting for core review, pinging this per the dev guide. -- ___ Python tracker ___

[issue43257] get_type_hints evaluates class variables before type hints

2021-02-18 Thread Eric V. Smith
Change by Eric V. Smith : -- nosy: +eric.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue43258] Prevent needless allocation of sqlite3 aggregate function context

2021-02-18 Thread Erlend Egeberg Aasland
New submission from Erlend Egeberg Aasland : If no rows match an aggregate query, _pysqlite_step_callback() is never called, and _pysqlite_final_callback() is called once. In order to prevent needless context allocation, we should pass 0 as the second argument to sqlite3_aggregate_context().

[issue43115] locale.getlocale fails if locale is set

2021-02-18 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 18.02.2021 19:04, Eryk Sun wrote: > > Eryk Sun added the comment: > >> The APIs were written at a time where locale modifiers >> simply did mot exist. > > Technically, locale modifiers did exist circa 2000, but I suppose you mean > that they were

[issue43258] Prevent needless allocation of sqlite3 aggregate function context

2021-02-18 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- keywords: +patch pull_requests: +23348 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24569 ___ Python tracker _

[issue41847] Update "install launcher for all users" installer option

2021-02-18 Thread Zackery Spytz
Change by Zackery Spytz : -- keywords: +patch nosy: +ZackerySpytz nosy_count: 4.0 -> 5.0 pull_requests: +23349 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/24570 ___ Python tracker

[issue39448] Add regen-frozen makefile target

2021-02-18 Thread Neil Schemenauer
Neil Schemenauer added the comment: New changeset ffa55d21b4a86ad8b4a43a9f597151e526541130 by Neil Schemenauer in branch 'master': bpo-39448: Add regen-frozen makefile target. (GH-18174) https://github.com/python/cpython/commit/ffa55d21b4a86ad8b4a43a9f597151e526541130 -- __

[issue39448] Add regen-frozen makefile target

2021-02-18 Thread Neil Schemenauer
Change by Neil Schemenauer : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue43254] Fix *snprintf() man page links

2021-02-18 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +23350 pull_request: https://github.com/python/cpython/pull/24571 ___ Python tracker _

[issue43254] Fix *snprintf() man page links

2021-02-18 Thread Benjamin Peterson
Benjamin Peterson added the comment: New changeset e92d67dfbb4790df37aa6a0961fb6dc7e8d2fbbf by Erlend Egeberg Aasland in branch 'master': closes bpo-43254: Fix *snprintf() man page refs. (GH-24563) https://github.com/python/cpython/commit/e92d67dfbb4790df37aa6a0961fb6dc7e8d2fbbf --

  1   2   >