[issue43620] os.path.join does not use os.sep as documentation claims

2021-03-24 Thread Eryk Sun
Eryk Sun added the comment: The documentation of os.path.join() uses os.sep because it's written from the perspective of the platform's os.path, which is posixpath on a POSIX system and ntpath on a Windows system. If you need to work with POSIX paths in Windows, then use posixpath. It will

[issue43454] [sqlite3] Add support for R*Tree callbacks

2021-03-24 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Attached is a patch that auto-detects R*Tree support. Tested on macOS only, but I'd guess it should work fine on any OS. -- Added file: https://bugs.python.org/file49914/patch.diff ___ Python tracker

[issue43198] One operation on sets < 1/100th as efficient in 3.9 than before

2021-03-24 Thread Raymond Hettinger
Change by Raymond Hettinger : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue43198] One operation on sets < 1/100th as efficient in 3.9 than before

2021-03-24 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset 72789592a3491bab49f144bb292679b1484885d9 by Raymond Hettinger in branch 'master': bpo-43198: Revert 3dd2157 that removed freeslot tracking. (#25010) https://github.com/python/cpython/commit/72789592a3491bab49f144bb292679b1484885d9

[issue43618] random.shuffle loses most of the elements

2021-03-24 Thread Raymond Hettinger
Change by Raymond Hettinger : -- nosy: +skrah ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43618] random.shuffle loses most of the elements

2021-03-24 Thread Raymond Hettinger
Change by Raymond Hettinger : -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43511] tkinter with Tk 8.6.11 is slow on macOS

2021-03-24 Thread Thomas Wamm
Thomas Wamm added the comment: tkinter performance on Windows 10 looks okay, no obvious problems. Attached is a transcript showing bench.py results for Pythons 3.8.2, 3.9.2, and 3.10.0a6 on Windows 10 on a Dell laptop with an Intel i5-8250U CPU (medium good speed, a good comparison to Apple

[issue43620] os.path.join does not use os.sep as documentation claims

2021-03-24 Thread Jared Sutton
New submission from Jared Sutton : The behavior of os.path.join() does not match the documentation, in regards to the use of os.sep. From the docs: """ The return value is the concatenation of path and any members of *paths with exactly one directory separator (os.sep) following each

[issue43614] Search is not beginner friendly

2021-03-24 Thread Kamil Turek
Change by Kamil Turek : -- nosy: +kamilturek ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43619] convenience of using create_datagram_endpoint (and friends)

2021-03-24 Thread Roman Valov
New submission from Roman Valov : Please check the attached source code. I have to implement an UDP server listening on all interfaces and able to detect what is the local address is used to communicate with remote address. In order to do this I'm using a temporary socket connected to exact

[issue22239] asyncio: nested event loop

2021-03-24 Thread David Brochart
David Brochart added the comment: Regarding the initial message in this issue, and enabling recursive event loops, this has proved to be very useful when an event loop is already running and some non-async code needs to run async code. This situation is very frequent when e.g. a library is

[issue41064] Specialise syntax error of **dict in f-string field

2021-03-24 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 8efad61963809d239cac986e3f3bc4cb505ab8fe by Pablo Galindo in branch 'master': bpo-41064: Improve syntax error for invalid usage of '**' in f-strings (GH-25006)

[issue41064] Specialise syntax error of **dict in f-string field

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

[issue43618] random.shuffle loses most of the elements

2021-03-24 Thread Tim Peters
Tim Peters added the comment: Are you sure it's "a list"? At least print out `type(questions_element)`. `random.shuffle()` doesn't contain any code _capable_ of changing a list's length. It only does indexed accessing of the list: ... for i in reversed(range(1, len(x))): # pick

[issue43606] PySimpleGUI: initial huge window & no widgets visible

2021-03-24 Thread FRANK BENNETT
FRANK BENNETT added the comment: Roundup requires submission inplain text...forget how to turn this off in thunderbird...sounds like a left over from microsoft emailers...how do I see/respond to comments with an issue ? On 3/24/21 9:37 AM, Serhiy Storchaka wrote: > Serhiy Storchaka added

[issue43618] random.shuffle loses most of the elements

2021-03-24 Thread Eric V. Smith
Eric V. Smith added the comment: Same advice as issue 43616: please provide an example we can run. This most likely a problem with how you're using lxml, and not a bug in python. But since we can't test it, we can't know for sure. -- nosy: +eric.smith

[issue42964] Draft PEP blob etc

2021-03-24 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue43613] gzip.compress and gzip.decompress are sub-optimally implemented.

2021-03-24 Thread Irit Katriel
Change by Irit Katriel : -- components: +Library (Lib) ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43616] random.shuffle() crashes with Unhandled exception

2021-03-24 Thread Irit Katriel
Change by Irit Katriel : -- components: +Library (Lib) ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43618] random.shuffle loses most of the elements

2021-03-24 Thread Irit Katriel
Change by Irit Katriel : -- components: +Library (Lib) ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43618] random.shuffle loses most of the elements

2021-03-24 Thread Rowan Sylvester-Bradley
New submission from Rowan Sylvester-Bradley : This issue is probably related to issue ??? but I have created it as a separate issue. When shuffle doesn't crash it sometimes (or maybe always - I haven't fully analysed this yet) looses most of the elements in the list that it is supposed to be

[issue43616] random.shuffle() crashes with Unhandled exception

2021-03-24 Thread Raymond Hettinger
Change by Raymond Hettinger : -- nosy: +skrah ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43617] Missing definition in configure.ac causing autoreconf to create damaged configure script

2021-03-24 Thread Cong Ma
Cong Ma added the comment: > The extra macros are provided by optional packages. On Fedora and > Debian/Ubuntu the package is called autoconf-archive. Thank you very much. This (and the patch) is clearing things up for me a lot. At first I thought I was supposed to copy the m4 files over

[issue41551] test.support has way too many imports in libregrtest

2021-03-24 Thread hai shi
hai shi added the comment: bpo-41718 -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41551] test.support has way too many imports in libregrtest

2021-03-24 Thread hai shi
hai shi added the comment: There have another related issue and have been fixed now in bpo 41718. So I suggest to close this bpo. -- resolution: -> duplicate stage: -> resolved status: open -> closed ___ Python tracker

[issue43511] tkinter with Tk 8.6.11 is slow on macOS

2021-03-24 Thread E. Paine
E. Paine added the comment: As this appears to be a Tk issue, I have created https://core.tcl-lang.org/tk/tktview/f642d7c0f4. -- ___ Python tracker ___

[issue43511] tkinter with Tk 8.6.11 is slow on macOS

2021-03-24 Thread E. Paine
E. Paine added the comment: > there appears to be a tk 8.6.11.1 release This was the version I used when testing Wish on both MacOS and Linux. -- ___ Python tracker ___

[issue43481] PyEval_EvalCode() namespace issue not observed in Python 2.7.

2021-03-24 Thread Terry J. Reedy
Terry J. Reedy added the comment: Perhaps both. If you want more discussion, please post to python-list. -- ___ Python tracker ___

[issue32592] Drop support of Windows Vista and Windows 7

2021-03-24 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: > If we had a dedicated maintainer who was supporting Win7 and making releases > for it, then we (i.e. they) could support it. But then, there's nothing to > stop someone doing that already, and even to stop them charging money for it > if they want (which

[issue43616] random.shuffle() crashes with Unhandled exception

2021-03-24 Thread Raymond Hettinger
Change by Raymond Hettinger : -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40601] [C API] Hide static types from the limited C API

2021-03-24 Thread Guido van Rossum
Guido van Rossum added the comment: FWIW I have an idea that would allow code using e.g. _Type to continue to work, and even ABI compatible (though only in the main interpreter). // In some header file PyAPI_FUNC(PyHeapTypeObject *) PyList_GetType(); #define PyList_Type

[issue43617] Missing definition in configure.ac causing autoreconf to create damaged configure script

2021-03-24 Thread Christian Heimes
Change by Christian Heimes : -- keywords: +patch pull_requests: +23771 stage: -> patch review pull_request: https://github.com/python/cpython/pull/25016 ___ Python tracker

[issue43614] Search is not beginner friendly

2021-03-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Ha! I just was going to open the same issue (perhaps we read the same post on Quora). I concur that it is perhaps worth to add index entries for common parameter names (args, kwargs, self, cls) and also for *args and **kwargs and add notions that such

[issue43617] Missing definition in configure.ac causing autoreconf to create damaged configure script

2021-03-24 Thread Christian Heimes
Christian Heimes added the comment: The extra macros are provided by optional packages. On Fedora and Debian/Ubuntu the package is called autoconf-archive. -- nosy: +christian.heimes ___ Python tracker

[issue43606] PySimpleGUI: initial huge window & no widgets visible

2021-03-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: PySimpleGUI is not a part of the stdlib. If you have problems with pure Tkinter, look if you have files .Xdefaults or .Xresources in your home directory. They can alter default look of Tk widgets. Try to remove them and test whether the problem is gone.

[issue42137] Prefer using __spec__ over module_repr() for ModuleType.__repr__

2021-03-24 Thread Brett Cannon
Change by Brett Cannon : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue42137] Prefer using __spec__ over module_repr() for ModuleType.__repr__

2021-03-24 Thread Brett Cannon
Brett Cannon added the comment: New changeset 9cb31d671646a5ff0901f79d2d61022621447190 by Brett Cannon in branch 'master': bpo-42137: have ModuleType.__repr__ prefer __spec__ over module_repr() (GH-24953) https://github.com/python/cpython/commit/9cb31d671646a5ff0901f79d2d61022621447190

[issue43605] Issue of scopes unclear in documentation, or wrongly implemented

2021-03-24 Thread Cong Ma
Cong Ma added the comment: I think this is in the same class of behaviours as ``` def func(l): def get(i): return l[i] print(eval("(lambda x: get(x))(0)")) # Call anonymous lambda with the constant 0 as argument ``` Calls like ``func(["spam"])`` will not "work", and

[issue43481] PyEval_EvalCode() namespace issue not observed in Python 2.7.

2021-03-24 Thread Chris Morton
Chris Morton added the comment: Is this change in behavior considered to be by design or is this issue an unintended consequence? It seems inconsistent that comprehensions have no visibility of variable previously defined in the same scoping for this particular use-case. Is there a way to

[issue43617] Missing definition in configure.ac causing autoreconf to create damaged configure script

2021-03-24 Thread STINNER Victor
STINNER Victor added the comment: Ah, maybe the configure.ac comment should be updated to suggest running "autoconf" instead ;-) -- ___ Python tracker ___

[issue43617] Missing definition in configure.ac causing autoreconf to create damaged configure script

2021-03-24 Thread Cong Ma
Cong Ma added the comment: >From the configure.ac file: > dnl *** > dnl * Please run autoreconf to test your changes! * > dnl *** I take it to mean "if configure.ac is changed, run autoreconf first", and

[issue43617] Missing definition in configure.ac causing autoreconf to create damaged configure script

2021-03-24 Thread STINNER Victor
STINNER Victor added the comment: > If ``autoreconf`` is run, ... I never used autoreconf. If you don't run it, ./configure works fine. I only use "autoconf" and "autoheader". $ ./configure --enable-optimizations --enable-shared (...) $ grep semantic Makefile CONFIGURE_CFLAGS_NODIST=

[issue43615] [PATCH] Properly implement Py_UNREACHABLE macro using autoconf.

2021-03-24 Thread Cong Ma
Cong Ma added the comment: > If you consider that there is a bug, please open a new issue since you closed > this one. Please see the follow up in Issue 43617. Many thanks for bearing with me. -- ___ Python tracker

[issue43617] Missing definition in configure.ac causing autoreconf to create damaged configure script

2021-03-24 Thread Cong Ma
Change by Cong Ma : -- type: -> compile error ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43617] Missing definition in configure.ac causing autoreconf to create damaged configure script

2021-03-24 Thread Cong Ma
New submission from Cong Ma : The problem --- In the repository, the definition for ``AX_CHECK_COMPILE_FLAG`` in Python's ``configure.ac`` file is missing. If ``autoreconf`` is run, an invalid ``configure`` script is generated. The following is the behaviour of running

[issue43616] random.shuffle() crashes with Unhandled exception

2021-03-24 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: Could you post code that fully reproduces the problem? I suspect the root cause for the bug is in lxml (a third-party library), not in CPython itself. -- nosy: +Jelle Zijlstra ___ Python tracker

[issue43615] [PATCH] Properly implement Py_UNREACHABLE macro using autoconf.

2021-03-24 Thread STINNER Victor
STINNER Victor added the comment: > BTW, do we need to fix the missing definition of the AX_CHECK_COMPILE_FLAG > macro in configure.ac? This is a separate problem, if a problem at all. I'm not sure which problem you are trying to solve. If you consider that there is a bug, please open a new

[issue32592] Drop support of Windows Vista and Windows 7

2021-03-24 Thread Steve Dower
Steve Dower added the comment: > not sure about the strategies here but maybe a better approach would be to > kill support for unsupported version of windows in a major release We do, but the "major" release is the second field of the version number (you can think of the first field as the

[issue43615] [PATCH] Properly implement Py_UNREACHABLE macro using autoconf.

2021-03-24 Thread STINNER Victor
STINNER Victor added the comment: > The headers Python.h and also the ones pulled in by it were actually from > Python 3.8 release, which unconditionally defines the macro as a call to > Py_FatalError. Using __builtin_unreachable() is a recent change (bpo-38249), Python 3.9.0: * commit

[issue43615] [PATCH] Properly implement Py_UNREACHABLE macro using autoconf.

2021-03-24 Thread Cong Ma
Cong Ma added the comment: BTW, do we need to fix the missing definition of the AX_CHECK_COMPILE_FLAG macro in configure.ac? This is a separate problem, if a problem at all. -- resolution: -> not a bug stage: -> resolved status: open -> closed

[issue43615] [PATCH] Properly implement Py_UNREACHABLE macro using autoconf.

2021-03-24 Thread Cong Ma
Cong Ma added the comment: Hello Victor, I think you're right. This is bogus on my part. TL;DR: The Python version is 3.8 but I was trying to understand what's going on using the latest source. Full version: I was trying to understand why the following C file when compiled with -shared

[issue43616] random.shuffle() crashes with Unhandled exception

2021-03-24 Thread Rowan Sylvester-Bradley
New submission from Rowan Sylvester-Bradley : When I do random.shuffle(questions_element) (questions_element is an element generated by lxml via the code questions_element = exams.find("questions") ) I get a crash: Unhandled exception at 0x7FFD7AE8EF89 (ntdll.dll) in python.exe:

[issue43615] [PATCH] Properly implement Py_UNREACHABLE macro using autoconf.

2021-03-24 Thread STINNER Victor
STINNER Victor added the comment: > The current implementation tests the ``__GNUC__`` and ``__GNUC_MINOR__`` > macros as the logic (GCC version >= 4.5) for determining whether the compiler > intrinsic ``__builtin_unreachable()`` is present (see commits eebaa9bf, > 24ba3b0d). However, Clang

[issue43615] [PATCH] Properly implement Py_UNREACHABLE macro using autoconf.

2021-03-24 Thread Cong Ma
New submission from Cong Ma : (This is a summarized form of the commit message in the attached patch. I'm submitting a patch instead of a PR over GitHub, because it seems that the ``autoreconf`` output files are part of the repository. In order for the changes to take effect in the repo, I

[issue2001] Pydoc interactive browsing enhancement

2021-03-24 Thread STINNER Victor
STINNER Victor added the comment: The "getfile" feature has a directory traversal vulnerability and so I propose to remove the feature: see bpo-42988. -- nosy: +vstinner ___ Python tracker

[issue42988] [security] CVE-2021-3426: Information disclosure via pydoc -p: /getfile?key=path allows to read arbitrary file on the filesystem

2021-03-24 Thread STINNER Victor
STINNER Victor added the comment: The "pydoc -p port" command only listen on the local link ("localhost") by default, even if it's possible to listen on another IPv4 address using -n HOSTNAME command line option. While the "getfile" feature is convenient when the pydoc server is accessed

[issue43606] PySimpleGUI: initial huge window & no widgets visible

2021-03-24 Thread FRANK BENNETT
FRANK BENNETT added the comment: fwb@fw:/s/opt/cpython/debug$ ./python -V Python 3.10.0a6+ -- ___ Python tracker ___ ___

[issue42988] [security] CVE-2021-3426: Information disclosure via pydoc -p: /getfile?key=path allows to read arbitrary file on the filesystem

2021-03-24 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +23770 pull_request: https://github.com/python/cpython/pull/25015 ___ Python tracker ___

[issue43511] tkinter with Tk 8.6.11 is slow on macOS

2021-03-24 Thread E. Paine
E. Paine added the comment: The reduction in speed with later Tk versions does not seem to occur on Linux. See the below table (times are microseconds per iteration - tested using wish): ++--+--+ | Tk Version | clearing | not clearing |

[issue41100] Support macOS 11 and Apple Silicon Macs

2021-03-24 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +23769 pull_request: https://github.com/python/cpython/pull/25014 ___ Python tracker ___

[issue32592] Drop support of Windows Vista and Windows 7

2021-03-24 Thread Mitja kocjančič
Mitja kocjančič added the comment: not sure about the strategies here but maybe a better approach would be to kill support for unsupported version of windows in a major release since I guess python 3 was a complete rewrite of python2 (at least the low level side I assume it was) and it

[issue43511] tkinter with Tk 8.6.11 is slow on macOS

2021-03-24 Thread Ronald Oussoren
Ronald Oussoren added the comment: One thing to look into: there appears to be a tk 8.6.11.1 release, I have no idea what changed in this micro release. -- ___ Python tracker

[issue43511] tkinter with Tk 8.6.11 is slow on macOS

2021-03-24 Thread Ronald Oussoren
Ronald Oussoren added the comment: If this is a Tk issue we should report it in their bug tracker. I'm definitely against switching to an older version of Tk, the most recent release fixes a lot of problems with Tk on macOS. Correctness before performance. How bad is the performance

[issue43511] tkinter with Tk 8.6.11 is slow on macOS

2021-03-24 Thread Thomas Wamm
Thomas Wamm added the comment: I ran the bench.py and bench.tcl programs from E. Paine (epaine) on my M1 Mac Mini. Attached is a commented Terminal transcript. The tl;dr summary again is that Python 3.10.0a6 arm64 for Apple silicon is 3 to 100 times SLOWER than earlier pythons compiled for

[issue32592] Drop support of Windows Vista and Windows 7

2021-03-24 Thread Steve Dower
Steve Dower added the comment: FWIW, the installer change was only to forcibly warn naive users that they need to stick with the previous version, so I wouldn't read much into it. It's easily rolled back. The real issue is that we need to decide how to drop support _somehow_, and following

[issue43606] PySimpleGUI: initial huge window & no widgets visible

2021-03-24 Thread E. Paine
E. Paine added the comment: Apologies, you did give the platform and Python version. I presume you are compiling the master branch, in which case do you have the 'tk8.6-dev' package installed? -- ___ Python tracker

[issue43606] PySimpleGUI: initial huge window & no widgets visible

2021-03-24 Thread E. Paine
E. Paine added the comment: That example also works on my setup (see attached). The only reason I could think that your label is not showing is that the font given is not of a valid format (see https://www.tcl.tk/man/tcl8.6/TkCmd/font.htm#M13), though I would have thought this would raise a

[issue43614] Search is not beginner friendly

2021-03-24 Thread Anthony Flury
New submission from Anthony Flury : A commonly asked question on Quora is 'What do *args and **kwargs' mean ? While it is relatively easy for community to answer these questions the search tool on the standard documentation doesn't make it easy. I understand that 'args' and 'kwargs' are both

[issue43547] support ZIP files with zeroed out fields (e.g. for reproducible builds)

2021-03-24 Thread Hans-Christoph Steiner
Hans-Christoph Steiner added the comment: > - For full reproducible builds you may have to write files to zipfiles in a > well-defined order. That already works fine now, we've been doing that with Python for years. But that leaves it up to the implemented to do. I suppose zipfile could

[issue43613] gzip.compress and gzip.decompress are sub-optimally implemented.

2021-03-24 Thread Ruben Vorderman
Change by Ruben Vorderman : -- type: -> performance ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43612] zlib.compress should have a wbits argument

2021-03-24 Thread Ruben Vorderman
Change by Ruben Vorderman : -- type: -> enhancement ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43612] zlib.compress should have a wbits argument

2021-03-24 Thread Ruben Vorderman
Change by Ruben Vorderman : -- keywords: +patch pull_requests: +23768 stage: -> patch review pull_request: https://github.com/python/cpython/pull/25011 ___ Python tracker ___

[issue42914] pprint numbers with underscore

2021-03-24 Thread Gregory P. Smith
Gregory P. Smith added the comment: Thanks for the contribution Stéphane! I agree that this would be a nice default. We're just being conservative in the pace of default behavior changes. Changing the default could be considered in the future after a few releases with this parameter have

[issue42914] pprint numbers with underscore

2021-03-24 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset 3ba3d513b1e3c63d09cb798b982a9e6c369cea4c by sblondon in branch 'master': bpo-42914: add a pprint underscore_numbers option (GH-24864) https://github.com/python/cpython/commit/3ba3d513b1e3c63d09cb798b982a9e6c369cea4c --

[issue43613] gzip.compress and gzip.decompress are sub-optimally implemented.

2021-03-24 Thread Raymond Hettinger
Change by Raymond Hettinger : -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43613] gzip.compress and gzip.decompress are sub-optimally implemented.

2021-03-24 Thread Ruben Vorderman
New submission from Ruben Vorderman : When working on python-isal which aims to provide faster drop-in replacements for the zlib and gzip modules I found that the gzip.compress and gzip.decompress are suboptimally implemented which hurts performance. gzip.compress and gzip.decompress both do

[issue43198] One operation on sets < 1/100th as efficient in 3.9 than before

2021-03-24 Thread Raymond Hettinger
Change by Raymond Hettinger : -- keywords: +patch pull_requests: +23767 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/25010 ___ Python tracker

[issue43612] zlib.compress should have a wbits argument

2021-03-24 Thread Ruben Vorderman
New submission from Ruben Vorderman : zlib.compress can now only be used to output zlib blocks. Arguably `zlib.compress(my_data, level, wbits=-15)` is even more useful as it gives you a raw deflate block. That is quite interesting if you are writing your own file format and want to use