Re: dayofyear is not great when going into a new year

2021-01-08 Thread Christian Gollwitzer
Am 05.01.21 um 23:56 schrieb Eli the Bearded: Elijah -- also finds "week starts on Monday" to be oddball about ISO-8601 In Europe, the week starts on Monday - hence, Saturday and Sunday are the last days of the week or the "weekend". Starting on Sunday is weird for us, because then the

Re: better handling of "pinned" modules?

2021-01-08 Thread Andrew Jaffe
On 08/01/2021 18:21, Chris Angelico wrote: On Sat, Jan 9, 2021 at 5:18 AM Andrew Jaffe wrote: Hi, I don't know if this makes more sense here or on "python-ideas" (or elsewhere?) but I'll try this first: I am starting to encounter more and more instances of packages requiring older, pinned,

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

Re: Remove duplicate values from dictionary without removing key

2021-01-08 Thread Louis Krupp
On 1/8/2021 2:56 AM, Umar Draz wrote: I want to replace duplicate values with empty "" in my dictionary. Here is my original dictionary. items = [ {'client': 'xyz', 'name': "Ilir Meta", 'rating': 0.06, 'total': 100}, {'client': 'xyz','name': "Abdelmadjid Tebboune", 'rating': 4.0,

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

Re: learning python building 2nd app, need advices

2021-01-08 Thread Richard Damon
On 1/8/21 6:10 PM, pascal z via Python-list wrote: > any way to attach a file because I loose indentation? Don't post via googlegroups, it thinks the world is HTML, which treats spaces in a funny matter. -- Richard Damon -- https://mail.python.org/mailman/listinfo/python-list

[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

Re: learning python building 2nd app, need advices

2021-01-08 Thread Greg Ewing
On 9/01/21 12:10 pm, pascal z wrote: any way to attach a file because I loose indentation? Indentation usually makes it through here if you indent with spaces rather than tabs. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

[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

Re: learning python building 2nd app, need advices

2021-01-08 Thread pascal z via Python-list
And something important to this app, is about listing files, how to avoid listing small application files parts .ini and binary files so if it's an application it would tell the size of of the folder of this application and not list the content or make it optionnal? --

Re: tkinter: creating/attaching menubar to top level window

2021-01-08 Thread Rich Shepard
On Fri, 8 Jan 2021, Richard Damon wrote: It could be either: self.menu = menubar or self['menu'] = menubar Got it, Richard. Removed the period after 'self'. Thanks, Rich -- https://mail.python.org/mailman/listinfo/python-list

Re: tkinter: creating/attaching menubar to top level window [RESOLVED]

2021-01-08 Thread Rich Shepard
On Fri, 8 Jan 2021, Christian Gollwitzer wrote: It is a simple typo, remove the dot. self['menu'] = menubar It will then stop at the add_cascade, fix it like this: Christian, Well, I totally missed that because I'm used to adding a period after each self. Your fresh eyes saw what I

Re: learning python building 2nd app, need advices

2021-01-08 Thread pascal z via Python-list
any way to attach a file because I loose indentation? -- https://mail.python.org/mailman/listinfo/python-list

learning python building 2nd app, need advices

2021-01-08 Thread pascal z via Python-list
Hi, This is a python app I was working on, can you help making it a beautiful looking app like bleachbit or ccleaner? The whole code below (what it does: it lists all folders and files from a specified path and tells some infos like size in mb or gb... and export it to a csv file for further

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

Re: dayofyear is not great when going into a new year

2021-01-08 Thread Greg Ewing
On 9/01/21 11:17 am, Martin Schöön wrote: "regardless of what you have been told, recreational use of mathematics is harmless" I hope that is true for recreational programming as well :-) Mostly harmless, but it can be addictive! -- Greg --

Re: dayofyear is not great when going into a new year

2021-01-08 Thread Martin Schöön
Den 2021-01-05 skrev Stefan Ram : > Martin =?UTF-8?Q?Sch=C3=B6=C3=B6n?= writes: >>I have had some Python fun with COVID-19 data. I have done >>some curve fitting and to make that easier I have transformed >>date to day of year. Come end of 2020 and beginning of 2021 >>and this idea falls on its

Re: tkinter: creating/attaching menubar to top level window

2021-01-08 Thread Richard Damon
On 1/8/21 4:47 PM, Rich Shepard wrote: > I'm using Chapter 9 in Mark Roseman's "Modern Tkinter for Busy Python > Developers" to learn how to write a top level menu. MWE code is attached. > > Python3 tells me there's invalid syntax on line 42: >     self.['menu'] = menubar # attach it to the top

Re: tkinter: creating/attaching menubar to top level window

2021-01-08 Thread Christian Gollwitzer
Am 08.01.21 um 22:47 schrieb Rich Shepard: I'm using Chapter 9 in Mark Roseman's "Modern Tkinter for Busy Python Developers" to learn how to write a top level menu. MWE code is attached. Python3 tells me there's invalid syntax on line 42:     self.['menu'] = menubar # attach it to the top

[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("/"),

tkinter: creating/attaching menubar to top level window

2021-01-08 Thread Rich Shepard
I'm using Chapter 9 in Mark Roseman's "Modern Tkinter for Busy Python Developers" to learn how to write a top level menu. MWE code is attached. Python3 tells me there's invalid syntax on line 42: self.['menu'] = menubar # attach it to the top level window ^ yet that's the syntax he

[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

Asyncio project code review

2021-01-08 Thread James
Good day for everyone. I have new asyncio project which use aiohttp connector and asyncio protocols/transports for tunneling packets through Tor Network cleanly. Project called aiotor: https://github.com/torpyorg/aiotor If someone with experience in asyncio field can make code review I will

asyncio project code review

2021-01-08 Thread James
Good day everyone. I have new asyncio project which use aiohttp connector and asyncio protocols/transports for tunneling packets through Tor Network cleanly. Project called aiotor: https://github.com/torpyorg/aiotor If someone with experience in asyncio field can make code review I will be

Re: Remove duplicate values from dictionary without removing key

2021-01-08 Thread MRAB
On 2021-01-08 09:56, Umar Draz wrote: I want to replace duplicate values with empty "" in my dictionary. Here is my original dictionary. items = [ {'client': 'xyz', 'name': "Ilir Meta", 'rating': 0.06, 'total': 100}, {'client': 'xyz','name': "Abdelmadjid Tebboune", 'rating': 4.0,

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

Re: better handling of "pinned" modules?

2021-01-08 Thread Chris Angelico
On Sat, Jan 9, 2021 at 5:18 AM Andrew Jaffe wrote: > > Hi, > > I don't know if this makes more sense here or on "python-ideas" (or > elsewhere?) but I'll try this first: > > I am starting to encounter more and more instances of packages requiring > older, pinned, versions of modules, and this is

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

better handling of "pinned" modules?

2021-01-08 Thread Andrew Jaffe
Hi, I don't know if this makes more sense here or on "python-ideas" (or elsewhere?) but I'll try this first: I am starting to encounter more and more instances of packages requiring older, pinned, versions of modules, and this is occasionally actually starting to cause conflicts. It seems

Remove duplicate values from dictionary without removing key

2021-01-08 Thread Umar Draz
I want to replace duplicate values with empty "" in my dictionary. Here is my original dictionary. items = [ {'client': 'xyz', 'name': "Ilir Meta", 'rating': 0.06, 'total': 100}, {'client': 'xyz','name': "Abdelmadjid Tebboune", 'rating': 4.0, 'total': 100}, {'client': 'xyz','name':

Re: This is a test

2021-01-08 Thread Wesley Peng
Please don't send a test message to the public list which was read by thousands of people. thanks. On Fri, Jan 8, 2021 at 5:26 AM Craig Hatch wrote: > I have added you to the EMAIL list, so when I have questions. > > Just learn for fun. > > > Craig Hatch > -- >

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

  1   2   >