[issue4721] pythonw.exe crash in GU application(PythonWX)
New submission from George : I have Python 2.6.1 in Windows Vista. It happened in Python 2.6 and I hoped it would be fixed. I don't know what happenes in other versions. When I open a file containing a python program(".py"/".pyw" and even one compiled with py2exe) made by using the PythonWX GUI programming libraries it crashes immediately after the mouse hovers over the window created by the program(spesifically in the area inside it). It happenes both when the program is a ".py" file and a ".pyw" file or one compiled with py2exe. I get a message that the program stopped working. Shouldn'nt I get a message about wrong code? It doesn't crash in the Python Shell, but it has happened ,too, a few times. Do I do something wrong? Is there something I should know? The programs I use are not made by me(I can't yet make mine), but they are examples downloaded or copy-pasted. Here is one: import wx app = wx.PySimpleApp() frame = wx.Frame(None,-1,"Hello World") frame.Show(True) app.MainLoop() Please tell me what is wrong or what I should do. -- files: simple editor.pyw messages: 78189 nosy: george severity: normal status: open title: pythonw.exe crash in GU application(PythonWX) type: crash versions: Python 2.6 Added file: http://bugs.python.org/file12426/simple editor.pyw ___ Python tracker <http://bugs.python.org/issue4721> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4721] pythonw.exe crash in GUI application(PythonWX)
Changes by George : -- title: pythonw.exe crash in GU application(PythonWX) -> pythonw.exe crash in GUI application(PythonWX) ___ Python tracker <http://bugs.python.org/issue4721> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44916] Undefined/random behaviour when importing two modules with the same name but different source files
New submission from George : Warning: There's a higher probability this is "expected" undefined behaviour or not even undefined and I'm just a moron. In addtion, I couldn't actually replicate it outside of the specific context it happened. But if it sounds plausible and it's something that shouldn't happen I can spend more time trying to replicate. 1. In two different python processes I'm "dynamically" creating a module named `M` using a file `m1.py` that contains a class `C`. Then I create an object of tpye `C` and pickle it. (let's call this object `c1`) 2. In a different thread I do the exact same thing, but the file is `m2.py` then I create an object of type `C` and pickle it. (call this one `c2`) 3. Then, in the same thread, I recreate the module named `M` from `m1.py` and unpickle `c1`, second I create a module named `M` from `m2.py` (this doesn't cause an error) and unpickle `c2`. 4. This (spurprisingly?) seems to basically work fine in most cases. Except for one (and I can't find why it's special) where for some reason `c2` starts calling the methods from a class that's not it's own. In other words `c1` usually maps ot `M.C --> m1.py` and `c2` to `M.C --> m2.py` | But randomly `c2` will start looking up methods in `M.C --> m1.py`, or at least that's what stack traces & debuggers seem to indicate. The way I create the module `M` in all cases: ``` with open(`m1.py`, 'wb') as fp: fp.write(code.encode('utf-8')) spec = importlib.util.spec_from_file_location('M', fp.name) temp_module = importlib.util.module_from_spec(spec) sys.modules['M] = temp_module spec.loader.exec_module(temp_module) # Note: Same for the other module but using `m2.py`, the code I use here contains a class `C` in both cases ``` This seems, unexpected. I wouldn't expect the recreation to cause a crash, but I'd expect it to either override the previous `M` for all existing objects instantiated from that module in all cases, or in no cases... currently it seems that both modules stay loaded and lookups are made randomly. -- components: Interpreter Core messages: 399596 nosy: George3d6 priority: normal severity: normal status: open title: Undefined/random behaviour when importing two modules with the same name but different source files versions: Python 3.8 ___ Python tracker <https://bugs.python.org/issue44916> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43161] Taking sum of massive list comprehension results in total system crash.
New submission from George : I tried running the following command in the interpreter, and without fail it will completely crash my entire computer. Python 3.8.7 (default, Jan 20 2021, 00:00:00) [GCC 10.2.1 20201125 (Red Hat 10.2.1-9)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> sum([i for i in range(10**8 + 10**9)]) My kernel is 5.10.12-100 I am running on Fedora 32 with Cinnamon Desktop if it helps. Let me know if you need any other information. I eagerly await resolution of this bug, as I want to know the result of the computation. Unless, of course it is harebrained, then we should ignore because Guido already discussed such computations. George -- messages: 386615 nosy: U9dB37BPZx priority: normal severity: normal status: open title: Taking sum of massive list comprehension results in total system crash. type: crash versions: Python 3.8 ___ Python tracker <https://bugs.python.org/issue43161> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43161] Taking sum of massive list comprehension results in total system crash.
George added the comment: Thanks Christian for the solutions. I am guessing that since it is my entire machine that crashes, and python is not simply killed for requesting so much memory, that this is an operating system problem. Should I submit this as a bug to the kernel project then? George -- ___ Python tracker <https://bugs.python.org/issue43161> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26386] tkinter - Treeview - .selection_add and selection_toggle
New submission from George: Id's with spaces in them causes a crash when using the .selection* methods Treeview. Version of ttk.py "0.3.1" dated 12/6/2015. Traceback line numbers are 1415 then 1395 Either of these lines of code, where the item id is "2009 Report.pdf" crash allParents = oTree.get_children() for id in allParents: oTree.selection_add(id) # oTree.selection_toggle(id) These two lines of workaround code do work however. oTree.selection_add('"' + id + '"') # oTree.selection_toggle('"' + id + '"') Note that so far all other places in dealing with the item id's have no issue when there are spaces in them. -- components: Tkinter messages: 260469 nosy: gbarnabic priority: normal severity: normal status: open title: tkinter - Treeview - .selection_add and selection_toggle type: crash versions: Python 3.5 ___ Python tracker <http://bugs.python.org/issue26386> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46717] Raising exception multiple times leaks memory
New submission from George Gensure : Instantiating an exception and raising it multiple times causes 1 frame and 2 traceback objects to remain allocated for each raise. The attached example causes python to consume 8GB of ram after a few seconds of execution on Windows/Linux. -- components: Interpreter Core files: exc.py messages: 413035 nosy: ggensure priority: normal severity: normal status: open title: Raising exception multiple times leaks memory type: resource usage versions: Python 3.11 Added file: https://bugs.python.org/file50619/exc.py ___ Python tracker <https://bugs.python.org/issue46717> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12247] Finding subprocess.py depends on how IDLE is opened
New submission from George Patterson : I'm uncertain this is a bug, but it seems persistent over several machines and I can't figure out where the issue lies. Most of my troubleshooting has been on a MacBook Pro with Mac OS X version 10.6.7. I have a simple python script 'test.py': import subprocess subprocess.Popen(['xterm']) If I run this script by opening it in IDLE using the mouse, it crashes. If I run the same script in an IDLE that I launch by typing 'idle' in a terminal, it doesn't crash. What's going on? Is this a bug? Or am I just doing something terribly wrong? Obviously, my interest is not in running this simple script, but it contains the minimum part of the real script which reproduces the error. I've repeated this error on one machine(MacBook Pro with Mac OS X version 10.6.7) using either of two versions of Python, 2.6.6 or 2.7.1. On one machine(Mac Pro OS X version 10.6.7) using Python 2.6.6, on two other machines(IMacs with either OS X version 10.6.7 or 10.6.5) using Python 2.7.1. I include below only the info for the 2.7.1. Python 2.7.1 was the 32-bit version Mac OS X 32-bit i386/PPC Installer (2.7.1) for Mac OS X 10.3 through 10.6 [2] (sig) from here (http://www.python.org/download/releases/2.7.1/). Details: 1. Launch IDLE by right clicking test.py and "open with" IDLE (2.7.1). I "run module". Pasted below are the contents from the Python Shell. Included at the bottom is the sys.path for IDLE opened in this manner. I've also find this error if I open the IDLE located in Applications/Python 2.7/ and then open "test.py" and run it. Python 2.7.1 (r271:86882M, Nov 30 2010, 09:39:13) [GCC 4.0.1 (Apple Inc. build 5494)] on darwin Type "copyright", "credits" or "license()" for more information. >>> RESTART >>> Traceback (most recent call last): File "/Users/georgepatterson/test.py", line 2, in subprocess.Popen(['xterm']) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 672, in __init__ errread, errwrite) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1202, in _execute_child raise child_exception OSError: [Errno 2] No such file or directory >>> import sys >>> for p in sys.path: print p /Users/georgepatterson /Users/georgepatterson/Documents /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg /Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages >>> 2. Type "idle" in a terminal window. Open test.py and "run module". When run in this manner, the terminal window is opened properly. I've pasted the contents of the Python Shell below with the sys.path also. In case it matters, "which idle" at the terminal prompt points here /Library/Frameworks/Python.framework/Versions/2.7/bin/idle Python 2.7.1 (r271:86882M, Nov 30 2010, 09:39:13) [GCC 4.0.1 (Apple Inc. build 5494)] on darwin Type "copyright", "credits" or "license()" for more information. >>> RESTART >>> >>> import sys >>> for p in sys.path: print p /Users/georgepatterson /Library/Frameworks/Python.framework/Versions/2.7/bin /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg /Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages >>&
[issue12372] semaphore errors on AIX 7.1
New submission from reshmi george : The same problem that was reported in issue 9700 is appearing on AIX 7.1. The following message has been seen when running multi-process python program: sem_trywait: Permission denied sem_post: Permission denied sem_wait: Permission denied sem_post: Permission denied It can be easily corrected by defining HAVE_BROKEN_POSIX_SEMAPHORES for AIX 7, like it is done for AIX 6. -- messages: 138693 nosy: reshmi.george priority: normal severity: normal status: open title: semaphore errors on AIX 7.1 versions: Python 2.6, Python 2.7, Python 3.1 ___ Python tracker <http://bugs.python.org/issue12372> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9581] PosixGroupsTester fails as root
George Yoshida added the comment: > Under 2.6, there's another failure: As for 2.6/2.7 issues, changing 'assertListEqual' to 'assertEqual' should suffice. -- keywords: +patch nosy: +quiver Added file: http://bugs.python.org/file18496/2.6.diff ___ Python tracker <http://bugs.python.org/issue9581> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9581] PosixGroupsTester fails as root
George Yoshida added the comment: test_initgroups fails only if the test is invoked by a root and the user is assigned to only one group. If I understand test_initgroups correctly, it (1)looks for an unused gid, (2)inits process user's group with that gid, (3)checks if initgroups worked. Attached patch simplifies step #1 "max(self.saved_groups) + 1" is used. test_initgroups passed when root's groups are as follows:: * [0] * [0, 3, 5] * [0, 1, 2] -- Added file: http://bugs.python.org/file18498/test_setgroups.diff ___ Python tracker <http://bugs.python.org/issue9581> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9581] PosixGroupsTester fails as root
Changes by George Yoshida : Removed file: http://bugs.python.org/file18498/test_setgroups.diff ___ Python tracker <http://bugs.python.org/issue9581> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9581] PosixGroupsTester fails as root
Changes by George Yoshida : Added file: http://bugs.python.org/file18499/test_setgroups.diff ___ Python tracker <http://bugs.python.org/issue9581> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9581] PosixGroupsTester fails as root
George Yoshida added the comment: > FAIL: test_setgroups (test.test_posix.PosixGroupsTester) > -- > Traceback (most recent call last): > File "/home/antoine/py3k/__svn__/Lib/test/test_posix.py", line 428, in > test_setgroups > self.assertListEqual(groups, posix.getgroups()) > AssertionError: First sequence is not a list: range(0, 16) This one is just a list/range data type issue. patch for test_initgroups/test_setgroups against py3k attached -- ___ Python tracker <http://bugs.python.org/issue9581> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9581] PosixGroupsTester fails as root
Changes by George Yoshida : Added file: http://bugs.python.org/file18500/py3k.diff ___ Python tracker <http://bugs.python.org/issue9581> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11437] IDLE crash on startup with typo in config-keys.cfg
New submission from George Dhoore : If the user makes a typo when setting a custom keybind (in this case "" instead of "") IDLE will silently crash. From the command-line the error shows as: Traceback (most recent call last): File "C:\Python32\Lib\idlelib\idle.py", line 11, in idlelib.PyShell.main() File "C:\Python32\Lib\idlelib\PyShell.py", line 1388, in main shell = flist.open_shell() File "C:\Python32\Lib\idlelib\PyShell.py", line 277, in open_shell self.pyshell = PyShell(self) File "C:\Python32\Lib\idlelib\PyShell.py", line 856, in __init__ self.history = self.History(self.text) File "C:\Python32\Lib\idlelib\IdleHistory.py", line 12, in __init__ text.bind("<>", self.history_prev) File "C:\Python32\Lib\idlelib\MultiCall.py", line 332, in bind self.__binders[triplet[1]].bind(triplet, func) File "C:\Python32\Lib\idlelib\MultiCall.py", line 213, in bind seq, handler))) File "C:\Python32\Lib\tkinter\__init__.py", line 977, in bind return self._bind(('bind', self._w), sequence, func, add) File "C:\Python32\Lib\tkinter\__init__.py", line 932, in _bind self.tk.call(what + (sequence, cmd)) _tkinter.TclError: bad event type or keysym "up" This is doubly confusing as case sensitivity seems to be applied at random in config-keys.cfg. Expected behavior: Ideally case sensitivity shouldn't matter in config-keys.cfg and if there is an error in the config syntax, that particular line should be ignored and the rest of the file tried. If IDLE is still able to start, some user friendly error should be displayed indicating the problem line. -- components: IDLE, Tkinter files: config-keys.cfg messages: 130301 nosy: George.Dhoore priority: normal severity: normal status: open title: IDLE crash on startup with typo in config-keys.cfg type: crash versions: Python 3.2 Added file: http://bugs.python.org/file21039/config-keys.cfg ___ Python tracker <http://bugs.python.org/issue11437> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11072] Add MLSD command support to ftplib
Changes by George Dhoore : -- nosy: +George.Dhoore ___ Python tracker <http://bugs.python.org/issue11072> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3135] inspect.getcallargs()
New submission from George Sakkis <[EMAIL PROTECTED]>: I'd like to propose a new function for inclusion to the inspect module -- getcallargs(func, *args, **kwds) -- that returns a dict which maps the formal arguments of a function (or other callable) to the values passed as args and kwds, just as Python has to do when calling func(*args, **kwds). For example: >>> def func(a, b='foo', c=None, *x, **y): ... pass >>> sorted(getcallargs(func, 5, z=3, b=2).items()) [('a', 5), ('b', 2), ('c', None), ('x', ()), ('y', {'z': 3})] This is handy when writing decorators, or more generally when one would want to do some minimal type checking without actually calling the function. I have posted a recipe at http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/551779; I can clean it up and submit a proper patch if it's deemed useful enough for the stdlib. -- components: Library (Lib) messages: 68378 nosy: gsakkis severity: normal status: open title: inspect.getcallargs() type: feature request versions: Python 2.6 ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3135> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3250] datetime.time does not support arithmetic
George Boutsioukis <[EMAIL PROTECTED]> added the comment: I have also come across this in the past. Although I sense that some obscure reason might prevent time arithmetic from being included, here's a patch to add time/timedelta addition and subtraction. It closely follows the datetime arithmetic functions. To handle overflows, I figured it should wrap around a 24-hour limit. The timezone stuff is copied verbatim from the datetime functions, some finger-crossing applied. -- keywords: +patch nosy: +gboutsioukis Added file: http://bugs.python.org/file10806/datetime.diff ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3250> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3250] datetime.time does not support arithmetic
George Boutsioukis <[EMAIL PROTECTED]> added the comment: Hi Chris, I know copy-pasted sounds horrible--perhaps I should have said 'modeled afterwards'(better marketing;). The thing is, the datetime & time classes share a lot of common functionality; it is inevitable that some code looks like it's repeated, because the same process is followed(take a look at the datetime & date functions already there). I can't see much room for refactoring the arithmetic functions across classes(seems too messy). Besides, the existing timezone, normalization and delta functions are used, so no significant logic is repeated.The patch indeed requires some cleanup, but overall it's good code(and not a lot of it). I submitted it without tests/doc because I think there should be a chance for this functionality to be discussed. Also, the datetime module looks like for some reason these functions were left out(some discussion I'm missing?). So before investing any more time on this some feedback would be appreciated. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3250> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1869] Builtin round function is sometimes inaccurate for floats
George Boutsioukis <[EMAIL PROTECTED]> added the comment: The issue is that the implementation of round includes multiplying the number by 10**ndigits, thus unnecessarily losing some precision for large numbers within the IEEE754 double limits. This means that even smaller numbers can produce these results for higher ndigit values, eg. >>> round(56294995342131.5, 3) #one less digit 56294995342131.508 In the submitted patch I used modf to split the number and keep the integral intact. -- keywords: +patch nosy: +gboutsioukis Added file: http://bugs.python.org/file10944/round_patch.diff ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1869> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1869] Builtin round function is sometimes inaccurate for floats
George Boutsioukis <[EMAIL PROTECTED]> added the comment: Hi Mark, Yes, I see where you are going with this and I agree. I think the py3k round function is a bit more accurate, any chance this can be backported to 2.7(after modifying the half-rounding)? Anyway, I was just playing around with the code when I wrote this patch. Anything beyond math.h(and only the really portable functions) is obviously out of the question, so there's little here to work with. Despite the (rare) unpredictable results, I think this issue is probably too minor to spend any more time on;IMO nobody really relies on round() for accuracy anyway. Perhaps this should be just ignored. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1869> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8174] Misleading reported number of given arguments on function call TypeError
New submission from George Sakkis : The following exception message seems misleading, or at least not obvious: >>> def f(a,b,c): pass ... >>> f(c=0,a=0) Traceback (most recent call last): File "", line 1, in TypeError: f() takes exactly 3 non-keyword arguments (1 given) Why "1 given" ? One could argue for either 0 or 2 given arguments but I fail to see how 1 is a reasonable answer. -- components: Interpreter Core messages: 101298 nosy: gsakkis severity: normal status: open title: Misleading reported number of given arguments on function call TypeError type: behavior versions: Python 2.7 ___ Python tracker <http://bugs.python.org/issue8174> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3135] inspect.getcallargs()
George Sakkis added the comment: I reverted the function to the original API (return just the dict with the bindings), cleaned it up, wrote thorough unit tests and made a patch against Python 2.7a4. -- keywords: +patch Added file: http://bugs.python.org/file16579/getcallargs.patch ___ Python tracker <http://bugs.python.org/issue3135> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3135] inspect.getcallargs()
Changes by George Sakkis : Removed file: http://bugs.python.org/file16579/getcallargs.patch ___ Python tracker <http://bugs.python.org/issue3135> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3135] inspect.getcallargs()
George Sakkis added the comment: Renamed the Testcase classes to conform with the rest in test_inspect.py, added a few more tests for tuple args and patched against the latest trunk (r79086). -- Added file: http://bugs.python.org/file16587/getcallargs.patch ___ Python tracker <http://bugs.python.org/issue3135> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6474] Inconsistent TypeError message on function calls with wrong number of arguments
George Sakkis added the comment: Which version are you running ? I don't get the "positional" word in 2.6 and 2.7a4. In my opinion it should report how many required arguments are passed, regardless of how they are passed (positionally or by name). So in your example it should say "1 given" in both examples. -- ___ Python tracker <http://bugs.python.org/issue6474> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6474] Inconsistent TypeError message on function calls with wrong number of arguments
George Sakkis added the comment: Attached patch for displaying the number of missing required arguments. -- keywords: +patch Added file: http://bugs.python.org/file16589/6474.patch ___ Python tracker <http://bugs.python.org/issue6474> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3135] inspect.getcallargs()
George Sakkis added the comment: - Added docs in inspect.rst - Fixed TypeError message for zero-arg functions ("takes no arguments" instead of "takes exactly 0 arguments") + added test. -- Added file: http://bugs.python.org/file16591/getcallargs2.patch ___ Python tracker <http://bugs.python.org/issue3135> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3135] inspect.getcallargs()
George Sakkis added the comment: Uploaded at http://codereview.appspot.com/659041/show -- ___ Python tracker <http://bugs.python.org/issue3135> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1745] Backport of PEP 3102 "keyword-only arguments" to 2.6
George Sakkis added the comment: Is there any update on this for 2.7 ? -- nosy: +gsakkis ___ Python tracker <http://bugs.python.org/issue1745> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1745] Backport of PEP 3102 "keyword-only arguments" to 2.6
George Sakkis added the comment: FWIW I updated the patch to r79264; it applies cleanly and passes the tests but other than that I can't tell if it's ready. It would be nice to have it in 2.7 though. -- Added file: http://bugs.python.org/file16618/backport-keyword-only-arguments-full-3.patch ___ Python tracker <http://bugs.python.org/issue1745> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6409] 2to3 -j 4 generates malformed diffs
George Boutsioukis added the comment: Flushing stdout is still necessary, though not enough. The processes will still have to use some kind of synchronization, and the performance toll of adding a lock to synchronize output is negligible, given that printing to stdout takes a tiny amount of time compared to the rest of the 2to3 code. This patch seems to fix the issue without affecting performance. -- nosy: +gboutsioukis Added file: http://bugs.python.org/file16889/output_lock.diff ___ Python tracker <http://bugs.python.org/issue6409> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6409] 2to3 -j 4 generates malformed diffs
Changes by George Boutsioukis : Removed file: http://bugs.python.org/file16889/output_lock.diff ___ Python tracker <http://bugs.python.org/issue6409> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6409] 2to3 -j 4 generates malformed diffs
George Boutsioukis added the comment: I updated the patch to keep the new code as local as possible. -- Added file: http://bugs.python.org/file16895/output_lock.diff ___ Python tracker <http://bugs.python.org/issue6409> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8402] glob returns empty list with "[" character in the folder name
New submission from george hu : Have this problem in python 2.5.4 under windows. I'm trying to return a list of files in a directory by using glob. It keeps returning a empty list until I tested/adjusted folder name by removing "[" character from it. Not sure if this is a bug. glob.glob("c:\abc\afolderwith[test]\*") returns empty list glob.glob("c:\abc\afolderwithtest]\*") returns files -- messages: 103160 nosy: george.hu severity: normal status: open title: glob returns empty list with "[" character in the folder name type: behavior versions: Python 2.5 ___ Python tracker <http://bugs.python.org/issue8402> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8402] glob returns empty list with "[" character in the folder name
george hu added the comment: Ok, what if the name of the directory contains "[]" characters? What is the escape string for that? -- status: closed -> open ___ Python tracker <http://bugs.python.org/issue8402> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8402] glob returns empty list with "
george hu added the comment: Well, the listdir doesn't support "wildcard", for example, listdir("*.app"). I know the glob is kind of unix shell style expanding, but my program is running under windows, it's my tiny script to walk through a huge directory in my NAS. And there are many directories named with "[]" and "()" characters amid. May the only way is to program a filter on the listdir. On Wed, Apr 14, 2010 at 6:34 PM, Shashwat Anand wrote: > > Shashwat Anand added the comment: > > glob module does not provide what you want. > As a workaround you can try: > > os.listdir("c:\abc\afolderwith[test]") > > 07:02:52 l0nwlf-MBP:Desktop $ ls -R test\[123\]/ > 1 2 3 > >>> os.listdir('/Users/l0nwlf/Desktop/test[123]') > ['1', '2', '3'] > > Changing type to 'Feature Request' > > -- > status: pending -> open > type: behavior -> feature request > > ___ > Python tracker > <http://bugs.python.org/issue8402> > ___ > -- title: glob returns empty list with "[" character in the folder name -> glob returns empty list with " Added file: http://bugs.python.org/file16925/unnamed ___ Python tracker <http://bugs.python.org/issue8402> ___Well, the listdir doesn't support "wildcard", for example, listdir("*.app"). I know the glob is kind of unix shell style expanding, but my program is running under windows, it's my tiny script to walk through a huge directory in my NAS. And there are many directories named with "[]" and "()" characters amid. May the only way is to program a filter on the listdir. On Wed, Apr 14, 2010 at 6:34 PM, Shashwat Anand <mailto:rep...@bugs.python.org";>rep...@bugs.python.org> wrote: Shashwat Anand <mailto:anand.shash...@gmail.com";>anand.shash...@gmail.com> added the comment: glob module does not provide what you want. As a workaround you can try: os.listdir("c:\abc\afolderwith[test]") 07:02:52 l0nwlf-MBP:Desktop $ ls -R test\[123\]/ 1 2 3 >>> os.listdir('/Users/l0nwlf/Desktop/test[123]') ['1', '2', '3'] Changing type to 'Feature Request' -- status: pending -> open type: behavior -> feature request ___ Python tracker <mailto:rep...@bugs.python.org";>rep...@bugs.python.org> <http://bugs.python.org/issue8402"; target="_blank">http://bugs.python.org/issue8402> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8402] glob returns empty list with "
george hu added the comment: Well, the listdir doesn't support "wildcard", for example, listdir("*.app"). I know the glob is kind of unix shell style expanding, but my program is running under windows, it's my tiny script to walk through a huge directory in my NAS. And there are many directories named with "[]" and "()" characters amid. May be the only way is to write a filter on the listdir. -- ___ Python tracker <http://bugs.python.org/issue8402> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2090] __import__ with fromlist=[''] causes double initialization of modules
George Sakkis added the comment: Just bitten by this (through a 3rd party library that uses this pattern) and I'm wondering why it was closed as invalid. Passing a non-empty fromlist string also imports the tail module but without the side effect of double import, so it's not generally harmful. More surprisingly, a colleague discovered accidentally that the same behavior happens if you pass one or more slashes: __import__('pkg', fromlist=['', '/', '//']) imports 'pkg', 'pkg.', 'pkg./' and 'pkg.//' ! I'm not arguing that using fromlist to import the tail module is not a hack, but the behavior for empty strings and slashes (and whatever else causes multiple imports) is clearly a bug. Unless someone is actually relying on this double import behavior (very unlikely), I think it should be fixed. -- nosy: +gsakkis versions: +Python 2.7 ___ Python tracker <http://bugs.python.org/issue2090> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2090] __import__ with fromlist=
George Sakkis added the comment: > When you use an empty string in fromlist you are essentially simulating > ``from pkg import`` which makes absolutely no sense, so no one has > cared enough to try to fix this. ``from pkg import __bogus__, 123, @$%`` doesn't make sense either and yet the equivalent __import__ call doesn't cause multiple imports neither binds __name__ to bogus strings, it just imports and returns pkg. > Since ``from pkg import`` makes no sense, would it be okay if > __import__ with an empty fromlist or slashes raised an error? No, this would break lots of working code and would be inconsistent anyway with other invalid fromlist inputs. The backwards compatible solution would be to treat the empty string (and slashes) like every other input, i.e. prevent multiple imports. -- ___ Python tracker <http://bugs.python.org/issue2090> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2090] __import__ with fromlist=
George Sakkis added the comment: More fun findings: dots are special-cased too, but only if they don't appear consecutively (!); ~$ cat pkg/__init__.py print __name__ ~$ python -c "__import__('pkg', fromlist=['.'])" pkg pkg.. ~$ python -c "__import__('pkg', fromlist=['..'])" pkg ~$ python -c "__import__('pkg', fromlist=['...'])" pkg ~$ python -c "__import__('pkg', fromlist=['././//.'])" pkg pkg.././//. ~$ python -c "__import__('pkg', fromlist=['././../'])" pkg -- ___ Python tracker <http://bugs.python.org/issue2090> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2090] __import__ with fromlist=
George Sakkis added the comment: FWIW attached is a patch that allows only valid identifiers before calling import_submodule(), and returns silently otherwise (for backwards compatibility). For the record, the reason that empty strings and some combinations of slashes/dots caused the double import was that they were concatenated to the path, and if the final path was a valid directory and contained an __init__.py it was imported. E.g. __import__('pkg.subpkg', fromlist=['/../.']) ends up looking in "pkg/subpkg//../.". On the surface this seems like a potential directory traversal attack hole, although I couldn't get past 'pkg' by passing '../../../', so I guess there must be other checks before attempting the import. -- keywords: +patch Added file: http://bugs.python.org/file16971/issue_2090.patch ___ Python tracker <http://bugs.python.org/issue2090> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2090] __import__ with fromlist=
George Sakkis added the comment: > On the surface this seems like a potential directory traversal attack > hole, although I couldn't get past 'pkg' by passing '../../../', so I > guess there must be other checks before attempting the import. I rushed to post; it turns out one *can* access packages in parent directories, so I think it's accurate to describe it as a directory traversal hole. -- ___ Python tracker <http://bugs.python.org/issue2090> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2831] Adding start to enumerate()
George Sakkis added the comment: Just discovered this by chance; I would probably have noticed it earlier if the docstring had been updated. Let me know if it needs a new documentation bug ticket and I'll create one. Pretty handy feature by the way, thanks for adding it! -- nosy: +gsakkis ___ Python tracker <http://bugs.python.org/issue2831> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8639] Allow callable objects in inspect.getargspec
New submission from George Sakkis : Not sure if this has been brought before but how about extending getargspec to work with callable instances, i.e. make it equivalent to getargspec(obj.__call__) ? -- components: Library (Lib) messages: 105166 nosy: gsakkis priority: normal severity: normal status: open title: Allow callable objects in inspect.getargspec type: feature request versions: Python 2.7, Python 3.2 ___ Python tracker <http://bugs.python.org/issue8639> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1529] Error when passing a file object to tarfile.open()
George Notaras added the comment: Indeed, I have downloaded the latest tarfile module from svn and it works as expected. I should have done this in the first place. __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1529> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1531] tarfile.open(fileobj=f) and bad metadata of the first file within the archive
New submission from George Notaras: Assume the following situation: - a healthy and uncompressed tar file: a.tar - the metadata of the 1st and second files within the archive start at positions 0 and 756 (realistic example values) I partially damage 200 bytes of metadata (byte range 0-500) of the first archived file: f = open("a.tar", "rb+") f.seek(100) f.write("0"*200) Now, I seek to the start of the 2nd archived file's metadata: f.seek(756) And I try to open the tar archive using tarfile.open() passing the previous fileobject to it. import tarfile f_tar = tarfile.open(fileobj=f) Traceback (most recent call last): File "", line 1, in File "tarfile.py", line 1143, in open raise ReadError("file could not be opened successfully") tarfile.ReadError: file could not be opened successfully Wouldn't the expected behaviour be to successfully open the tar archive at offset 756? It seems that tarfile.open(fileobj=f) seeks to position 0 of the fileobject f, fails to read the 1st archived file's metadata and throws an exception. -- components: Extension Modules messages: 58026 nosy: GeorgeNotaras severity: normal status: open title: tarfile.open(fileobj=f) and bad metadata of the first file within the archive type: behavior versions: Python 2.5 __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1531> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1529] Error when passing a file object to tarfile.open()
New submission from George Notaras: Assume a healthy uncompressed tar file: a.tar When trying to open the tarfile using a fileobject, there is always an exception: >>> f_raw = open("a.tar", "rb") >>> import tarfile >>> f_tar = tarfile.open(mode="r:", fileobj=f_raw) Traceback (most recent call last): File "", line 1, in File "/usr/lib/python2.5/tarfile.py", line 1157, in open return func(name, filemode, fileobj) File "/usr/lib/python2.5/tarfile.py", line 1183, in taropen return cls(name, mode, fileobj) File "/usr/lib/python2.5/tarfile.py", line 1047, in __init__ self.name = os.path.abspath(name) File "/usr/lib/python2.5/posixpath.py", line 402, in abspath if not isabs(path): File "/usr/lib/python2.5/posixpath.py", line 49, in isabs return s.startswith('/') AttributeError: 'NoneType' object has no attribute 'startswith' -- components: Extension Modules messages: 58011 nosy: GeorgeNotaras severity: normal status: open title: Error when passing a file object to tarfile.open() type: crash versions: Python 2.5 __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1529> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1531] tarfile.open(fileobj=f) and bad metadata of the first file within the archive
George Notaras added the comment: Thanks for the quick fix and the workaround. You are right about position 756. I hadn't spent enough time studying the ''ustar'' format. __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1531> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1640] Enhancements for mathmodule
George Castillo added the comment: Is there still interest in implementing the inverse hyperbolic trig functions for real numbers? I would be willing to explore this if there is. -- nosy: +gmcastil __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1640> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1640] Enhancements for mathmodule
George Castillo added the comment: Just a quick addition here regarding the singularities to these functions. The atanh(x) is only defined for |x| < 1, so atanh(1) or atanh(-1) isn't singular there so much as simply isn't defined. So, even though the function approaches infinite as x -> 1, it wouldn't really be correct to return a value at |x| = 1. I think raising an exception at those points would be more correct. __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1640> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1640] Enhancements for mathmodule
George Castillo added the comment: I misunderstood the rationale for the function returning infinite at those points - I didn't realize that C99 was the governing force behind the implementation of these functions, rather than mathematical rigor. Thanks for pointing it out. In that case, I agree with you that, in order to conform, these functions would need to return the values required by those documents. __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1640> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2546] Python-2.5.2: crash in visit_decref () at Modules/gcmodule.c:270
New submission from George Verbitsky <[EMAIL PROTECTED]>: Program received signal SIGSEGV, Segmentation fault. [Switching to Thread -1208408368 (LWP 2816)] 0x080edccd in visit_decref (op=0xbf9289ff, data=0x0) at Modules/gcmodule.c:270 270 if (PyObject_IS_GC(op)) { (gdb) bt #0 0x080edccd in visit_decref (op=0xbf9289ff, data=0x0) at Modules/gcmodule.c:270 #1 0x08099e19 in tupletraverse (o=0xb7f2380c, visit=0x80edcc0 , arg=0x0) at Objects/tupleobject.c:443 #2 0x080ee63e in collect (generation=0) at Modules/gcmodule.c:295 #3 0x080ef159 in _PyObject_GC_NewVar (tp=0x8170700, nitems=14) at Modules/gcmodule.c:897 #4 0x08111f10 in PyFrame_New (tstate=0x8bdd128, code=0xb7d04410, globals=0xb7cd3934, locals=0x0) at Objects/frameobject.c:614 #5 0x080c521a in PyEval_EvalFrameEx (f=0x8cf0fb4, throwflag=0) at Python/ceval.c:3639 #6 0x080c5265 in PyEval_EvalFrameEx (f=0x8ced7bc, throwflag=0) at Python/ceval.c:3650 #7 0x080c5265 in PyEval_EvalFrameEx (f=0x8ced484, throwflag=0) at Python/ceval.c:3650 #8 0x080c5265 in PyEval_EvalFrameEx (f=0x8ce7dbc, throwflag=0) at Python/ceval.c:3650 #9 0x080c5265 in PyEval_EvalFrameEx (f=0x8ce7c5c, throwflag=0) at Python/ceval.c:3650 #10 0x080c6075 in PyEval_EvalCodeEx (co=0xb7c2d608, globals=0xb7c18e84, locals=0x0, args=0xb7f28378, argcount=1, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2831 #11 0x08112871 in function_call (func=0xb7c2af44, arg=0xb7f2836c, kw=0x0) at Objects/funcobject.c:517 #12 0x08061a17 in PyObject_Call (func=0x7, arg=0xb7f2836c, kw=0x0) at Objects/abstract.c:1860 #13 0x08067937 in instancemethod_call (func=0xb7f1302c, arg=0xb7f2836c, kw=0x0) at Objects/classobject.c:2497 #14 0x08061a17 in PyObject_Call (func=0x7, arg=0xb7f5202c, kw=0x0) at Objects/abstract.c:1860 #15 0x0809d7cb in slot_tp_init (self=0xb7c3442c, args=0xb7f5202c, kwds=0x0) at Objects/typeobject.c:4862 #16 0x080a0393 in type_call (type=0x8c5d04c, args=0xb7f5202c, kwds=0x0) at Objects/typeobject.c:436 #17 0x08061a17 in PyObject_Call (func=0x7, arg=0xb7f5202c, kw=0x0) at Objects/abstract.c:1860 #18 0x080c1149 in PyEval_EvalFrameEx (f=0x8ce7afc, throwflag=0) at Python/ceval.c:3775 #19 0x080c6075 in PyEval_EvalCodeEx (co=0xb7c2d4a0, globals=0xb7c83934, locals=0x0, args=0xb7f23818, argcount=1, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2831 #20 0x08112871 in function_call (func=0xb7c2ae64, arg=0xb7f2380c, kw=0x0) at Objects/funcobject.c:517 #21 0x08061a17 in PyObject_Call (func=0x7, arg=0xb7f2380c, kw=0x0) at Objects/abstract.c:1860 #22 0x080be26c in PyEval_CallObjectWithKeywords (func=0xb7c2ae64, arg=0xb7f2380c, kw=0x0) at Python/ceval.c:3433 #23 0x08061c30 in PyObject_CallObject (o=0xb7c2ae64, a=0xb7f2380c) at Objects/abstract.c:1851 #24 0x08061879 in C2py (func=0x81380c5 "backend", nargs=1) at C2py.c:52 #25 0x0806191d in backend (output_filename=0xbf9289ff "cla") at backend.c:5 #26 0x08056fa5 in main (argc=3, argv=0xbf9271b4) at main.c:33 (gdb) -- components: Interpreter Core messages: 64915 nosy: garikvm severity: normal status: open title: Python-2.5.2: crash in visit_decref () at Modules/gcmodule.c:270 versions: Python 2.5 __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2546> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2546] Python-2.5.2: crash in visit_decref () at Modules/gcmodule.c:270
George Verbitsky <[EMAIL PROTECTED]> added the comment: Thank you, Amaury, very much for helping me with this one. George Amaury Forgeot d'Arc <[EMAIL PROTECTED]> wrote: Amaury Forgeot d'Arc added the comment: The crash is because of an error in your C code: in backend.c:: void backend(char *output_filename) { C2py("backend", 1, output_filename); } But your C2py function expects a variable number of PyObject*. I found this by disabling the garbage collector: then the program crashes in C2py.c at the instruction "Py_DECREF(pArgs);" -- priority: release blocker -> normal resolution: -> invalid status: open -> closed __ Tracker __ - You rock. That's why Blockbuster's offering you one month of Blockbuster Total Access, No Cost. Added file: http://bugs.python.org/file9949/unnamed __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2546> __Thank you, Amaury, very much for helping me with this one.GeorgeAmaury Forgeot d'Arc <[EMAIL PROTECTED]> wrote: Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment:The crash is because of an error in your C code:in backend.c::void backend(char *output_filename){C2py("backend", 1, output_filename); }But your C2py function expects a variable number of PyObject*.I found this by disabling the garbage collector: then the programcrashes in C2py.c at the instruction "Py_DECREF(pArgs);"--priority: release blocker -> normalresolution: -> invalidstatus: open -> closed__Tracker <[EMAIL PROTECTED]>__ You rock. That's why Blockbuster's offering you http://us.rd.yahoo.com/evt=47523/*http://tc.deals.yahoo.com/tc/blockbuster/text5.com";>one month of Blockbuster Total Access, No Cost.___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4734] broken link for 2.5.3 doc download
New submission from George Yoshida : Download page for 2.5.3 documantation is not ready. --- Go to Documentation top page: http://docs.python.org/ click "Previous versions" click "Python 2.5.3" click "Download all these documents" But this URL, http://www.python.org/doc/2.5.3/download/ , gives 404 NOT FOUND ERROR. -- assignee: georg.brandl components: Documentation messages: 78252 nosy: georg.brandl, quiver severity: normal status: open title: broken link for 2.5.3 doc download versions: Python 2.5 ___ Python tracker <http://bugs.python.org/issue4734> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2279] distutils sdist add_defaults does not add data_files
George Sakkis added the comment: Agreed; package_data are also ignored by sdist. Unfortunately, neither setuptools seems to work as expected on sdist but at least bdist_egg does. MANIFEST.in is an ugly hack and should be deprecated; you shouldn't have to repeat yourself in two files. -- nosy: +gsakkis ___ Python tracker <http://bugs.python.org/issue2279> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2279] distutils sdist add_defaults does not add data_files
George Sakkis added the comment: I didn't mean to imply that automagic discovery based on external version control software is better than MANIFEST.in; I favor explicitness here as well. It's just that this information can (and often has to) be duplicated in setup.py as 'package_data' or 'data_files'. For cases that package_data/data_files are not enough, setup.py should be extended to handle them, instead of requiring to write and keep in sync a separate file with its own mini syntax. ___ Python tracker <http://bugs.python.org/issue2279> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2279] distutils sdist add_defaults does not add data_files
George Sakkis added the comment: By an equivalent option in setup() of course. I'm not against the *functionality* of MANIFEST.in but on that (a) it's a second file you have to remember to write and maintain in addition to setup.py (b) has its own ad-hoc syntax instead of python and (c) overlaps in scope with the package_data and data_files of setup.py. FWIW I wrote a module that overrides the default build_py and sdist commands with versions that allow specifying package_data recursively (while preserving file permissions, unlike the - buggy IMO - behavior of distutils) so that I can get rid of the MANIFEST.in. ___ Python tracker <http://bugs.python.org/issue2279> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37882] Code folding in IDLE
New submission from George Zhang : Congrats on adding line numbers to IDLE. With this change, a change to add code folding could be done more easily as the folding can reference the line numbers. Many other IDEs have code folding but IDLE should also have it. Code folding could be done with a +/- to the right of the line numbers and can show/hide the indented suite under the header (compound statements). It should use indentation as tool to figure out which parts can be folded. Blank lines don't count. Single line compound statements cannot be folded. Something like this: 1 - | def spam(ham): 2 - | if ham: 3| eggs() 4| 5 + | def frob(): 8| 9 - | FOO = ( 10 | 1, 2, 3, 4, 11 | 5, 6, 7, 8, 12 | ) 13 | 14 | BAR = ( 17 | ) 18 | 19 | if True: print("True") 20 | -- assignee: terry.reedy components: IDLE messages: 349922 nosy: GeeVye, terry.reedy priority: normal severity: normal status: open title: Code folding in IDLE versions: Python 3.7, Python 3.8, Python 3.9 ___ Python tracker <https://bugs.python.org/issue37882> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37882] Code folding in IDLE
Change by George Zhang : -- type: -> enhancement ___ Python tracker <https://bugs.python.org/issue37882> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37902] Add scrolling for IDLE browsers
New submission from George Zhang : I've just started using IDLE's module/path browsers and they offer a lot! Putting aside the issue of them opening in separate windows, they have a small change that could be made to improve them. Both browsers have scrollbars, but (for me at least) I cannot scroll using my mouse. I propose adding support for scrolling similar to the editor/shell windows. -- assignee: terry.reedy components: IDLE messages: 350043 nosy: GeeVye, terry.reedy priority: normal severity: normal status: open title: Add scrolling for IDLE browsers type: enhancement versions: Python 3.7, Python 3.8, Python 3.9 ___ Python tracker <https://bugs.python.org/issue37902> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37902] Add scrolling for IDLE browsers
Change by George Zhang : -- keywords: +patch pull_requests: +15072 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/15360 ___ Python tracker <https://bugs.python.org/issue37902> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37902] Add scrolling for IDLE browsers
George Zhang added the comment: I looked at the code for scrolling and moved it over to the ScrolledCanvas and TreeNode (because it uses a Label that sits on the canvas, meaning we have to rebind it here). I haven't figured out how to add the scroll-by-pressing-down-and-moving way but I'll look further into it. About the factoring out part, the ScrolledCanvas and TreeNode are both used by the two browsers, meaning that no code has to be added to them. In the future, a factory function could be made that when called with a canvas, it returns an event callback function that can be bound to the canvas. When called, it scrolls depending on the event type and other info. -- ___ Python tracker <https://bugs.python.org/issue37902> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37902] Add scrolling for IDLE browsers
Change by George Zhang : -- pull_requests: -15072 ___ Python tracker <https://bugs.python.org/issue37902> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37902] Add scrolling for IDLE browsers
Change by George Zhang : -- pull_requests: +15076, 15077 pull_request: https://github.com/python/cpython/pull/15360 ___ Python tracker <https://bugs.python.org/issue37902> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37902] Add scrolling for IDLE browsers
Change by George Zhang : -- pull_requests: +15076 pull_request: https://github.com/python/cpython/pull/15360 ___ Python tracker <https://bugs.python.org/issue37902> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37902] Add scrolling for IDLE browsers
Change by George Zhang : -- pull_requests: -15077 ___ Python tracker <https://bugs.python.org/issue37902> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37902] Add scrolling for IDLE browsers
Change by George Zhang : -- pull_requests: -15076 ___ Python tracker <https://bugs.python.org/issue37902> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37902] Add scrolling for IDLE browsers
Change by George Zhang : -- pull_requests: +15079 pull_request: https://github.com/python/cpython/pull/15368 ___ Python tracker <https://bugs.python.org/issue37902> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37902] Add scrolling for IDLE browsers
George Zhang added the comment: Looks like my PRs are getting out of hand... This is the final PR :P -- ___ Python tracker <https://bugs.python.org/issue37902> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37902] Add scrolling for IDLE browsers
George Zhang added the comment: I renamed mousescroll to handlescroll as it's an independent callback function and I think it fits its use case better. I can keep it as mousescroll if you like though. The handlescroll function is now a standalone module function in tree.py and the EditorWindow imports it for use (instead of creating its own function). Its signature is `handlescroll(event, widget=None)` where event is the event (yeah...) and widget is an optional argument that overrides the widget to call `yview(SCROLL, lines, "units")` on. The second argument was added so that the nasty labels don't have to use the same function but with one line changed (we redirect handlescroll to use `self.canvas` because `event.widget` would refer to the Label which has no yview function). I've added tests on handlescroll with different events. I've also added a test on multicall that checks to test if MultiCallCreator overrides yview. Sorry about the PR closing and reopening. I was panicking about commiting more than once and saw that I should make a new branch for the patch (instead of using master branch). -- ___ Python tracker <https://bugs.python.org/issue37902> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37902] Add scrolling for IDLE browsers
George Zhang added the comment: Also, how should I get the new code coverage percentage (or should it be ignored for now)? I'm thinking of adding a few more tests that send invalid events which would raise KeyError but I don't think that this behaviour will be used (and it's not documented). Should it give a more specific error message? The test for multicall is only targeting the MultiCall class that gets returned. How should it check for any possible subclasses of it? -- ___ Python tracker <https://bugs.python.org/issue37902> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37461] email.parser.Parser hang
Change by George Zhang : -- pull_requests: +15136 pull_request: https://github.com/python/cpython/pull/15430 ___ Python tracker <https://bugs.python.org/issue37461> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37461] email.parser.Parser hang
Change by George Zhang : -- pull_requests: +15137 pull_request: https://github.com/python/cpython/pull/15432 ___ Python tracker <https://bugs.python.org/issue37461> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43523] Handling Ctrl+C when waiting on stdin on Windows via winrs
New submission from George Sovetov : Ctrl+C alone has no effect, but Ctrl+Break works: ``` winrs -r:127.0.0.1:20465 -u:Administrator -p:qweasd123 python -c "import sys;sys.stdin.read(1)" ``` Although, if I press Ctrl+C, type zero or more symbols and then press Enter, KeyboardInterrupt is raised: ``` lalala Traceback (most recent call last): File "", line 1, in File "C:\Program Files\Python39\lib\encodings\cp1252.py", line 22, in decode def decode(self, input, final=False): KeyboardInterrupt ^C^C ``` With the following commands, both Ctrl+C and Ctrl+Break work: ``` winrs -r:127.0.0.1:20465 -u:Administrator -p:qweasd123 python -c "import time;time.sleep(10)" "c:\Program Files\Python39\python.exe" -c "import sys; sys.stdin.read(1)" "c:\Program Files\Python39\python.exe" -c "import time;time.sleep(10)" ``` I faced this issue when working with WSMV (Windows remoting API) directly, but I reproduced this with winrs to make sure it's not a bug in my code. I send the Ctrl+C signal, got a no-error response, then poll the running command. It behaves as if a signal had no effect. -- messages: 388890 nosy: sovetov priority: normal severity: normal status: open title: Handling Ctrl+C when waiting on stdin on Windows via winrs versions: Python 3.9 ___ Python tracker <https://bugs.python.org/issue43523> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44875] Update dis.findlinestarts documentaiton to reflect new usage of `co_lines` (PEP 626)
New submission from George King : `dis.findlinestarts()` has been changed to use the no `co_lines()` function. (Blame indicates commit 877df851c3e by Mark Shannon.) However the docs currently state that it uses the older `co_firstlineno` and `co_lnotab`: https://docs.python.org/3.10/library/dis.html#dis.findlinestarts. My cursory understanding of `dis.py` internals is that `get_instructions` relies on `findlinestarts`, implying that both of these APIs are going to return different line numbers than they did previously. I am perfectly fine with this, and hopeful that the PEP 626 changes will improve tool accuracy. At minimum the `dis` docs should be updated. I also suggest that some kind of note about this be added to the PEP 626 text, because the way it reads now suggests that it avoids breakage by creating the new `co_lines` API. However it seems that users of the higher level dis APIs are going to see subtly different behavior. FWIW I am fine with the change, and I hope this doesn't instigate a reversion to the old behavior. `lnotabs` semantics were very cryptic and seemed rather broken when I attempted to use it years ago. I am revisiting an experimental code coverage tool in part because of the PEP. -- assignee: docs@python components: Documentation messages: 399290 nosy: Mark.Shannon, docs@python, gwk priority: normal severity: normal status: open title: Update dis.findlinestarts documentaiton to reflect new usage of `co_lines` (PEP 626) versions: Python 3.10 ___ Python tracker <https://bugs.python.org/issue44875> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44875] Update dis.findlinestarts documentaiton to reflect new usage of `co_lines` (PEP 626)
George King added the comment: I should also mention that my reading was not exhaustive, so there may be other docs that need updating as well. -- ___ Python tracker <https://bugs.python.org/issue44875> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43683] Handle generator (and coroutine) state in the bytecode.
Damien George added the comment: It looks like this change introduced a subtle, and maybe intended (?), behavioural change. Consider (from MicroPython's test suite): def f(): n = 0 while True: n = yield n + 1 print(n) g = f() try: g.send(1) except TypeError: print("caught") print(g.send(None)) print(g.send(100)) print(g.send(200)) This used to work prior to commit b37181e69209746adc2119c471599a1ea5faa6c8. But after that commit it fails on the print(g.send(None)) because the generator is now stopped. -- nosy: +dpgeorge ___ Python tracker <https://bugs.python.org/issue43683> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43683] Handle generator (and coroutine) state in the bytecode.
Damien George added the comment: Thanks for confirming the bug. Sending non-None to a not-started generator could arguably be case (2), because that's exactly the semantics introduced by the commit that broke the test case :) Honestly I don't have a strong opinion on which way this goes. But I think it would be interesting to know if there was code out there that relied on the original behaviour. -- ___ Python tracker <https://bugs.python.org/issue43683> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45900] Type annotations needed for convenience functions in ipaddress module
New submission from William George : The convenience factory functions in the ipaddress module each return one of two types (IPv4Network vs IPv6Network, etc). Modern code wants to be friendly to either stack, and these functions are great at enabling that, but current implementation blocks type inference for most (all?) IDEs. Proposal is easy enough, specifying return type of e.g. `Union[IPv4Network, IPv6Network]` for these factory functions. I believe the rest of the public interface for this module is unambiguous enough that annotations aren't needed, but if others see value they could be added easily enough. For some of these there exists a version-independent base class that could be referenced instead of a union, but it's not clear to me how well IDEs will actually honor such an annotation referencing an internal class (single-underscore). My limited testing of that didn't work well and there's no such base class for the Interface classes anyway. PR for this incomming. -- components: Library (Lib) messages: 407005 nosy: pmoody, wrgeorge1983 priority: normal severity: normal status: open title: Type annotations needed for convenience functions in ipaddress module type: enhancement versions: Python 3.10, Python 3.11, Python 3.9 ___ Python tracker <https://bugs.python.org/issue45900> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45900] Type annotations needed for convenience functions in ipaddress module
Change by William George : -- keywords: +patch pull_requests: +28015 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29778 ___ Python tracker <https://bugs.python.org/issue45900> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45904] Pasting the U00FF character into Python REPL misinterprets character
New submission from George King : Using macOS 11.6 Terminal.app with Python 3.10.0 installed directly from python.org. I open the REPL. If I enter `char(0xff)` I get back 'ÿ' as expected (U00FF LATIN SMALL LETTER Y WITH DIAERESIS). However, If I copy this character with surrounding quotes, and then paste it into the REPL, it pastes as '' and evaluates to the empty string. If I copy it without quotes and then paste into the REPL, I see nothing. When I hit return, the prompt renders as `>>> ^M>>>`. This suggests that the character is getting misinterpreted as a control character or something. If I paste it into the terminal shell when the Python REPL is not running, it appears as the latin1 letter that I expect. If I run `python3 -c 'print("ÿ")'` the character prints fine. It seems to me that the python REPL is setting some terminal mode that fails on this particular character. Perhaps this is a problem with the macOS readline/libedit implementation? It seems that only U00FF is problematic; U00FE and U01000 both paste in just fine. I verified that my terminal profile is set to UTF-8 encoding. I also repeated this experiment in the Kitty terminal emulator, and got identical results. Here is the readline version: >>> readline._READLINE_LIBRARY_VERSION 'EditLine wrapper' >>> readline._READLINE_RUNTIME_VERSION 1026 >>> readline._READLINE_VERSION 1026 -- messages: 407065 nosy: gwk priority: normal severity: normal status: open title: Pasting the U00FF character into Python REPL misinterprets character type: behavior versions: Python 3.10 ___ Python tracker <https://bugs.python.org/issue45904> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45904] Pasting the U00FF character into Python REPL misinterprets character
George King added the comment: Edit: `chr(0xff)` -- ___ Python tracker <https://bugs.python.org/issue45904> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue35164] socket.getfqdn and socket.gethostbyname fail on MacOS
George Hickman added the comment: I came across this today with the same timeout behaviour on macOS 10.14.6. After some digging I tracked it down to the Search Domains setting of my local network, this was set to "local", removing that immediately fixed the issue. -- nosy: +ghickman ___ Python tracker <https://bugs.python.org/issue35164> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue39640] fall back os.fdatasync() to fsync() on POSIX systems without fdatasync() support
New submission from George Melikov : POSIX fdatasync() is similar to fsync() but it tries not to sync non-needed metadata. If POSIX OS doesn't have it - it's safe to use fsync() (If we need to sync data to disk - we have to use one of these functions). This change will help to run code with fdatasync() on MacOS without fallbacks in Python code. I'll propose a PR soon. -- components: IO messages: 362025 nosy: gmelikov priority: normal severity: normal status: open title: fall back os.fdatasync() to fsync() on POSIX systems without fdatasync() support ___ Python tracker <https://bugs.python.org/issue39640> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue39640] fall back os.fdatasync() to fsync() on POSIX systems without fdatasync() support
Change by George Melikov : -- keywords: +patch pull_requests: +17893 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18516 ___ Python tracker <https://bugs.python.org/issue39640> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue39640] fall back os.fdatasync() to fsync() on POSIX systems without fdatasync() support
George Melikov added the comment: If there is a way not to sync data - you should use neither fdatasync nor fsync. So IMHO if someone wants to sync data and want to use fdatasync - I see the only way on MacOS is to use fsync(). > Note also that this change will not help to run code with fdatasync() on > MacOS without fallbacks in Python code until you drop support of all Python > versions older than 3.9. I agree, but I propose to make this change in 3.9 to get it somewhere in future. -- ___ Python tracker <https://bugs.python.org/issue39640> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue39640] fall back os.fdatasync() to fsync() on POSIX systems without fdatasync() support
George Melikov added the comment: I want to add that it's a usual practice: - https://github.com/libuv/libuv/pull/1580/files/bdd987a9b4347164e31e22d2d5ce06fbb5ebc859 - https://rev.ng/gitlab/revng/qemu/commit/6f1953c4c14566d3303709869fd26201828b3ccf -- ___ Python tracker <https://bugs.python.org/issue39640> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue27035] Cannot set exit code in atexit callback
George King added the comment: I think we should change the documentation to expand the parenthetical " (unless SystemExit is raised)" to a complete explanation of that special case. -- ___ Python tracker <https://bugs.python.org/issue27035> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue39640] fall back os.fdatasync() to fsync() on POSIX systems without fdatasync() support
George Melikov added the comment: PR rebased and ready to review. -- ___ Python tracker <https://bugs.python.org/issue39640> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue42409] Interpreter exit blocks waiting for ThreadPoolExecutor.map
New submission from George Sakkis : ThreadPoolExecutor.map() prevents interpreter exit if there is a reference to the generator it returns. In the attached script: - `python threadpool_map.py run1` exits as soon as the exception is raised on the main thread. This is the desired behavior in our case. - `python threadpool_map.py run2` keeps running until the thread worker processes all queued work items. The only difference from `run1` is that the result of `ThreadPoolExecutor.map()` is assigned to a variable. - `python threadpool_map.py run3` has a `finally` block that shuts down the executor without waiting. Still the worker thread keeps running even after the shutdown. Initially it seemed like https://bugs.python.org/issue36780 but there is no change in the behavior after commenting out the `atexit.register(_python_exit)` call (for the `run2` case at least). -- components: Library (Lib) files: threadpool_map.py messages: 381433 nosy: gsakkis priority: normal severity: normal status: open title: Interpreter exit blocks waiting for ThreadPoolExecutor.map type: behavior versions: Python 3.6, Python 3.7, Python 3.8 Added file: https://bugs.python.org/file49608/threadpool_map.py ___ Python tracker <https://bugs.python.org/issue42409> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue42409] Interpreter exit blocks waiting for ThreadPoolExecutor.map
Change by George Stefos : -- nosy: +stefosgiwrgos ___ Python tracker <https://bugs.python.org/issue42409> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37297] function changed when pickle bound method object
New submission from George Xie : if we create a bound method object `f` with function object `A.f` and instance object `B()`, when pickling this bound method object: import pickle class A(): def f(self): pass class B(): def f(self): pass o = B() f = A.f.__get__(o) pf = pickle.loads(pickle.dumps(f)) print(f) print(pf) we get: > > the underlaying function are lost, changed from `A.f` to `B.f`. as pickle calls `__reduce__` method of `method object`, IMO [its implementation][1] simply ignored the real function, whcih is not right. I have tried a [wordaround][2]: import types import copyreg def my_reduce(obj): return (obj.__func__.__get__, (obj.__self__,)) copyreg.pickle(types.MethodType, my_reduce) [1]: https://github.com/python/cpython/blob/v3.7.3/Objects/classobject.c#L75-L89 [2]: https://stackoverflow.com/a/56614748/4201810 -- components: Library (Lib) messages: 345721 nosy: georgexsh priority: normal severity: normal status: open title: function changed when pickle bound method object type: behavior versions: Python 3.7 ___ Python tracker <https://bugs.python.org/issue37297> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37297] function changed when pickle bound method object
Change by George Xie : -- keywords: +patch Added file: https://bugs.python.org/file48424/0001-fix-bound-method-__reduce__-bug.patch ___ Python tracker <https://bugs.python.org/issue37297> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37391] MacOS Touchpad scrolling crashes IDLE
New submission from George Pantazes : IDLE crashes if the user scrolls with the Mac mousepad (using two fingers, either up or down). ```$ python -m idlelib # Then I use the mousepad to scroll in the IDLE window Traceback (most recent call last): File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 85, in _run_code exec(code, run_globals) File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/idlelib/__main__.py", line 7, in idlelib.pyshell.main() File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/idlelib/pyshell.py", line 1572, in main root.mainloop() File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/tkinter/__init__.py", line 1283, in mainloop self.tk.mainloop(n) UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte ``` System Info: MacOS Mojave 10.14.5 (18F132) Python: 3.7.3 (default, Mar 27 2019, 09:23:15) [Clang 10.0.1 (clang-1001.0.46.3)] sys.version_info(major=3, minor=7, micro=3, releaselevel='final', serial=0) -- assignee: terry.reedy components: IDLE messages: 346445 nosy: George Pantazes, terry.reedy priority: normal severity: normal status: open title: MacOS Touchpad scrolling crashes IDLE type: crash versions: Python 3.7 ___ Python tracker <https://bugs.python.org/issue37391> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37391] MacOS Touchpad scrolling crashes IDLE
George Pantazes added the comment: Also happens when I plug in a conventional mouse and use the mouse scrollwheel (so it's not just the touchpad scrolling!). -- ___ Python tracker <https://bugs.python.org/issue37391> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37391] MacOS Touchpad scrolling crashes IDLE
George Pantazes added the comment: Alright folks, sorry there's going to be a lot of pasted blocks of output, so just look for where I @ your name to address your questions. @ned.deily, here is the output of those info commands. ``` ➜ python3 -m test.pythoninfo Python debug information CC.version: Apple LLVM version 10.0.1 (clang-1001.0.46.4) Py_DEBUG: No (sys.gettotalrefcount() missing) _decimal.__libmpdec_version__: 2.4.2 builtins.float.double_format: IEEE, little-endian builtins.float.float_format: IEEE, little-endian core_config[_disable_importlib]: 0 core_config[allocator]: None core_config[argv]: ['-m'] core_config[base_exec_prefix]: '/Users/georgep/Documents/workspace/r-tester/venv/bin/..' core_config[base_prefix]: '/Users/georgep/Documents/workspace/r-tester/venv/bin/..' core_config[coerce_c_locale]: 0 core_config[coerce_c_locale_warn]: 0 core_config[dev_mode]: 0 core_config[dump_refs]: 0 core_config[exec_prefix]: '/Users/georgep/Documents/workspace/r-tester/venv/bin/..' core_config[executable]: '/Users/georgep/Documents/workspace/r-tester/venv/bin/python3' core_config[faulthandler]: 0 core_config[hash_seed]: 0 core_config[home]: None core_config[ignore_environment]: 0 core_config[import_time]: 0 core_config[install_signal_handlers]: 1 core_config[malloc_stats]: 0 core_config[module_search_path_env]: None core_config[module_search_paths]: ['/Users/georgep/Documents/workspace/r-tester/venv/bin/../lib/python37.zip', '/Users/georgep/Documents/workspace/r-tester/venv/bin/../lib/python3.7', '/Users/georgep/Documents/workspace/r-tester/venv/bin/../lib/python3.7/lib-dynload'] core_config[prefix]: '/Users/georgep/Documents/workspace/r-tester/venv/bin/..' core_config[program]: 'python3' core_config[program_name]: 'python3' core_config[show_alloc_count]: 0 core_config[show_ref_count]: 0 core_config[tracemalloc]: 0 core_config[use_hash_seed]: 0 core_config[utf8_mode]: 0 core_config[warnoptions]: [] core_config[xoptions]: [] datetime.datetime.now: 2019-06-25 10:50:02.453944 expat.EXPAT_VERSION: expat_2.2.6 global_config[Py_BytesWarningFlag]: 0 global_config[Py_DebugFlag]: 0 global_config[Py_DontWriteBytecodeFlag]: 0 global_config[Py_FileSystemDefaultEncodeErrors]: 'surrogateescape' global_config[Py_FileSystemDefaultEncoding]: 'utf-8' global_config[Py_FrozenFlag]: 0 global_config[Py_HasFileSystemDefaultEncoding]: 1 global_config[Py_HashRandomizationFlag]: 1 global_config[Py_IgnoreEnvironmentFlag]: 0 global_config[Py_InspectFlag]: 0 global_config[Py_InteractiveFlag]: 0 global_config[Py_IsolatedFlag]: 0 global_config[Py_NoSiteFlag]: 0 global_config[Py_NoUserSiteDirectory]: 0 global_config[Py_OptimizeFlag]: 0 global_config[Py_QuietFlag]: 0 global_config[Py_UTF8Mode]: 0 global_config[Py_UnbufferedStdioFlag]: 0 global_config[Py_VerboseFlag]: 0 locale.encoding: UTF-8 main_config[argv]: ['/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/test/pythoninfo.py'] main_config[base_exec_prefix]: '/Users/georgep/Documents/workspace/r-tester/venv/bin/..' main_config[base_prefix]: '/Users/georgep/Documents/workspace/r-tester/venv/bin/..' main_config[exec_prefix]: '/Users/georgep/Documents/workspace/r-tester/venv/bin/..' main_config[executable]: '/Users/georgep/Documents/workspace/r-tester/venv/bin/python3' main_config[install_signal_handlers]: 1 main_config[module_search_path]: ['/Users/georgep/Documents/workspace/r-tester', '/Users/georgep/Documents/workspace/r-tester/venv/lib/python37.zip', '/Users/georgep/Documents/workspace/r-tester/venv/lib/python3.7', '/Users/georgep/Documents/workspace/r-tester/venv/lib/python3.7/lib-dynload', '/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7', '/Users/georgep/Documents/workspace/r-tester/venv/lib/python3.7/site-packages'] main_config[prefix]: '/Users/georgep/Documents/workspace/r-tester/venv/bin/..' main_config[warnoptions]: [] main_config[xoptions]: {} os.cpu_count: 8 os.cwd: /Users/georgep/Documents/workspace/r-tester os.environ[DISPLAY]: /private/tmp/com.apple.launchd.iXqE5VioqF/org.macosforge.xquartz:0 os.environ[HOME]: /Users/georgep os.environ[LC_CTYPE]: en_US.UTF-8 os.environ[PATH]: /Users/georgep/Documents/workspace/r-tester/venv/bin:/Users/georgep/.rvm/gems/ruby-2.5.1/bin:/Users/georgep/.rvm/gems/ruby-2.5.1@global/bin:/Users/georgep/.rvm/rubies/ruby-2.5.1/bin:/Users/georgep/bin:/Users/georgep/.jenv/shims:/Users/georgep/.jenv/bin:/Users/georgep/.jenv/shims:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/usr/local/munki:/opt/X11/bin:/Applications/Postgres.app/Contents/Versions/latest/bin:/Users/georgep/.rvm/bin os.environ[SHELL]: /bin/
[issue37391] MacOS Touchpad scrolling crashes IDLE
George Pantazes added the comment: Checked against the python.org installation. In that installation's IDLE, About IDLE > Tk version 8.6.8. So my question is: - Is it on me to fix this for my own machine because I should have gotten my own more-up-to-date TK before installing Python via Homebrew? - Or is this a Homebrew installation bug? And should they include a more up-to-dat TK with their installation? -- ___ Python tracker <https://bugs.python.org/issue37391> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37391] MacOS Touchpad scrolling crashes IDLE
George Pantazes added the comment: In case anyone would like to weigh in on the Homebrew side, I've filed the homebrew issue here: https://github.com/Homebrew/homebrew-core/issues/41338 . -- ___ Python tracker <https://bugs.python.org/issue37391> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com