[issue42531] importlib.resources.path() raises TypeError for packages without __file__

2020-12-01 Thread William Schwartz
New submission from William Schwartz : Suppose pkg is a package, it contains a resource r, pkg.__spec__.origin is None, and p = importlib.resources.path(pkg, r). Then p.__enter__() raises a TypeError in Python 3.7 and 3.8. (The problem has been fixed in 3.9). The error can be demonstrated by

[issue42507] test_ttk_guionly test failures on macOS with Tcl/Tk 8.6.10

2020-12-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Can I get a remote access to machine with macOS? -- ___ Python tracker ___ ___

[issue42522] [C API] Add _Py_Borrow() private function: call Py_XDECREF() and return the object

2020-12-01 Thread STINNER Victor
STINNER Victor added the comment: I had more time to think about this issue. First, I decided to always include "pythoncapi_compat.h" and so there is no strict requirement to add new C API functions to Python. Second, the _Py_Borrow() function looked nice, but there is a practical issue:

[issue42525] Optimize class/module level annotation

2020-12-01 Thread Inada Naoki
Inada Naoki added the comment: I agree with Batuhan. Although bytecode for class annotations seems inefficient, it is difficult to optimize without breaking backward compatibility. You can write arbitrary code in class/module block which dynamically manipulate __annotations__. ``` class

[issue40939] Remove the old parser

2020-12-01 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +22474 pull_request: https://github.com/python/cpython/pull/23606 ___ Python tracker ___

[issue40939] Remove the old parser

2020-12-01 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Seems that commit 1ed83adb0e95305af858bd41af531e487f54fee7 was deleting some functions that were not correctly covered by redirection macros. I have opened PR 23606 to restore those as they were. -- ___

[issue42523] using windows doc incorrectly states version support

2020-12-01 Thread Ned Deily
Change by Ned Deily : -- nosy: +steve.dower ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42521] Debug (-d) mode not working in 3.9

2020-12-01 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch pull_requests: +22475 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23607 ___ Python tracker

[issue41625] Add splice() to the os module

2020-12-01 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Seems that adding #include does not work so I am going to skip adding this function on AIX. If someone is interested in fixing it, they can remove the #ifdef and figure out what's going on with that buildbot --

[issue42328] ttk style.map function incorrectly handles the default state for element options.

2020-12-01 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +22479 pull_request: https://github.com/python/cpython/pull/23612 ___ Python tracker ___

[issue42521] Debug (-d) mode not working in 3.9

2020-12-01 Thread anthony shaw
anthony shaw added the comment: thanks, it would be great if this were documented in the --help section like the other options which require a debug build (-X showrefcount) -- ___ Python tracker

[issue40939] Remove the old parser

2020-12-01 Thread Igor Skochinsky
Igor Skochinsky added the comment: Attached is a sample program which works on 3.9 but fails linking with 3.10.0a2 The .so is missing the symbol: igor@LAPTOP:~/py_limited_api_example$ nm /home/igor/lib/libpython3.9.so | grep Py_CompileString 00212720 T Py_CompileString

[issue41625] Add splice() to the os module

2020-12-01 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +22476 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/23608 ___ Python tracker ___

[issue41625] Add splice() to the os module

2020-12-01 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: https://buildbot.python.org/all/#/builders/526/builds/3 -- ___ Python tracker ___ ___

[issue42530] Pickle Serialization Mangles NllLossBackward Objects in Tensor Objects

2020-12-01 Thread Daniel Kostecki
New submission from Daniel Kostecki : torch.nn.functional.nll_loss returns Tensor objects which contain a loss value as well as a grad_fn object. Pickle does not throw an exception when serializing (dumps) the Tensor object. When loading (loads) the serialized data, the grad_fn object is

[issue42531] importlib.resources.path() raises TypeError for packages without __file__

2020-12-01 Thread William Schwartz
Change by William Schwartz : -- keywords: +patch pull_requests: +22477 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23611 ___ Python tracker

[issue40939] Remove the old parser

2020-12-01 Thread Guido van Rossum
Guido van Rossum added the comment: Hm, I wonder if there's a typo here in pythonrun.c: /* For use in Py_LIMITED_API */ #undef Py_CompileString PyObject * PyCompileString(const char *str, const char *filename, int start) { return Py_CompileStringFlags(str, filename, start, NULL); }

[issue40939] Remove the old parser

2020-12-01 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 46bd5ed94cf3d5e03f45eecf9afea1659980c8bf by Pablo Galindo in branch 'master': bpo-40939: Restore some stable API functions incorrectly deleted (GH-23606) https://github.com/python/cpython/commit/46bd5ed94cf3d5e03f45eecf9afea1659980c8bf

[issue40939] Remove the old parser

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

[issue42328] ttk style.map function incorrectly handles the default state for element options.

2020-12-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your report David. I have not Windows 7 and does not know how to reproduce this on Windows 10 so will just skip tests for specific themes on Windows 7. -- ___ Python tracker

[issue42521] Debug (-d) mode not working in 3.9

2020-12-01 Thread STINNER Victor
STINNER Victor added the comment: > thanks, it would be great if this were documented in the --help section like > the other options which require a debug build (-X showrefcount) PyConfig.show_ref_count documentation explains that a debug build is required: "Need a debug build of Python

[issue42530] Pickle Serialization Mangles NllLossBackward Objects in Tensor Objects

2020-12-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Torch is not the part of the standard Python library. Please file the report on the Torch bug tracker. -- nosy: +serhiy.storchaka resolution: -> third party stage: -> resolved status: open -> closed ___ Python

[issue42521] Debug (-d) mode not working in 3.9

2020-12-01 Thread STINNER Victor
STINNER Victor added the comment: In PyConfig, I chose to name the option "parser_debug" rather than the very generic "debug" name :-) """ Parser debug mode. If greater than 0, turn on parser debugging output (for expert only, depending on compilation options). Incremented by the -d

[issue41625] Add splice() to the os module

2020-12-01 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Started custom build of PR 23608 in https://buildbot.python.org/all/#/buildrequests/84365 -- ___ Python tracker ___

[issue42470] DeprecationWarning triggers for sequences which happen to be sets as well

2020-12-01 Thread Raymond Hettinger
Raymond Hettinger added the comment: >>> Do you want to submit a PR for this? > > Sure. Do you think the code I proposed would be suitable? Yes. It will need tests and a news entry as well. -- assignee: -> rhettinger ___ Python tracker

[issue42523] using windows doc incorrectly states version support

2020-12-01 Thread Zackery Spytz
Change by Zackery Spytz : -- keywords: +patch nosy: +ZackerySpytz nosy_count: 2.0 -> 3.0 pull_requests: +22472 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23603 ___ Python tracker

[issue31904] Python should support VxWorks RTOS

2020-12-01 Thread STINNER Victor
STINNER Victor added the comment: New changeset e483d281bd55be0beee3e62d18e0719175bde671 by pxinwr in branch 'master': bpo-31904: Fix test_netrc for VxWorks RTOS (GH-21675) https://github.com/python/cpython/commit/e483d281bd55be0beee3e62d18e0719175bde671 --

[issue42529] CPython DLL initialization routine failed from PYC cache file

2020-12-01 Thread Steve Dower
Steve Dower added the comment: There really shouldn't be any difference between those two paths, apart from skipping the compile step in the second case. It sounds like you're pretty well set up for testing, so would you be able to try the test while running under either the Visual Studio

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

2020-12-01 Thread Bar Harel
Bar Harel added the comment: It relinquishes control for exactly one event loop cycle. You'll see that it takes two or three cycles and then gets cancelled correctly. The reason being is that recovery from your `await asyncio.sleep(1)` takes two or three cycles. (Under the hood, a few

[issue42521] Debug (-d) mode not working in 3.9

2020-12-01 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: I cannot reproduce it either in 3.9. Building 3.9 in debug mode and using -d works as expected -- ___ Python tracker ___

[issue42521] Debug (-d) mode not working in 3.9

2020-12-01 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Also, note the -d flag activates the debug mode **in the parser**, not in the tokenizer. -- ___ Python tracker ___

[issue39573] [C API] Make PyObject an opaque structure in the limited C API

2020-12-01 Thread STINNER Victor
STINNER Victor added the comment: I created the https://github.com/pythoncapi/upgrade_pythoncapi project which updates automatically a C extension to newer C API. For example, it uses Py_TYPE(), Py_SIZE(), Py_REFCNT(), Py_SET_SIZE(), Py_SET_SIZE() and Py_SET_REFCNT() functions. --

[issue37221] PyCode_New API change breaks backwards compatibility policy

2020-12-01 Thread miss-islington
miss-islington added the comment: New changeset d9d63f13cf5b6b896c245099c42b08f6da083d05 by Miss Islington (bot) in branch '3.8': bpo-37221: PyCode_New() didn't change in Python 3.8 (GH-23595) https://github.com/python/cpython/commit/d9d63f13cf5b6b896c245099c42b08f6da083d05 --

[issue37221] PyCode_New API change breaks backwards compatibility policy

2020-12-01 Thread miss-islington
miss-islington added the comment: New changeset ed4614386f210964840daa1f7cbddbbd575f7a49 by Miss Islington (bot) in branch '3.9': bpo-37221: PyCode_New() didn't change in Python 3.8 (GH-23595) https://github.com/python/cpython/commit/ed4614386f210964840daa1f7cbddbbd575f7a49 --

[issue42529] CPython DLL initialization routine failed from PYC cache file

2020-12-01 Thread Karl Nelson
New submission from Karl Nelson : While trying to use JPype on Windows Python 3.9.0, we are running into an bizarre issue with loading the internal module which is written in C. When running a python script the first time the internal module loads correctly. However, the second time that

[issue42525] Optimize class/module level annotation

2020-12-01 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: Would it require a substantial amount of changes? If so, I don't think this is a critical optimization since nearly-all of class definitions happens on the module level and evaluated on the import time only once. -- nosy: +BTaskaya

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

2020-12-01 Thread Andrew Svetlov
Andrew Svetlov added the comment: Agree, not a bug. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___

[issue42528] Improve the docs of most Py*_Check{,Exact} API calls

2020-12-01 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue32830] tkinter documentation suggests "from tkinter import *", contradicting PEP8

2020-12-01 Thread Tom Middleton
Tom Middleton added the comment: While I agree that it shouldn't be imposed on changing previous code, changing the documentation isn't changing the previous code it is encouraging future code. I think that the documentation should have a caveat. I'm seeing a lot of new code using tkinter

[issue42526] Exceptions in asyncio.Server callbacks are not retrievable

2020-12-01 Thread Tom
Tom added the comment: How do you suggest one might test code in a Server callback with asyncio? Of course, I don't want any old exception to affect another client connection, only an exception which is uncaught up to the handler coro. And I'm not suggesting that it happen by default, only

[issue10486] http.server doesn't set all CGI environment variables

2020-12-01 Thread Senthil Kumaran
Change by Senthil Kumaran : -- keywords: +patch pull_requests: +22473 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/23604 ___ Python tracker

[issue42526] Exceptions in asyncio.Server callbacks are not retrievable

2020-12-01 Thread Andrew Svetlov
Andrew Svetlov added the comment: You can use try/except in handler() and dispatch the exception whatever you want. It doesn't require a new asyncio version, debug-only flag, etc. -- ___ Python tracker

[issue10486] http.server doesn't set all CGI environment variables

2020-12-01 Thread Senthil Kumaran
Senthil Kumaran added the comment: I spent some time reviewing and researching the specification. It also says The server is not required to create meta-variables for all the header fields that it receives. And this in issue, open since 2010, we have issue two different set of

[issue5054] CGIHTTPRequestHandler.run_cgi() HTTP_ACCEPT improperly parsed

2020-12-01 Thread Senthil Kumaran
Change by Senthil Kumaran : -- assignee: -> orsenthil versions: +Python 3.10, Python 3.9 -Python 2.6, Python 2.7, Python 3.1, Python 3.2 ___ Python tracker ___

[issue42519] [C API] Upgrade the C API in extension modules

2020-12-01 Thread STINNER Victor
STINNER Victor added the comment: New changeset 00d7abd7ef588fc4ff0571c8579ab4aba8ada1c0 by Victor Stinner in branch 'master': bpo-42519: Replace PyMem_MALLOC() with PyMem_Malloc() (GH-23586) https://github.com/python/cpython/commit/00d7abd7ef588fc4ff0571c8579ab4aba8ada1c0 --

[issue42519] [C API] Upgrade the C API in extension modules

2020-12-01 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +22461 pull_request: https://github.com/python/cpython/pull/23587 ___ Python tracker ___

[issue24506] make fails with gcc 4.9 due to fatal warning of unused variable and empty macro in Parser/pgen.c

2020-12-01 Thread Irit Katriel
Irit Katriel added the comment: This macro is no longer in the codebase. -- nosy: +iritkatriel resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker

[issue42519] [C API] Upgrade the C API in extension modules

2020-12-01 Thread STINNER Victor
New submission from STINNER Victor : Python has around 118 extension modules. Most of them are quite old and still use the old way to write C extensions. I created this issue as a placeholder to modernize the code using my new tool: https://github.com/pythoncapi/upgrade_pythoncapi For

[issue42519] [C API] Upgrade the C API in extension modules

2020-12-01 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +22460 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23586 ___ Python tracker ___

[issue42520] add_dll_directory only accepts absolute paths

2020-12-01 Thread Antony Lee
New submission from Antony Lee : os.add_dll_directory appears to only accept absolute paths, inheriting this restriction from AddDllDirectory. That's absolutely fine, but could perhaps be mentioned in the docs (https://docs.python.org/3/library/os.html#os.add_dll_directory), especially

[issue42238] Deprecate suspicious.py?

2020-12-01 Thread Julien Palard
Julien Palard added the comment: I'll try to track this closely, the drop of `make suspicious` has been merged in master, but not backported yet, one week ago. Up to today, no commit has introduced suspicious warnings (0 false positive, 0 false negative). I think I'll soon backport the PR,

[issue31904] Python should support VxWorks RTOS

2020-12-01 Thread STINNER Victor
STINNER Victor added the comment: New changeset b2d0c66e881301ed8908da3cb41bbf253c449b0c by pxinwr in branch 'master': bpo-31904: Fix fifo test cases for VxWorks (GH-20254) https://github.com/python/cpython/commit/b2d0c66e881301ed8908da3cb41bbf253c449b0c --

[issue42519] [C API] Upgrade the C API in extension modules

2020-12-01 Thread STINNER Victor
STINNER Victor added the comment: New changeset 32bd68c839adb7b42af12366ab0892303115d1d1 by Victor Stinner in branch 'master': bpo-42519: Replace PyObject_MALLOC() with PyObject_Malloc() (GH-23587) https://github.com/python/cpython/commit/32bd68c839adb7b42af12366ab0892303115d1d1 --

[issue24429] msvcrt error when embedded

2020-12-01 Thread Irit Katriel
Irit Katriel added the comment: This is a python 2.7-only issue. -- nosy: +iritkatriel resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker

[issue21195] None float format: incomplete documentation

2020-12-01 Thread Irit Katriel
Irit Katriel added the comment: Python 2.7-only issue. -- nosy: +iritkatriel resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker ___

[issue23946] Invalid timestamps reported by os.stat() when Windows FILETIME structures are mistakenly reset.

2020-12-01 Thread Irit Katriel
Irit Katriel added the comment: The code of posixmodule.c looks very different now. It this issue still relevant? -- nosy: +iritkatriel status: open -> pending ___ Python tracker

[issue15104] Unclear language in __main__ description

2020-12-01 Thread Irit Katriel
Irit Katriel added the comment: Fixed for Python 3, too late for Python 2. -- nosy: +iritkatriel resolution: -> fixed stage: needs patch -> resolved status: open -> closed ___ Python tracker

[issue42508] macOS IDLE with Tk 8.6.10 in 3.9.1rc1 universal2 installer fails smoke test

2020-12-01 Thread Terry J. Reedy
Change by Terry J. Reedy : -- stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42532] spec_arg's __bool__ is called while initializing NonCallableMock

2020-12-01 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch nosy: +python-dev nosy_count: 1.0 -> 2.0 pull_requests: +22480 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23613 ___ Python tracker

[issue42532] spec_arg's __bool__ is called while initializing NonCallableMock

2020-12-01 Thread Idan Weiss
Change by Idan Weiss : -- components: Library (Lib) nosy: idanweiss97 priority: normal severity: normal status: open title: spec_arg's __bool__ is called while initializing NonCallableMock type: behavior versions: Python 3.10, Python 3.8, Python 3.9

[issue22455] idna/punycode give wrong results on narrow builds

2020-12-01 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue42521] Debug (-d) mode not working in 3.9

2020-12-01 Thread anthony shaw
New submission from anthony shaw : I noticed since the new parser implementation, the debug mode in the tokeniser is no longer working. This is the case for 3.9.0 and also 3.9.1rc1. Running python3.9 with a simple application like this: # Demo application def my_function(): proceed

[issue42522] [C API] Add Py_Borrow() function: call Py_XDECREF() and return the object

2020-12-01 Thread hai shi
Change by hai shi : -- nosy: +shihai1991 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue31990] Pickling deadlocks in thread with python -m

2020-12-01 Thread Werner Smidt
Werner Smidt added the comment: Sorry for being lacking in providing some OS info. b Opensuse Tumbleweed, Linux kernel 5.8.10-1, Intel system I cannot explain why, but relating to Sara's answer, if you remove the .join() statements at the end, you get the following exception:

[issue4724] setting f_exc_traceback aborts in debug builds

2020-12-01 Thread Irit Katriel
Irit Katriel added the comment: 2.7-only issue. -- nosy: +iritkatriel resolution: -> out of date stage: needs patch -> resolved status: open -> closed ___ Python tracker ___

[issue17852] Built-in module _io can lose data from buffered files in reference cycles

2020-12-01 Thread miss-islington
miss-islington added the comment: New changeset 4a44f53aa85c9400471ab084bc8fd8169065fc41 by Miss Islington (bot) in branch '3.9': [3.9] bpo-17852: Doc: Fix the tutorial about closing files (GH-23135) (GH-23527) https://github.com/python/cpython/commit/4a44f53aa85c9400471ab084bc8fd8169065fc41

[issue41626] port shebang of tools from python2 to python3

2020-12-01 Thread hai shi
hai shi added the comment: I create PR23581 to remove the inner Tools' shebang. But I am not remove Tools/ssl/make_ssl_data.py, Tools/gdb/libpython.py in PR23581. * To make_ssl_data.py, I guess Christian may give us some guide. * libpython.py will be installed in kinds of OS, some OS will

[issue41626] port shebang of tools from python2 to python3

2020-12-01 Thread hai shi
Change by hai shi : -- nosy: +christian.heimes ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue22376] urllib2.urlopen().read().splitlines() opening a directory in a FTP server randomly returns incorrect result

2020-12-01 Thread Irit Katriel
Irit Katriel added the comment: 2.7 backport is no longer possible. -- nosy: +iritkatriel resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker

[issue19570] distutils' Command.ensure_dirname fails on Unicode

2020-12-01 Thread Irit Katriel
Irit Katriel added the comment: Python 2-only issue. -- nosy: +iritkatriel resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker ___

[issue42518] Error Message

2020-12-01 Thread Kshitish
Kshitish added the comment: Please do not talk like behave properly. I know here I am wrong but it is not way to talk to some one like that. I respect your knowledge but maintain your language. Okay! I send you new file with full research. Please check it out and thank you --

[issue42518] Error Message

2020-12-01 Thread Christian Heimes
Change by Christian Heimes : -- resolution: -> not a bug status: open -> closed type: security -> behavior ___ Python tracker ___

[issue42522] [C API] Add _Py_Borrow() private function: call Py_XDECREF() and return the object

2020-12-01 Thread STINNER Victor
STINNER Victor added the comment: My proposed function doesn't have to be public. I updated the issue and my PR to propose to add a *private* function to clarify that it should not be used unless you understand what you do. -- title: [C API] Add Py_Borrow() function: call

[issue42521] Debug (-d) mode not working in 3.9

2020-12-01 Thread Lysandros Nikolaou
Lysandros Nikolaou added the comment: Hi Anthony, could it be that your 3.9 is not a debug build, while the others are? We only enable parser debug ouput when Python has been build --with-pydebug. Building the 3.9.0 tag --with-pydebug works fine for me. --

[issue42522] [C API] Add _Py_Borrow() private function: call Py_XDECREF() and return the object

2020-12-01 Thread STINNER Victor
STINNER Victor added the comment: In the meanwhile, I modified my upgrade_pythoncapi.py tool to include pythoncapi_compat.h, and I added _Py_Borrow() and _Py_XBorrow() to pythoncapi_compat.h: * https://github.com/pythoncapi/upgrade_pythoncapi *

[issue42522] [C API] Add Py_Borrow() function: call Py_XDECREF() and return the object

2020-12-01 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +22462 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23591 ___ Python tracker ___

[issue17454] ld_so_aix not used when linking c++ (scipy)

2020-12-01 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue41626] port shebang of tools from python2 to python3

2020-12-01 Thread Christian Heimes
Christian Heimes added the comment: make_ssl_data.py is an internal tool that generates internal header files. It's rarely used. The tool is not bound to any Python version, too. Feel free to change the shebang or leave it as it is. I don't care. --

[issue42522] [C API] Add Py_Borrow() function: call Py_XDECREF() and return the object

2020-12-01 Thread Ronald Oussoren
Ronald Oussoren added the comment: I'm -1 on adding this API as it is inherently unsafe and is bound to be used in locations where its contract is not honoured (especially outside of the core). Note that the pre-condition on the argument is that you now only own a reference to the object,

[issue42518] Error Message

2020-12-01 Thread Kshitish
Kshitish added the comment: Look tell why you close this In the argument: print (5 + 2 == 7 and 10 <= 1232 != 10 ^ 100 <= 100) 10 <= 1232 != 10 ^ 100 <= 100 10 <= 1232 is true 10 ^ 100 <= 100 is false These two argument compares by != So, this statement must be true. Overall: print (5

[issue42518] Error Message

2020-12-01 Thread Paul Moore
Paul Moore added the comment: You need to learn about chained comparisons in Python. This is not a bug. Please stop reopening it. -- status: open -> closed ___ Python tracker

[issue42523] using windows doc incorrectly states version support

2020-12-01 Thread Numerlor
New submission from Numerlor : In this paragraph, the using windows doc page dynamically adjusts the version to the one that's being looked at by the user, however the statement is no longer true for python 3.9 and above as support for vista/7 was dropped > As specified in PEP 11, a Python

[issue42522] [C API] Add _Py_Borrow() private function: call Py_XDECREF() and return the object

2020-12-01 Thread Ronald Oussoren
Ronald Oussoren added the comment: A private function is less problematic, but still far from ideal. Any use of the function is IMHO a code smell that should be refactored. I'm primarily against this function in the public API because it will be used where it isn't appropriate because it

[issue31990] Pickling deadlocks in thread with python -m

2020-12-01 Thread Sara Kelley
Sara Kelley added the comment: >python3 -m testqueuepickle3.py >It hangs. I see this hang too. If you only specify the module name it does not hang. python3 -m testqueuepickle3 -- nosy: +serakeri ___ Python tracker

[issue22187] commands.mkarg() buggy in East Asian locales

2020-12-01 Thread Irit Katriel
Irit Katriel added the comment: Python 2 only issue. -- nosy: +iritkatriel resolution: -> out of date stage: needs patch -> resolved status: open -> closed ___ Python tracker

[issue42519] [C API] Upgrade the C API in extension modules

2020-12-01 Thread hai shi
Change by hai shi : -- nosy: +shihai1991 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41837] Upgrade installers to OpenSSL 1.1.1h

2020-12-01 Thread Christian Heimes
Christian Heimes added the comment: You may want to hold off until next week: https://mta.openssl.org/pipermail/openssl-announce/2020-December/000186.html OpenSSL 1.1.i is a security-fix release. The highest severity issue fixed in this release is HIGH. --

[issue42522] [C API] Add Py_Borrow() function: call Py_XDECREF() and return the object

2020-12-01 Thread STINNER Victor
New submission from STINNER Victor : I'm working on a script to migrate old C extension modules to the latest flavor of the Python C API: https://github.com/pythoncapi/upgrade_pythoncapi I would like to replace frame->f_code with PyFrame_GetCode(frame). The problem is that frame->f_code is a

[issue42522] [C API] Add Py_Borrow() function: call Py_XDECREF() and return the object

2020-12-01 Thread STINNER Victor
STINNER Victor added the comment: Ronald Oussoren: "I'm -1 on adding this API as it is inherently unsafe and is bound to be used in locations where its contract is not honoured (especially outside of the core)." I'm trying to update old C extensions which already rely on borrowed

[issue23946] Invalid timestamps reported by os.stat() when Windows FILETIME structures are mistakenly reset.

2020-12-01 Thread Eryk Sun
Eryk Sun added the comment: > The code of posixmodule.c looks very different now. The conversion code was moved to FILE_TIME_to_time_t_nsec() in Python/fileutils.c. time_t is a signed 64-bit integer type, so there's no immediate problem storing 1601-01-01 as the negative (pre-epoch) Unix

[issue42522] [C API] Add _Py_Borrow() private function: call Py_XDECREF() and return the object

2020-12-01 Thread STINNER Victor
STINNER Victor added the comment: > BTW. Have you considered using coccinelle > instead of a python script? I wrote Python code just because I like Python. There are likely other more advanced tools like coccinelle, but Python users are

[issue40421] [C API] Add getter functions for PyFrameObject and maybe move PyFrameObject to the internal C API

2020-12-01 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +22464 pull_request: https://github.com/python/cpython/pull/23598 ___ Python tracker ___

[issue39947] [C API] Make the PyThreadState structure opaque (move it to the internal C API)

2020-12-01 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +22467 pull_request: https://github.com/python/cpython/pull/23598 ___ Python tracker ___

[issue37194] Move new vector private declarations to the internal C API

2020-12-01 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +22466 pull_request: https://github.com/python/cpython/pull/23598 ___ Python tracker ___

[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-12-01 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +22465 pull_request: https://github.com/python/cpython/pull/23598 ___ Python tracker ___

[issue42524] pdb access to return value

2020-12-01 Thread Romuald Brunet
New submission from Romuald Brunet : When using the pdb module, there is currently no way to easy access the current return value of the stack This return value is accessed by the 'retval command' I propose using the currently unused argument to allow storing the return value in the local

[issue37221] PyCode_New API change breaks backwards compatibility policy

2020-12-01 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 9.0 -> 10.0 pull_requests: +22468 pull_request: https://github.com/python/cpython/pull/23599 ___ Python tracker

[issue37221] PyCode_New API change breaks backwards compatibility policy

2020-12-01 Thread miss-islington
Change by miss-islington : -- pull_requests: +22469 pull_request: https://github.com/python/cpython/pull/23600 ___ Python tracker ___

[issue42522] [C API] Add _Py_Borrow() private function: call Py_XDECREF() and return the object

2020-12-01 Thread Ronald Oussoren
Ronald Oussoren added the comment: I totally understand, I would have done the same. Coccinelle looks like an interesting tool for refactorings like this, but I prefer to write Python scripts (and often just refactor manually). -- ___ Python

[issue37221] PyCode_New API change breaks backwards compatibility policy

2020-12-01 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +22463 pull_request: https://github.com/python/cpython/pull/23595 ___ Python tracker ___

  1   2   >