[issue43356] PyErr_SetInterrupt should have an equivalent that takes a signal number

2021-03-01 Thread Antoine Pitrou
New submission from Antoine Pitrou : PyErr_SetInterrupt() is useful if you want to simulate the effect of a SIGINT. It would be helpful to provide a similar primitive for other signal numbers, e.g. `PyErr_SetInterruptEx(int signum)`. -- components: C API messages: 387877 nosy: pitrou

[issue43244] Move PyArena C API to the internal C API

2021-03-01 Thread hai shi
Change by hai shi : -- keywords: +patch nosy: +shihai1991 nosy_count: 1.0 -> 2.0 pull_requests: +23470 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24688 ___ Python tracker

[issue43354] xmlrpc.client: Fault.faultCode erroneously documented to be a string, should be int

2021-03-01 Thread Dong-hee Na
Change by Dong-hee Na : -- nosy: +corona10 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43284] Wrong windows build in 20H2

2021-03-01 Thread Dong-hee Na
Change by Dong-hee Na : -- nosy: +corona10 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43348] XMLRPC behaves strangely under pythonw, not under python

2021-03-01 Thread Tim Magee
Tim Magee added the comment: After a peep at the source I theorised that using logRequests=False when constructing the base class, SimpleXMLRPCServer. would see me right, and so it did. When logRequests is True control ultimately passes to BaseHTTPRequestHandler.log_message which is a

[issue43355] __future__.annotations breaks inspect.signature()

2021-03-01 Thread Eric Engestrom
New submission from Eric Engestrom : We have a pytest that boils down to the following: ``` #from __future__ import annotations from inspect import Parameter, signature def foo(x: str) -> str: return x + x def test_foo(): expected = ( Parameter("x",

[issue33515] subprocess.Popen on a Windows batch file always acts as if shell=True

2021-03-01 Thread Eryk Sun
Change by Eryk Sun : -- stage: patch review -> versions: +Python 3.10, Python 3.9 -Python 2.7, Python 3.6, Python 3.7 ___ Python tracker ___

[issue19050] [Windows] fflush called on pointer to potentially closed file

2021-03-01 Thread Eryk Sun
Change by Eryk Sun : -- resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue18597] On Windows sys.stdin.readline() doesn't handle Ctrl-C properly

2021-03-01 Thread Eryk Sun
Change by Eryk Sun : -- resolution: -> out of date stage: needs patch -> resolved status: open -> closed ___ Python tracker ___

[issue8036] raise ValueError for empty `path` in os.spawnv[e]

2021-03-01 Thread Eryk Sun
Eryk Sun added the comment: The internal spawn function in ucrt, common_spawnv(), verifies its parameters as follows: _VALIDATE_RETURN(file_name != nullptr, EINVAL, -1); _VALIDATE_RETURN(file_name[0]!= '\0',EINVAL, -1); _VALIDATE_RETURN(arguments != nullptr,

[issue43354] xmlrpc.client: Fault.faultCode erroneously documented to be a string, should be int

2021-03-01 Thread Paul Ganssle
Paul Ganssle added the comment: The evidence you have here seems pretty compelling and this change seems straightforward enough. I don't see an expert listed here, but I'm happy to merge a docs PR fixing this. Probably a good idea to make a PR to typeshed in parallel, in case they have

[issue43353] Document that logging.getLevelName() can return a numeric value.

2021-03-01 Thread Vinay Sajip
Vinay Sajip added the comment: Sure, I'll look at a PR that mentions the other usage above the "changed in 3.4" section. -- ___ Python tracker ___

[issue43342] Error while using Python C API

2021-03-01 Thread Piyush Patel
Piyush Patel added the comment: Hi Thanks for your time. Just wanted to add that earlier I used PyImport_AddModule(""__main__"). but now I used PyImport_ImportModule(""__main__") resolved the issue for me regardless of installation path it worked. Thanks Piyush -- resolution:

[issue43344] RotatingFileHandler breaks file type associations

2021-03-01 Thread Vinay Sajip
Vinay Sajip added the comment: As per the documentation at https://docs.python.org/3/library/logging.handlers.html#logging.handlers.BaseRotatingHandler.namer You can set the handler's "namer" attribute to a callable that returns a computed name for the rotated file - this can be computed as

[issue43349] [doc] incorrect tuning(7) manpage link

2021-03-01 Thread miss-islington
miss-islington added the comment: New changeset 643939a07e480ed88a6eca9793157f1c695a418e by Miss Islington (bot) in branch '3.8': closes bpo-43349: Fix tuning(7) manpage hyperlink. (GH-24680) https://github.com/python/cpython/commit/643939a07e480ed88a6eca9793157f1c695a418e --

[issue43349] [doc] incorrect tuning(7) manpage link

2021-03-01 Thread Benjamin Peterson
Benjamin Peterson added the comment: New changeset f4d7d46cb48aa3a1bf3c2c7e2d7d71cbf49dea69 by Erlend Egeberg Aasland in branch 'master': closes bpo-43349: Fix tuning(7) manpage hyperlink. (GH-24680) https://github.com/python/cpython/commit/f4d7d46cb48aa3a1bf3c2c7e2d7d71cbf49dea69

[issue43349] [doc] incorrect tuning(7) manpage link

2021-03-01 Thread miss-islington
Change by miss-islington : -- pull_requests: +23469 pull_request: https://github.com/python/cpython/pull/24685 ___ Python tracker ___

[issue43349] [doc] incorrect tuning(7) manpage link

2021-03-01 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +23468 pull_request: https://github.com/python/cpython/pull/24684 ___ Python tracker

[issue34064] subprocess functions with shell=1 pass wrong command to win32 shell

2021-03-01 Thread Eryk Sun
Change by Eryk Sun : -- resolution: -> third party stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue43348] XMLRPC behaves strangely under pythonw, not under python

2021-03-01 Thread Tim Magee
Tim Magee added the comment: Fragment more info. First a typo in the description, at the end of the MTR "unexpected connection" should read "unexpected disconnection" of course (no-one expects the unexpected connection ho ho). Looking at calls to socket functions, Procmon shows the client

[issue33245] Unable to send CTRL_BREAK_EVENT

2021-03-01 Thread Eryk Sun
Change by Eryk Sun : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Windows: SystemError during os.kill(..., signal.CTRL_C_EVENT) ___ Python tracker

[issue43354] xmlrpc.client: Fault.faultCode erroneously documented to be a string, should be int

2021-03-01 Thread Jürgen Gmach
New submission from Jürgen Gmach : I created a XMLRPC API (via Zope), which gets consumed by a C# application. C#'s XMLRPC lib expects an `int` for the `faultCode` but I currently return a string, as this is the type which is currently documented in the official docs

[issue43350] [sqlite3] Active statements are reset twice in _pysqlite_query_execute()

2021-03-01 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Hm, I guess we could use sqlite3_stmt_busy() instead of the in_use flag. -- ___ Python tracker ___

[issue43351] `RecursionError` during deallocation

2021-03-01 Thread Andrew V. Jones
Andrew V. Jones added the comment: Same logic, but this crashes: ``` def loop(): a_node = boost_python_library.get_linked_list() temp = [] while True: assert a_node is not None temp.append(a_node) prev = a_node # <-- comment this out to make the crash go

[issue14597] Cannot unload dll in ctypes until script exits

2021-03-01 Thread Eryk Sun
Eryk Sun added the comment: Automatically decrementing the reference count of a shared library (e.g. via WinAPI FreeLibrary or POSIX dlclose) when a CDLL instance is finalized would require significant design changes to ensure that all ctypes pointers, scalars, and aggregates that reference

[issue43351] `RecursionError` during deallocation

2021-03-01 Thread Andrew V. Jones
Andrew V. Jones added the comment: Here's some representative code that triggers the issue: ``` def loop(): a_node = boost_python_library.get_linked_list() all_elems = [] while a_node is not None: # # Uncomment the below to make the crash disappear #

[issue33105] os.path.isfile returns false on Windows when file path is longer than 260 characters

2021-03-01 Thread Eryk Sun
Eryk Sun added the comment: I'm closing this as not a bug. If the process limits DOS paths to MAX_PATH, then checking os.path.isfile() should not be special cased to support longer DOS paths because calling open() on such a path will raise FileNotFoundError. My suggestion in msg314126 to

[issue31447] proc communicate not exiting on python subprocess timeout using PIPES

2021-03-01 Thread Eryk Sun
Eryk Sun added the comment: I'm changing this to a documentation issue and removing the Windows component. The documentation doesn't make it clear that communicate() may block indefinitely (in both POSIX and Windows) even after the process has terminated. As currently implemented, this

[issue43350] [sqlite3] Active statements are reset twice in _pysqlite_query_execute()

2021-03-01 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: > There are three calls of pysqlite_statement_reset() in > _pysqlite_query_execute() Yes, but only two before the cache is queried. > So additional call of pysqlite_statement_reset() does not harm. That's true, but removing redundant code makes it

[issue43350] [sqlite3] Active statements are reset twice in _pysqlite_query_execute()

2021-03-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There are three calls of pysqlite_statement_reset() in _pysqlite_query_execute(). And all three of them can be called with the same statement object. But repeated calls are no-ops because pysqlite_statement_reset() clears flag in_use and calls

[issue43342] Error while using Python C API

2021-03-01 Thread Eric V. Smith
Eric V. Smith added the comment: You're going to get more help by posting your question elsewhere. This isn't a forum where we can help you debug your code: it's for reporting bugs in Python. You might try https://discuss.python.org/c/users/, or maybe the python-list mailing list. Good

[issue43353] Document that logging.getLevelName() can return a numeric value.

2021-03-01 Thread Mariusz Felisiak
New submission from Mariusz Felisiak : Can we document[1] that `logging.getLevelName()` returns a numeric value when corresponding string is passed in (related with https://bugs.python.org/issue1008295). I know that we have "Changed in version 3.4" annotation but I think it's worth

[issue43352] Add a Barrier object in asyncio lib

2021-03-01 Thread Yves Duprat
New submission from Yves Duprat : Add a synchronized primitive Barrier in asyncio, in order to be consistent with them we have for threading. Barrier object will have a similar design from that of threading lib. (May be we have to think about a backport ?) Initial discussion started here:

[issue43330] xmlrpc.Server URI query and fragment are discarded from HTTP query since py3

2021-03-01 Thread Julien Castiaux
Change by Julien Castiaux : -- keywords: +patch pull_requests: +23467 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24683 ___ Python tracker ___

[issue11717] conflicting definition of ssize_t in pyconfig.h

2021-03-01 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue11717] conflicting definition of ssize_t in pyconfig.h

2021-03-01 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset c994ffe69553cbb34f1cea6a4494d6e7657f41b0 by Jozef Grajciar in branch 'master': bpo-11717: fix ssize_t redefinition error when targeting 32bit Windows app (GH-24479)

[issue43271] AMD64 Windows10 3.x crash with Windows fatal exception: stack overflow

2021-03-01 Thread Mark Shannon
Mark Shannon added the comment: PEP 651 would prevent any crashes, although some of the tests might still fail with a StackOverflowException, if they weren't expecting a RecursionError. -- ___ Python tracker

[issue43351] `RecursionError` during deallocation

2021-03-01 Thread Andrew V. Jones
New submission from Andrew V. Jones : I am currently working with "porting" some code from Python 2.7.14 to Python 3.7.5, but the process running the Python code seems to terminate in the following way: ``` #0 0x2ef63337 in raise () from /lib64/libc.so.6 #1 0x2ef64a28 in

[issue43340] json.load() can raise UnicodeDecodeError, but this is not documented

2021-03-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: json.loads() accepts also data encoded with UTF-16 and UTF-32. -- nosy: +serhiy.storchaka ___ Python tracker ___

[issue43350] [sqlite3] Active statements are reset twice in _pysqlite_query_execute()

2021-03-01 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- keywords: +patch pull_requests: +23466 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24681 ___ Python tracker

[issue43350] [sqlite3] Active statements are reset twice in _pysqlite_query_execute()

2021-03-01 Thread Erlend Egeberg Aasland
New submission from Erlend Egeberg Aasland : In _pysqlite_query_execute(), if the cursor already has a statement object, it is reset twice before the cache is queried. -- components: Library (Lib) messages: 387850 nosy: berker.peksag, erlendaasland, serhiy.storchaka priority: normal

[issue43349] [doc] incorrect tuning(7) manpage link

2021-03-01 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- keywords: +patch pull_requests: +23465 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24680 ___ Python tracker

[issue41837] Upgrade installers to OpenSSL 1.1.1j

2021-03-01 Thread miss-islington
miss-islington added the comment: New changeset 982e8ecbdf216bc1fa285a4ff45c84c6778856e5 by Miss Islington (bot) in branch '3.9': bpo-41837: Update macOS installer build to use OpenSSL 1.1.1j. (GH-24677) https://github.com/python/cpython/commit/982e8ecbdf216bc1fa285a4ff45c84c6778856e5

[issue41837] Upgrade installers to OpenSSL 1.1.1j

2021-03-01 Thread miss-islington
miss-islington added the comment: New changeset e2f6ed89aeaa0b723f45f914dba92e1b42518395 by Miss Islington (bot) in branch '3.8': bpo-41837: Update macOS installer build to use OpenSSL 1.1.1j. (GH-24677) https://github.com/python/cpython/commit/e2f6ed89aeaa0b723f45f914dba92e1b42518395