[issue42850] Process hangs when calling urllib.request in a multiprocessing.Process with import of sounddevice package

2021-01-08 Thread Robin Scheibler
Robin Scheibler added the comment: Thanks for the suggestion. I had indeed run into some issues with fork vs spawn before. I have tested with 3.8.5 and 3.9.1 and the bug doesn't occur with these more recent versions. Should I leave the bug open since 3.7 is still supported ? --

[issue42800] Traceback objects allow accessing frame objects without triggering audit hooks

2021-01-08 Thread Ryan Hileman
Ryan Hileman added the comment: Oops, by tb_code I meant traceback.tb_frame.f_code. So you can get to a frame from traceback.tb_frame (without triggering audit) or sys._getframe (which has an audit hook already), and you can get to __code__ from a frame via frame.f_code (without triggering

[issue42871] Regex compilation crashed if I change order of alternatives under quantifier

2021-01-08 Thread Renji
Renji added the comment: I through "forward reference" is "\1 (abcd)". Not "some sort of reference in second repetition to data from first repetition". Ok. In other words refers from on repetition to other supported, but with purely formal restrictions. And remove this restrictions don't

[issue42871] Regex compilation crashed if I change order of alternatives under quantifier

2021-01-08 Thread Matthew Barnett
Matthew Barnett added the comment: Example 1: ((a)|b\2)* ^^^ Group 2 ((a)|b\2)* ^^ Reference to group 2 The reference refers backwards to the group. Example 2: (b\2|(a))* ^^^ Group 2 (b\2|(a))* ^^ Reference to group 2

[issue42800] Traceback objects allow accessing frame objects without triggering audit hooks

2021-01-08 Thread Ryan Hileman
Ryan Hileman added the comment: I'm definitely not proposing to hook all of object.__getattr__, as my intuition says that would be very slow. I simply refer to "object.__getattr__" as the event name used by a couple of rare event audit hooks. This is how getting __code__ is emitted:

[issue42871] Regex compilation crashed if I change order of alternatives under quantifier

2021-01-08 Thread Renji
Renji added the comment: In my example reference and capture group presents in two difference alternatives. They don't follow each other, but executed in random order. If this don't supported in one case, why it supported in other case? -- ___

[issue42871] Regex compilation crashed if I change order of alternatives under quantifier

2021-01-08 Thread Matthew Barnett
Matthew Barnett added the comment: It's not a crash. It's complaining that you're referring to group 2 before defining it. The re module doesn't support forward references to groups, but only backward references to them. -- ___ Python tracker

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

2021-01-08 Thread Erik Soma
Erik Soma added the comment: Seems I misframed the issue a bit. I didn't realize keyword arguments besides 'metaclass' were introduced with PEP 3115 with Python 3.0. In any case I've posted a PR to update the docs and typeshed. Typeshed PR for reference:

[issue42800] Traceback objects allow accessing frame objects without triggering audit hooks

2021-01-08 Thread STINNER Victor
STINNER Victor added the comment: Even if no audit hook is registered, adding an audit event on a function has a cost on runtime performance. object.__getattr__() is a core Python function, if an event is added, we should properly measure the performance overhead to decide if it's

[issue42800] Traceback objects allow accessing frame objects without triggering audit hooks

2021-01-08 Thread STINNER Victor
STINNER Victor added the comment: I don't think that audit hooks should be seen as a way to build a robust sandbox. https://www.python.org/dev/peps/pep-0578/#why-not-a-sandbox -- ___ Python tracker

[issue42800] Traceback objects allow accessing frame objects without triggering audit hooks

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

[issue42800] Traceback objects allow accessing frame objects without triggering audit hooks

2021-01-08 Thread Ryan Hileman
Ryan Hileman added the comment: traceback's `tb_code` attribute also allows you to bypass the `object.__getattr__` audit event for `__code__`. Perhaps accessing a traceback object's `tb_code` and `tb_frame` should both raise an `object.__getattr__` event? -- nosy: +lunixbochs2

[issue42871] Regex compilation crashed if I change order of alternatives under quantifier

2021-01-08 Thread Renji
New submission from Renji : I can compile "((a)|b\2)*" expression and this expression successfully return captures from first repetition and second repetition in one time. But if I write (b\2|(a))* expression, I get "invalid group reference 2 at position 3" error. Either first or second

[issue42867] Entry Widget not editable on Windows 10, but is on Linux Ubuntu 16.04

2021-01-08 Thread Terry J. Reedy
Terry J. Reedy added the comment: I added this note to #9673 after rereading the posts and the 2010 tkinter list thread. "My testing was inadequate. From #42867, it appears that 0. the bug is limited to Windows; 1. opening a canned dialog or message box is part of getting the buggy

[issue9673] Entry Widget Not Editable under Windows XP with dialog call.

2021-01-08 Thread Terry J. Reedy
Terry J. Reedy added the comment: My testing was inadequate. From #42867, it appears that 0. the bug is limited to Windows; 1. opening a canned dialog or message box is part of getting the buggy behavior; 2. timing is involved; 3. the bug can be exhibited on Windows directly with wish/tk,

[issue9694] argparse required arguments displayed under "optional arguments"

2021-01-08 Thread Miro Hrončok
Miro Hrončok added the comment: https://bugs.python.org/issue42870 -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue42870] Document changed argparse output wrt optional arguments in What's new in Python 3.10

2021-01-08 Thread Miro Hrončok
New submission from Miro Hrončok : A followup from https://bugs.python.org/issue9694 Could the change in output please be mentioned on https://docs.python.org/3.10/whatsnew/3.10.html ? In Fedora, at least 3 packages fail tests because of the change: ipython:

[issue42849] pool worker can't be terminated

2021-01-08 Thread Terry J. Reedy
Terry J. Reedy added the comment: 3.7 has not gotten bug fixes for a couple of years. This needs to be verified on a current release. -- nosy: +davin, pitrou, terry.reedy ___ Python tracker

[issue42802] distutils: Remove bdist_wininst command

2021-01-08 Thread STINNER Victor
Change by STINNER Victor : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue42820] Sphinx conf.py needs_version entry is outdated

2021-01-08 Thread Terry J. Reedy
Terry J. Reedy added the comment: This is related to #42843, which is about deciding what the min sphinx should be. Since the alternative to 3.2 is some 2.x, 1,8 is certainly wrong. -- nosy: +terry.reedy ___ Python tracker

[issue42802] distutils: Remove bdist_wininst command

2021-01-08 Thread STINNER Victor
STINNER Victor added the comment: New changeset 0e2a0f72cc9af0899eacb5604e44a563c0b06110 by Victor Stinner in branch 'master': bpo-42802: Remove distutils bdist_wininst command (GH-24043) https://github.com/python/cpython/commit/0e2a0f72cc9af0899eacb5604e44a563c0b06110 --

[issue42825] Build libraries with "/OPT:REF" linker optimization on Windows

2021-01-08 Thread Terry J. Reedy
Terry J. Reedy added the comment: The PR says that this deletes "uncalled code". I imagine that this is safe for a .exe. But for a .dll? As i understand it, one can, from python code, access any function via ctypes, so it seems to me that there is no way for the linker to know which

[issue42820] Sphinx conf.py needs_version entry is outdated

2021-01-08 Thread Terry J. Reedy
Change by Terry J. Reedy : -- nosy: +mdk ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

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

2021-01-08 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- pull_requests: +23002 pull_request: https://github.com/python/cpython/pull/24175 ___ Python tracker ___

[issue42869] pydoc does not append .html to documentation

2021-01-08 Thread Julien Palard
Julien Palard added the comment: This is now fixed on the docs server thanks to [1], so it should work for already release Python 3.9 :) [1]: https://github.com/python/psf-salt/pull/198 I still did a PR on cpython to avoid a redirection, and get cpython itself out of the "people use this

[issue42869] pydoc does not append .html to documentation

2021-01-08 Thread Julien Palard
Change by Julien Palard : -- keywords: +patch pull_requests: +23001 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24174 ___ Python tracker ___

[issue42869] pydoc does not append .html to documentation

2021-01-08 Thread Julien Palard
New submission from Julien Palard : Running `python3 -m pydoc ensurepip` gives me: https://docs.python.org/3.9/library/ensurepip but it should be: https://docs.python.org/3.9/library/ensurepip.html Issue is in getdocloc function on the line: docloc = "%s/%s" % (docloc.rstrip("/"),

[issue42812] @overload-ing method of parent class without actual implementation

2021-01-08 Thread Terry J. Reedy
Change by Terry J. Reedy : -- nosy: +gvanrossum, levkivskyi ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42807] smtplib send_message should gives more clear exception if the msg is None

2021-01-08 Thread Terry J. Reedy
Terry J. Reedy added the comment: I am not familiar with either smtp or email, but I can make some general comments. 1. "AttributeError: 'NoneType' object has no attribute 'get_all'" seems pretty straightforward to me. Hard to debug? Depends on knowledge and experience. When coming from

[issue42862] Use functools.lru_cache iso. _sqlite.Cache in sqlite3 module

2021-01-08 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: $ python3.10 -m timeit -s 'import sqlite3; con = sqlite3.connect(":memory:"); query="select * from sqlite_master"' 'con.execute(query); con.execute(query)' 10 loops, best of 5: 2.95 usec per loop $ ./python.exe -m timeit -s 'import sqlite3; con =

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

2021-01-08 Thread Erik Soma
Change by Erik Soma : -- keywords: +patch pull_requests: +23000 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24173 ___ Python tracker ___

[issue42780] os.set_inheritable() fails for O_PATH file descriptors on Linux

2021-01-08 Thread cptpcrd
Change by cptpcrd : -- pull_requests: +22999 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24172 ___ Python tracker ___

[issue42269] Add ability to set __slots__ in dataclasses

2021-01-08 Thread Yurii Karabas
Yurii Karabas <1998uri...@gmail.com> added the comment: Hi Eric, I tried to help you with this feature and have opened a PR. I thought that you are too busy to implement this feature, so that's why I decided to help you (It almost two months since your last message in this thread).

[issue42269] Add ability to set __slots__ in dataclasses

2021-01-08 Thread Yurii Karabas
Change by Yurii Karabas <1998uri...@gmail.com>: -- keywords: +patch nosy: +uriyyo nosy_count: 5.0 -> 6.0 pull_requests: +22998 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24171 ___ Python tracker

[issue42863] Python venv inconsistent folder structure on windows

2021-01-08 Thread Jeff Moguillansky
Jeff Moguillansky added the comment: Thanks for the feedback, I understand -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue42863] Python venv inconsistent folder structure on windows

2021-01-08 Thread Paul Moore
Paul Moore added the comment: Many tools hard code the "if windows then 'Scripts' else 'bin'" logic. They will simply fail to work with environments that don't have that layout. Yes, they probably should use sysconfig, but many don't (and sometimes for arguably good reasons, for example

[issue42863] Python venv inconsistent folder structure on windows

2021-01-08 Thread Jeff Moguillansky
Jeff Moguillansky added the comment: Maybe we can consider adding additional params and a new code path to python -m venv? This way we don't break any existing functionality? e.g. -includedir=... -libdir=... -bindir=... ? -- ___ Python tracker

[issue24464] "sqlite3_enable_shared_cache" deprecation warning when compiling with macOS system SQLite3

2021-01-08 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- pull_requests: +22997 pull_request: https://github.com/python/cpython/pull/24170 ___ Python tracker ___

[issue42863] Python venv inconsistent folder structure on windows

2021-01-08 Thread Steve Dower
Steve Dower added the comment: > From the perspective of the overall system, I think it would simplify > integration and reduce complexity if we normalize folder structures across > platforms instead of having different folder structures. I agree. But from the perspective of not breaking

[issue42851] Subclassing Enum with ipaddress.IPv4Network/IPv6Network raises TypeError.

2021-01-08 Thread Ethan Furman
Change by Ethan Furman : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.9 ___ Python tracker ___

[issue42863] Python venv inconsistent folder structure on windows

2021-01-08 Thread Jeff Moguillansky
Jeff Moguillansky added the comment: To give more context regarding this issue: I'm currently using meson build system to generate the pkg-config files, and it seems that the paths "include", "lib" are hardcoded. >From the perspective of the overall system, I think it would simplify

[issue9694] argparse required arguments displayed under "optional arguments"

2021-01-08 Thread paul j3
paul j3 added the comment: Since this issue is closed it might be a good idea to open a new one with this problem. And if possible identify the failed tests. We forgot to allow for the fact that working code/tests might be checking for specific help messages, checks the will fail when

[issue42863] Python venv inconsistent folder structure on windows

2021-01-08 Thread Steve Dower
Steve Dower added the comment: I'm afraid not, at least not without breaking everyone who has hardcoded the paths already. And I'm pretty sure that include directory is never used anymore, either (at least not by distutils, and not by default). The sysconfig module provides the programmatic

[issue42867] Entry Widget not editable on Windows 10, but is on Linux Ubuntu 16.04

2021-01-08 Thread John McCabe
John McCabe added the comment: @epaine Thank you for your comments. Although the order of events in the example you quoted isn't the same as in the application I'm using (tk.messagebox.askquestion() is called a long time before the Enter widget is created in the application, not the other

[issue42850] Process hangs when calling urllib.request in a multiprocessing.Process with import of sounddevice package

2021-01-08 Thread Ned Deily
Ned Deily added the comment: Also note that there are known problems with using the "fork" start method of multiprocessing on macOS. As of Python 3.8, the default start methord on macOS is now "spawn": https://docs.python.org/3.9/library/multiprocessing.html#contexts-and-start-methods Try

[issue42865] sysconfig appends CFLAGS to LD

2021-01-08 Thread Ned Deily
Change by Ned Deily : -- nosy: +ned.deily ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42798] pip search fails

2021-01-08 Thread Benjamin Peterson
Change by Benjamin Peterson : -- resolution: -> third party stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue41116] build on macOS 11 (beta) does not find system-supplied third-party libraries

2021-01-08 Thread Ned Deily
Ned Deily added the comment: > I am running macOS Big Sur Version 11.1 on Silicon and still get the error > about the missing lzma.h file. Unfortunately, Apple does not include the XZ library with macOS so, to build that module, you will need to supply a copy from another source, either

[issue41116] build on macOS 11 (beta) does not find system-supplied third-party libraries

2021-01-08 Thread seb
seb added the comment: I am running macOS Big Sur Version 11.1 on Silicon and still get the error about the missing lzma.h file. I can confirm that I use the latest Python 3.9.1 version which includes the patches of this issue. gcc -Wno-unused-result -Wsign-compare -Wunreachable-code

[issue41742] Request for docs.python.org/3/library/configparser.html#exceptions improvement

2021-01-08 Thread Irit Katriel
Change by Irit Katriel : -- keywords: +easy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42867] Entry Widget not editable on Windows 10, but is on Linux Ubuntu 16.04

2021-01-08 Thread E. Paine
E. Paine added the comment: This is a Tk/Windows issue, not tkinter. I tested the following on Windows 10 using Tk 8.6.9: # Our entry pack [entry .e] # Causes the entry to fail #tk_messageBox -title Title -message Message #after 0 tk_messageBox -title Title -message Message # Does not

[issue42269] Add ability to set __slots__ in dataclasses

2021-01-08 Thread lcy
Change by lcy : -- nosy: +lcy0321 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9694] argparse required arguments displayed under "optional arguments"

2021-01-08 Thread Miro Hrončok
Miro Hrončok added the comment: Coudl this please be mentioned on https://docs.python.org/3.10/whatsnew/3.10.html ? At least two packages fail tests because of the change (ipython and sphinxcontrib-autoprogram). -- nosy: +hroncok ___ Python

[issue31213] __context__ reset to None in nested exception

2021-01-08 Thread Irit Katriel
Irit Katriel added the comment: This seems to be deliberately done here in order to prevent context cycles from forming: https://github.com/python/cpython/blob/fe6e5e7cfd68eeaa69fd1511f354a1b4d8d90990/Python/errors.c#L148 In your code you are creating a cycle where foo is the context (and

[issue42866] test test_multibytecodec: Test_IncrementalEncoder.test_subinterp() leaks references

2021-01-08 Thread STINNER Victor
STINNER Victor added the comment: Ok, it's now fixed. To make sure that a heap type can be deleted, it must by a GC type, has a traverse function, and it must track its instances. We should take this in account when we convert static types to heap types. In practice, deleting a type is

[issue42868] SpooledTemporaryFile.__iter__ is not transparent to rollover

2021-01-08 Thread Jin-oh Kang
New submission from Jin-oh Kang : In tempfile, SpooledTemporaryFile.__iter__ is defined as follows: # file protocol def __iter__(self): return self._file.__iter__() A rollover would switch the underlying _file object from a BytesIO to a TemporaryFile, thereby leaving the

[issue42866] test test_multibytecodec: Test_IncrementalEncoder.test_subinterp() leaks references

2021-01-08 Thread STINNER Victor
STINNER Victor added the comment: New changeset 11ef53aefbecfac18b63cee518a7184f771f708c by Victor Stinner in branch 'master': bpo-42866: Add traverse func to _multibytecodec.MultibyteCodec (GH-24166) https://github.com/python/cpython/commit/11ef53aefbecfac18b63cee518a7184f771f708c

[issue42867] Entry Widget not editable on Windows 10, but is on Linux Ubuntu 16.04

2021-01-08 Thread John McCabe
John McCabe added the comment: Thank you. Wrt to your initial suggestion, I recognise Python's popularity will make things busy, and I will ask if anyone knows of a workaround in other fora, but a bug's a bug and, IMO, if something behaves differently on different platforms, using packages

[issue42866] test test_multibytecodec: Test_IncrementalEncoder.test_subinterp() leaks references

2021-01-08 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Ah, thanks! I also found that info in the docs: https://docs.python.org/3/c-api/typeobj.html#c.PyTypeObject.tp_free -- ___ Python tracker

[issue42866] test test_multibytecodec: Test_IncrementalEncoder.test_subinterp() leaks references

2021-01-08 Thread miss-islington
Change by miss-islington : -- pull_requests: +22996 pull_request: https://github.com/python/cpython/pull/24168 ___ Python tracker ___

[issue42866] test test_multibytecodec: Test_IncrementalEncoder.test_subinterp() leaks references

2021-01-08 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +22995 pull_request: https://github.com/python/cpython/pull/24167 ___ Python tracker

[issue42866] test test_multibytecodec: Test_IncrementalEncoder.test_subinterp() leaks references

2021-01-08 Thread STINNER Victor
STINNER Victor added the comment: typo: My PR uses the generic tp->tp_free which *is* PyObject_GC_Del(). -- ___ Python tracker ___

[issue42866] test test_multibytecodec: Test_IncrementalEncoder.test_subinterp() leaks references

2021-01-08 Thread STINNER Victor
STINNER Victor added the comment: > Don't you need to free memory using PyObject_GC_Del when you allocate using > PyObject_GC_New? My PR uses the generic tp->tp_free which PyObject_GC_Del(). -- ___ Python tracker

[issue42867] Entry Widget not editable on Windows 10, but is on Linux Ubuntu 16.04

2021-01-08 Thread Christian Heimes
Christian Heimes added the comment: I'm involving TJ and Serhiy. They might have free resources and might be able to assist. I initially suggested to get assistance in user forums, because we have very limited resources. To give you an impression, there are more than 7,500 open bugs on BPO

[issue42866] test test_multibytecodec: Test_IncrementalEncoder.test_subinterp() leaks references

2021-01-08 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Ref. https://docs.python.org/3/c-api/typeobj.html#Py_TPFLAGS_HAVE_GC -- ___ Python tracker ___

[issue30701] Exception parsing certain invalid email address headers

2021-01-08 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> out of date stage: -> resolved status: pending -> closed ___ Python tracker ___ ___

[issue42867] Entry Widget not editable on Windows 10, but is on Linux Ubuntu 16.04

2021-01-08 Thread John McCabe
John McCabe added the comment: In addition, changing "Entry" to "Text" (+ necessary associated changes) makes no difference to the outcome. Removing the call to tk.messagebox.askquestion() does. It appears that tk.messagebox.askquestion() is screwing something up on Windows; perhaps it's

[issue42866] test test_multibytecodec: Test_IncrementalEncoder.test_subinterp() leaks references

2021-01-08 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Don't you need to free memory using PyObject_GC_Del when you allocate using PyObject_GC_New? -- ___ Python tracker ___

[issue42867] Entry Widget not editable on Windows 10, but is on Linux Ubuntu 16.04

2021-01-08 Thread John McCabe
John McCabe added the comment: It's reproducible in both 3.8 and 3.9 on Windows 10. -- versions: +Python 3.9 -Python 3.6 ___ Python tracker ___

[issue42867] Entry Widget not editable on Windows 10, but is on Linux Ubuntu 16.04

2021-01-08 Thread Christian Heimes
Christian Heimes added the comment: Can your produce the issue with Python 3.8 or newer on any platform? 3.6 and 3.7 are in security fix-only mode. If it's truly a bug in Python, then we won't fix the issue any way. -- ___ Python tracker

[issue42866] test test_multibytecodec: Test_IncrementalEncoder.test_subinterp() leaks references

2021-01-08 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +22994 pull_request: https://github.com/python/cpython/pull/24166 ___ Python tracker ___

[issue42866] test test_multibytecodec: Test_IncrementalEncoder.test_subinterp() leaks references

2021-01-08 Thread STINNER Victor
STINNER Victor added the comment: New changeset e542d417b96077d04aec089505eacb990c9799ae by Victor Stinner in branch 'master': bpo-42866: Fix refleak in CJK getcodec() (GH-24165) https://github.com/python/cpython/commit/e542d417b96077d04aec089505eacb990c9799ae --

[issue42866] test test_multibytecodec: Test_IncrementalEncoder.test_subinterp() leaks references

2021-01-08 Thread STINNER Victor
STINNER Victor added the comment: Calling gc.collect() twice works around the issue, which sounds like a missing traverse function somewhere. diff --git a/Python/pystate.c b/Python/pystate.c index c791b23999..66bbe1bf7d 100644 --- a/Python/pystate.c +++ b/Python/pystate.c @@ -321,6 +321,7 @@

[issue42867] Entry Widget not editable on Windows 10, but is on Linux Ubuntu 16.04

2021-01-08 Thread John McCabe
John McCabe added the comment: Is behaviour that differs between platforms, using components that are listed in the "classification" -> "Components" section NOT a bug then? -- ___ Python tracker

[issue14655] traceback module docs should show how to print/fomat an exception object

2021-01-08 Thread Irit Katriel
Irit Katriel added the comment: In issue 26389 the api was changed so that now format_exception(exc) works. -- resolution: -> duplicate stage: needs patch -> resolved status: open -> closed superseder: -> Expand traceback module API to accept just an exception as an argument

[issue42853] `OverflowError: signed integer is greater than maximum` in ssl.py for files larger than 2GB

2021-01-08 Thread Christian Heimes
Christian Heimes added the comment: That's a good idea, Ronald! socket.c:sock_send_impl() already clamps the input length on Windows: #ifdef MS_WINDOWS if (ctx->len > INT_MAX) ctx->len = INT_MAX; ctx->result = send(s->sock_fd, ctx->buf, (int)ctx->len, ctx->flags); #else

[issue42867] Entry Widget not editable on Windows 10, but is on Linux Ubuntu 16.04

2021-01-08 Thread Christian Heimes
Christian Heimes added the comment: Hi, bugs.python.org is an issue tracker for bugs and feature requests. Please use platforms like Python user mailing list, stack overflow, or reddit for general help with Python and libraries. -- nosy: +christian.heimes

[issue42867] Entry Widget not editable on Windows 10, but is on Linux Ubuntu 16.04

2021-01-08 Thread John McCabe
New submission from John McCabe : I've built an application using tkinter (see below). I'm fairly new to tkinter, despite having substantial software experience (33 years), so the layout might be a bit odd/wrong, and the example obviously doesn't follow PEP-8 guidelines, however...

[issue42866] test test_multibytecodec: Test_IncrementalEncoder.test_subinterp() leaks references

2021-01-08 Thread STINNER Victor
STINNER Victor added the comment: > encodings._cache['cp932'] = _codecs_jp.getcodec('cp932') * encodings._cache is kept alive by encodings.search_function.__globals__ * encodings.search_function function is kept alive by PyInterpreterState.codec_search_path list. The function by

[issue42866] test test_multibytecodec: Test_IncrementalEncoder.test_subinterp() leaks references

2021-01-08 Thread STINNER Victor
STINNER Victor added the comment: See also bpo-42671 "Make the Python finalization more deterministic" but it seems like PR 23826 makes the leak worse (+2000 leaked references instead of +200) :-) -- ___ Python tracker

[issue42866] test test_multibytecodec: Test_IncrementalEncoder.test_subinterp() leaks references

2021-01-08 Thread STINNER Victor
STINNER Victor added the comment: Links about ref leaks related to encodings: * https://bugs.python.org/issue1635741#msg364833 * https://bugs.python.org/issue1635741#msg364968 * https://bugs.python.org/issue36854#msg357160 *

[issue42866] test test_multibytecodec: Test_IncrementalEncoder.test_subinterp() leaks references

2021-01-08 Thread STINNER Victor
STINNER Victor added the comment: The leak can be simplified to: @support.cpython_only def test_subinterp(self): import _testcapi code = textwrap.dedent(""" import encodings import _codecs_jp encodings._cache['cp932'] =

[issue42866] test test_multibytecodec: Test_IncrementalEncoder.test_subinterp() leaks references

2021-01-08 Thread STINNER Victor
STINNER Victor added the comment: PR 24165 fix one reference leak in the getcodec() function of CJK codecs. But it doesn't fix all ref leaks of this issue. -- ___ Python tracker

[issue42866] test test_multibytecodec: Test_IncrementalEncoder.test_subinterp() leaks references

2021-01-08 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +22993 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24165 ___ Python tracker ___

[issue42853] `OverflowError: signed integer is greater than maximum` in ssl.py for files larger than 2GB

2021-01-08 Thread Ronald Oussoren
Ronald Oussoren added the comment: The API documentation already implies that write might not write the entire buffer because it returns the number of bytes actually written (just like os.write). A possible workaround on the SSL layer is hence to clamp the amount of bytes to write to

[issue42866] test test_multibytecodec: Test_IncrementalEncoder.test_subinterp() leaks references

2021-01-08 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Thank you so much for taking the time to write these blog posts, Victor, and for explaining your fixes is such great detail. It is very helpful! -- ___ Python tracker

[issue42866] test test_multibytecodec: Test_IncrementalEncoder.test_subinterp() leaks references

2021-01-08 Thread STINNER Victor
STINNER Victor added the comment: By the way, I wrote an article "Leaks discovered by subinterpreters": https://vstinner.github.io/subinterpreter-leaks.html This leak may be new kind related to capsule, I'm not sure so far. -- ___ Python tracker

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

2021-01-08 Thread STINNER Victor
STINNER Victor added the comment: > New changeset 0b858cdd5d114f0890b11b6c4d6559d0ceb468ab by Erlend Egeberg > Aasland in branch 'master': > bpo-1635741: Convert _multibytecodec to multi-phase init (GH-24095) This change introduced two regressions: * bpo-42846: "Using _multibytecodec module

[issue42866] test test_multibytecodec: Test_IncrementalEncoder.test_subinterp() leaks references

2021-01-08 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +corona10, erlendaasland ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42866] test test_multibytecodec: Test_IncrementalEncoder.test_subinterp() leaks references

2021-01-08 Thread STINNER Victor
STINNER Victor added the comment: I added the test which leaks in bpo-42846. commit 07f2cee93f1b619650403981c455f47bfed8d818 Author: Victor Stinner Date: Fri Jan 8 00:15:22 2021 +0100 bpo-42846: Convert CJK codec extensions to multiphase init (GH-24157) Convert the 6 CJK

[issue42846] Using _multibytecodec module on Windows, test_threading/embed get failure

2021-01-08 Thread STINNER Victor
STINNER Victor added the comment: > bpo-42846: Convert CJK codec extensions to multiphase init (GH-24157) I added a new test and new test spotted a reference leak, likely an existing one: bpo-42866 "test test_multibytecodec: Test_IncrementalEncoder.test_subinterp() leaks references".

[issue42866] test test_multibytecodec: Test_IncrementalEncoder.test_subinterp() leaks references

2021-01-08 Thread STINNER Victor
New submission from STINNER Victor : $ ./python -m test test_multibytecodec -m test.test_multibytecodec.Test_IncrementalEncoder.test_subinterp -R 3:3 (...) test_multibytecodec leaked [258, 258, 258] references, sum=774 I simplified the code. The following test leaks references: def

[issue42860] Incompatible types in Python grammar

2021-01-08 Thread Tobias Kohn
Tobias Kohn added the comment: Great, thanks a lot! -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: