[issue34013] Inconsistent SyntaxError for print

2021-02-18 Thread Terry J. Reedy
Terry J. Reedy added the comment: 'Consistency' is in the eye of the beholder in that it is relative to some ideal. 'Inconsistent' has too much baggage as bad'. I would prefer to call the current rule 'restricted' or 'limited' and judge any expansion on its own merits. The arguments to pr

[issue34013] Inconsistent SyntaxError for print

2021-02-18 Thread Ammar Askar
Ammar Askar added the comment: It's still one of the most common beginner mistakes, personally I think the trade-off in complexity at least for the grammar level fix is worth it here. -- nosy: +ammar2 ___ Python tracker

[issue34013] Inconsistent SyntaxError for print

2021-02-18 Thread Vedran Čačić
Vedran Čačić added the comment: Aren't we overthinking this? Python 2 is a dead language. It has reached end of life more than a year ago (and was scheduled to do so in 2015). Why are we still trying to accomodate something that stopped being relevant a long time ago? -- nosy: +veky

[issue43260] Never release buffer when MemoryError in print()

2021-02-18 Thread Ramin Farajpour Cami
Change by Ramin Farajpour Cami : -- type: -> crash ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue43262] "_weakrefset.py", line 56: IndexError: pop from empty list

2021-02-18 Thread Jinghao Shi
New submission from Jinghao Shi : One of our asyncio based application sporadically crash due to this stack trace: ``` File ".../lib/python3.8/asyncio/runners.py", line 48, in run loop.run_until_complete(loop.shutdown_asyncgens()) File ".../lib/python3.8/asyncio/base_events.py", line 595,

[issue43260] Never release buffer when MemoryError in print()

2021-02-18 Thread Ramin Farajpour Cami
Ramin Farajpour Cami added the comment: Python 3.9.1 (tags/v3.9.1:1e5d33e, Dec 7 2020, 16:33:24) [MSC v.1928 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> print("a"*10) Traceback (most recent call last): File "", line 1, in Memo

[issue43260] Never release buffer when MemoryError in print()

2021-02-18 Thread Ramin Farajpour Cami
Ramin Farajpour Cami added the comment: Version : Python 3.8.5 (tags/v3.8.5:580fbb0, Jul 20 2020, 15:43:08) [MSC v.1926 32 bit (Intel)] on win32 -- ___ Python tracker ___ _

[issue43261] Python 3.9 repair on Windows do not recover pip module

2021-02-18 Thread Svyatoslav
New submission from Svyatoslav : I by mistake run command `pip install -U pip setuptools wheel` on Windows which deleted pip and did not install a new version. I decided to repair Python using 3.9.1 installer option. But after repair pip still was not installed. -- components: Windows

[issue43223] [security] http.server: Open Redirection if the URL path starts with //

2021-02-18 Thread Hamza AVvan
Hamza AVvan added the comment: As for the directory issue, not only .ssh but an attacker can use any directory to make the open redirection exploitable. And as for the HTTP Header Location, the server does not remove extra trailing slash from the PAYLOAD uri, which seems to be the cause of v

[issue43259] argparse: allow add_mutually_exclusive_group on add_argument_group

2021-02-18 Thread paul j3
paul j3 added the comment: The mutually exclusive arguments are displayed with in the argument group, at least in my testing. From a copy-n-paste of your example: In [8]: parser.print_help() usage: ipython3 [-h] [--from-args FROM_ARGS | --from-files FROM_FILES | --from-stdin

[issue43260] Never release buffer when MemoryError in print()

2021-02-18 Thread Ramin Farajpour Cami
Change by Ramin Farajpour Cami : -- title: Never release buffer when MemoryError in prtin() -> Never release buffer when MemoryError in print() ___ Python tracker ___

[issue43260] Never release buffer when MemoryError in prtin()

2021-02-18 Thread Ramin Farajpour Cami
New submission from Ramin Farajpour Cami : Hi, When we use "a"*100 in print("a"*100) function, Show "MemoryError",Again i use print("1") again display "MemoryError", I think memory not release for use again, >>> print("a"*10) Traceback (most recent call last): F

[issue43259] argparse: allow add_mutually_exclusive_group on add_argument_group

2021-02-18 Thread hai shi
Change by hai shi : -- nosy: +paul.j3, rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

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

2021-02-18 Thread Eryk Sun
Eryk Sun added the comment: > but at least for clean installs of 3.10 we can avoid the need > for admin completely Except updating PATHEXT always requires admin access. I do this manually by setting a user PATHEXT variable with %PATHEXT% as the first item and append the extensions that I ne

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

2021-02-18 Thread Guido van Rossum
Guido van Rossum added the comment: I'll try to review it in the coming weeks. -- ___ Python tracker ___ ___ Python-bugs-list maili

[issue43246] Dict copy optimization violates subclass invariant

2021-02-18 Thread Inada Naoki
Inada Naoki added the comment: I am not sure this should be fixed. If so, I think we should use PyDict_CheckExact() instead of PyDict_Check() && (tp_iter is overridden || keys() is overridden || sq_item is overridden). -- nosy: +rhettinger ___ Pyt

[issue43259] argparse: allow add_mutually_exclusive_group on add_argument_group

2021-02-18 Thread Christoph Anton Mitterer
New submission from Christoph Anton Mitterer : Hey. AFAIU, the sole purpose of ArgumentParser.add_argument_group() is for the grouping within the help output. It would be nice, if one could create a mutually exclusive group (with ArgumentParser.add_mutually_exclusive_group) from/within such

[issue43254] Fix *snprintf() man page links

2021-02-18 Thread miss-islington
miss-islington added the comment: New changeset 138488750512b47f1773630f90e92ec5038b6978 by Miss Islington (bot) in branch '3.9': closes bpo-43254: Fix *snprintf() man page refs. (GH-24563) https://github.com/python/cpython/commit/138488750512b47f1773630f90e92ec5038b6978 -- ___

[issue43254] Fix *snprintf() man page links

2021-02-18 Thread miss-islington
miss-islington added the comment: New changeset 8a42eb1492dec2ec0cc79146f0c817acb7328b19 by Miss Islington (bot) in branch '3.8': closes bpo-43254: Fix *snprintf() man page refs. (GH-24563) https://github.com/python/cpython/commit/8a42eb1492dec2ec0cc79146f0c817acb7328b19 -- ___

[issue43254] Fix *snprintf() man page links

2021-02-18 Thread miss-islington
Change by miss-islington : -- pull_requests: +23351 pull_request: https://github.com/python/cpython/pull/24572 ___ 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 --

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

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

[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

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

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

[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

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

[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

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

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

[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

[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

[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

[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

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

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

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

[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

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

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

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

[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

[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

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

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

[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

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

[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

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

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

[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

[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

[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

[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

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

[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

[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

[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

[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

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

[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

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

[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

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

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

[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

[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

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

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

[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

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

[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

[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
Change by STINNER Victor : -- pull_requests: +23345 pull_request: https://github.com/python/cpython/pull/24564 ___ 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

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

[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

[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

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

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

[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

[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

[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

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

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

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

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

[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

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

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

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

  1   2   >