[issue40992] Wrong warning in asyncio debug mode
New submission from Alex Alex : I run code in example and get message like: Executing () created at /usr/lib/python3.7/asyncio/futures.py:288> took 2.000 seconds It say that coroutine run for 2 second but it was run for 5 second. Also if I comment part in qwe function after await I won't get any warning, but should. -- components: asyncio files: asyncio-wrong-warn.py messages: 371659 nosy: Alex Alex, asvetlov, yselivanov priority: normal severity: normal status: open title: Wrong warning in asyncio debug mode versions: Python 3.7 Added file: https://bugs.python.org/file49237/asyncio-wrong-warn.py ___ Python tracker <https://bugs.python.org/issue40992> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue42306] wrong exception handling in case asyncio.shiled usage
New submission from Alex Alex : There is not any message about exception from try block. See attach. -- components: asyncio files: scratch_31.py messages: 380640 nosy: Alex Alex, asvetlov, yselivanov priority: normal severity: normal status: open title: wrong exception handling in case asyncio.shiled usage type: behavior versions: Python 3.7 Added file: https://bugs.python.org/file49588/scratch_31.py ___ Python tracker <https://bugs.python.org/issue42306> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9743] __call__.__call__ chain cause crash when long enough
Alex added the comment: This seems to be another case of "C stack depth not reflected in the stack counter". -- nosy: +alex ___ Python tracker <http://bugs.python.org/issue9743> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9743] __call__.__call__ chain cause crash when long enough
Alex added the comment: I doubt there is a good usecase for it, nevertheless we should attempt to fix it, as segfaults are no good. -- ___ Python tracker <http://bugs.python.org/issue9743> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1838] Ctypes C-level infinite recursion
Alex added the comment: I concur with Daniel, this strikes me as a legitimate bug. Crashing is obviously possibly by calling into arbitrary C code, but in this case control never leaves the runtime. -- nosy: +alex status: pending -> open ___ Python tracker <http://bugs.python.org/issue1838> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1838] Ctypes C-level infinite recursion
Alex added the comment: No need to solve the halting problem, just to detect a cycle in data. I've got a patch, however it requires objects to be hashable. Another case for identity dict I suppose :) Not sure if that's a reasonable requirement, in any event, proof of concept patch, against trunk. -- keywords: +patch Added file: http://bugs.python.org/file18933/python_recursive_as_parameter.diff ___ Python tracker <http://bugs.python.org/issue1838> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1838] Ctypes C-level infinite recursion
Alex added the comment: Good idea Amaury, seems to work just fine. -- Added file: http://bugs.python.org/file18936/python_recursive_as_parameter.diff ___ Python tracker <http://bugs.python.org/issue1838> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9801] Can not use append/extend to lists in a multiprocessing manager dict
Alex added the comment: It should be documented though. Similar scenario in the Django docs: http://docs.djangoproject.com/en/1.2/topics/http/sessions/#when-sessions-are-saved -- nosy: +alex ___ Python tracker <http://bugs.python.org/issue9801> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10093] Warn when files are not explicitly closed
Alex added the comment: RuntimeWarning you mean? I don't think anyone is suggesting making it an error. -- nosy: +alex ___ Python tracker <http://bugs.python.org/issue10093> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10150] Local references not released after exception
Alex added the comment: That's because in Python 2.5 at that point in the code sys.exc_info() still points at the traceback (and by extension, the frame) thus x is not deallocated yet. I don't think this is a bug. -- nosy: +alex ___ Python tracker <http://bugs.python.org/issue10150> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10160] operator.attrgetter slower than lambda after adding dotted names ability
Alex added the comment: Voice of ignorance here: why can't this be implemented in the "naive" way one might in Python, use the existing string splitting algorithms of stringlib, but just leave it in __new__. ------ nosy: +alex ___ Python tracker <http://bugs.python.org/issue10160> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10180] File objects should not pickleable
Alex added the comment: I don't see why Buffered or TextIO's shouldn't be pickleable, ISTM their pickleability should be based on what the underlying file obj is. ------ nosy: +alex ___ Python tracker <http://bugs.python.org/issue10180> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10186] Invalid SyntaxError pointer offset
New submission from Alex : Builtin SyntaxError formatter does never point to char before last in wrong source line. traceback.format_exception() is not affected. *** Example: >>> raise SyntaxError('', ('', 0, 3, 'hello')) ... hello ^ SyntaxError: test >>> raise SyntaxError('', ('', 0, 4, 'hello')) ... hello ^ SyntaxError: test >>> raise SyntaxError('', ('', 0, 5, 'hello')) ... hello # <-- note that it's not "o" ^ SyntaxError: test >>> raise SyntaxError('', ('', 0, 6, 'hello')) ... hello ^ SyntaxError: test -- components: Interpreter Core messages: 119479 nosy: mwizard priority: normal severity: normal status: open title: Invalid SyntaxError pointer offset versions: Python 2.7 ___ Python tracker <http://bugs.python.org/issue10186> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10186] Invalid SyntaxError pointer offset
Changes by Alex : -- type: -> behavior ___ Python tracker <http://bugs.python.org/issue10186> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10189] SyntaxError: no binding for nonlocal doesn't contain a useful traceback
New submission from Alex : Given the code: def f(): def g(): nonlocal a a = 3 Running it produces: a...@alex-laptop:/tmp$ python3.1 test.py SyntaxError: no binding for nonlocal 'a' found Compared to a different SyntaxError: a...@alex-laptop:/tmp$ python3.1 test.py File "test.py", line 1 print a ^ SyntaxError: invalid syntax -- components: Interpreter Core messages: 119527 nosy: alex priority: normal severity: normal status: open title: SyntaxError: no binding for nonlocal doesn't contain a useful traceback versions: Python 3.1 ___ Python tracker <http://bugs.python.org/issue10189> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10301] Zipfile cannot be used in "with" Statement
Alex added the comment: Context manager support was added in 3.2 -- nosy: +alex ___ Python tracker <http://bugs.python.org/issue10301> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1346238] A constant folding optimization pass for the AST
Alex added the comment: ISTM that you don't need to worry about mutating locals, the locals() function is explicitly documented as not necessarily affecting local variables (not sure if frame objects have the same documentation). If you want a free optimization opportunity: BINARY_SUBSCR with a list for the first argument who's contents are all constant, this can be optimized to turn it into a tuple which can be load const'd (as we do in the case of an in check), note that this cannot be used in the case of:: l = [1, 2, 3] l[v] As v.__index__ could theoretically mutate l. ------ nosy: +alex ___ Python tracker <http://bugs.python.org/issue1346238> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10334] Add new reST directive for links to source code
Alex added the comment: Seems to me it should be an inline directive (or whatever they're called). i.e. it'd be written:: .. seealso:: Latest version of the :sourcecode:`ast module Python source code `. -- nosy: +alex ___ Python tracker <http://bugs.python.org/issue10334> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10399] AST Optimization: inlining of function calls
Alex added the comment: Just a thought: it's possible to cover all the cases properly with inlining (locals, globals (even with cross module inlining), tracebacks, sys._getframe(), etc.), however I think you're going to find that manually managing all of those is going to quickly drive you up a tree if you want to also get meaningful speedups (from removing frame allocation, argument parsing, etc.). My 2ยข. -- ___ Python tracker <http://bugs.python.org/issue10399> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11297] Make ChainMap() public in the collections module.
Alex added the comment: An important distinction with Django's push/pop is that they mutate the Context (ChainMap) rather than return a fresh instance. -- nosy: +alex ___ Python tracker <http://bugs.python.org/issue11297> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10791] Wrapping TextIOWrapper around gzip files
Changes by Alex : -- nosy: +alex ___ Python tracker <http://bugs.python.org/issue10791> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11311] StringIO.readline(0) returns incorrect results
Alex added the comment: Fun fact: io.StringIO does the right thing, but _io and _pyio. -- nosy: +alex ___ Python tracker <http://bugs.python.org/issue11311> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11328] NESTED WHILE CYCLES ERROR
Alex added the comment: This is invalid, there's no bug. j doesn't get magically reinitialized to 0, in fact this code would do the same thing in any language I can think of. -- nosy: +alex ___ Python tracker <http://bugs.python.org/issue11328> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11358] Please replace the use of pickle in multiprocessing with json.
Alex added the comment: Why? JSON is incapable of representing most Python datastructures that can be pickled (i.e. anything that isn't a list, tuple, dict, int, or str). -- nosy: +alex ___ Python tracker <http://bugs.python.org/issue11358> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11455] issue a warning when populating a CPython type dict with non-string keys
Alex added the comment: 2 ways to do it: class A(object): locals()[42] = "abc" or type("A", (object,), {42: "abc"}) -- nosy: +alex ___ Python tracker <http://bugs.python.org/issue11455> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11455] issue a warning when populating a CPython type dict with non-string keys
Alex added the comment: How can they be set afterwords? alex@alex-laptop:~/projects/pypy$ python3.1 Python 3.1.2 (release31-maint, Sep 17 2010, 20:34:23) [GCC 4.4.5] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> class A(object): ... pass ... >>> A.__dict__[32] = "heh" Traceback (most recent call last): File "", line 1, in TypeError: 'dict_proxy' object does not support item assignment >>> setattr(A, 32, "heh") Traceback (most recent call last): File "", line 1, in TypeError: attribute name must be string, not 'int' -- ___ Python tracker <http://bugs.python.org/issue11455> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2636] Regexp 2.7 (modifications to current re 2.2.2)
Changes by Alex : -- nosy: +alex ___ Python tracker <http://bugs.python.org/issue2636> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11470] Flag inappropriate uses of callable class attributes
Changes by Alex : -- nosy: +alex ___ Python tracker <http://bugs.python.org/issue11470> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10399] AST Optimization: inlining of function calls
Alex added the comment: There are a couple places you mention not doing the optimization when specific functions are used (e.g. dir, globals, locals), how exactly do you verify that, given those functions could be bound to any name? -- ___ Python tracker <http://bugs.python.org/issue10399> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10533] defaultdict constructor with a concrete value
Alex added the comment: I agree with ลukasz, it's more clutter than is worth for what amounts to: fallbackdict = lambda c, **kwargs: defaultdict(lambda c, **kwargs) I will note, however, that almost all my use cases are with factories, primarily list set or int, and it was only this week that I first needed something else! -- nosy: +alex ___ Python tracker <http://bugs.python.org/issue10533> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10668] Array tests have nonsense in them
New submission from Alex : In ArraySubclassWithKwargs, when __init__ is called it doesn't actually pass self to `array.array.__init__`, this doesn't actually cause errors because the contents of the array isn't tested anywhere. -- components: Library (Lib) messages: 123714 nosy: alex priority: normal severity: normal status: open title: Array tests have nonsense in them versions: Python 2.7 ___ Python tracker <http://bugs.python.org/issue10668> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9233] json.load failure when C optimizations aren't built
Alex added the comment: Just a note from downstream with PyPy: we've cherry-picked the commit Bob linked into our copy of the 2.7 stdlib since we don't have an _json (yet). -- nosy: +alex ___ Python tracker <http://bugs.python.org/issue9233> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11209] Example for itertools.count is misleading
Alex added the comment: Patch for 2.7. -- keywords: +patch nosy: +alex Added file: http://bugs.python.org/file20758/python-11209.diff ___ Python tracker <http://bugs.python.org/issue11209> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4356] Add "key" argument to "bisect" module functions
Alex added the comment: Looks nice to me, however I wonder if there isn't some overlap with the requests to add a key= kwarg to heapq methods (and the discussion about adding a Heap class there). -- nosy: +alex ___ Python tracker <http://bugs.python.org/issue4356> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8419] dict constructor allows invalid identifiers in **kwargs
Alex added the comment: Guido seems to be favoring disallowing it, not ignoring it[0]. http://mail.python.org/pipermail/python-dev/2010-April/099435.html -- nosy: +alex ___ Python tracker <http://bugs.python.org/issue8419> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8530] Stringlib fastsearch can read beyond the front of an array
New submission from Alex : In Objects/stringlib/fastsearch.h the lines: if (!STRINGLIB_BLOOM(mask, s[i-1])) and if (!STRINGLIB_BLOOM(mask, s[i-1])) can read beyond the front of the array that is passed to it when the loop enters with i = 0. I originally noticed this when porting the algorithm to PyPy (which has bounds checking :)), all tests pass if I simple add `if i-1 >= 0` before the conditional. This doesn't appear to actually cause the algorithm to ever break, but it is unsafe. -- messages: 104149 nosy: alex severity: normal status: open title: Stringlib fastsearch can read beyond the front of an array ___ Python tracker <http://bugs.python.org/issue8530> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8530] Stringlib fastsearch can read beyond the front of an array
Alex added the comment: Yes, as the comment of the top of the file notes, reading to s[n] (where n == len(s)) is safe because strings are null padded. -- ___ Python tracker <http://bugs.python.org/issue8530> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8530] Stringlib fastsearch can read beyond the front of an array
Alex added the comment: Well, the fact that it hasn't been shown to fail doesn't mean it can't fail. It relies on reading undefined memory, which is usually bad ;). However, since we're at i=0, regardless of what we add to the value it's going to end up terminating the loop, so I'm not sure if it can actually break in practice. -- ___ Python tracker <http://bugs.python.org/issue8530> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8532] Refinements to Python 3 New GIL
Changes by Alex : -- nosy: +alex ___ Python tracker <http://bugs.python.org/issue8532> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8585] zipimporter.find_module is untested
New submission from Alex : There are no tests for zipimporter.find_module in the success case, only tests that it handles invalid inputs ok. I'll work up some tests for this tomorrow probably. -- components: Extension Modules messages: 104684 nosy: alex priority: normal severity: normal status: open title: zipimporter.find_module is untested ___ Python tracker <http://bugs.python.org/issue8585> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4424] Add support for a cmp, or key argument to heapq functions.
New submission from Alex <[EMAIL PROTECTED]>: Currently the heapq module can only really be used if your data has it's own ordering defined. There is no way to do a custom ordering. From my cursory review of the code it looks like some of the lower level functions actually take these kwargs, but the public interface does not. -- components: Library (Lib) messages: 76398 nosy: alex severity: normal status: open title: Add support for a cmp, or key argument to heapq functions. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4424> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4424] Add support for a cmp, or key argument to heapq functions.
Alex <[EMAIL PROTECTED]> added the comment: Apologies, searching didn't yield that. That's not necessarily always easy, for example I'd like to use heapq to merge iterators coming from the database. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4424> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4722] _winreg.QueryValue fault while reading mangled registry values
New submission from Alex : == What steps will reproduce the problem? 1. Create registry key (let's assume it's located in HKEY_CURRENT_USER\TestKey); 2. Walk to it in "regedit"; 3. Right-click on "(Default)" and select "Modify binary data"; 4. Leave everything blank and press "OK"; 5. Go to Python and execute this: >>> import _winreg >>> _winreg.QueryValue(_winreg.HKEY_CURRENT_USER, 'TestKey') Traceback (most recent call last): File "", line 1, in SystemError: ..\Objects\stringobject.c:4271: bad argument to internal function == What is the expected output? What do you see instead? I expect either returning "''" or some ValueError indicating that source string is malformed. == What version of the product are you using? On what operating system? 1. Windows XP Professional SP2 English; 2. Tested on Python 2.5.2; 3. Tested on Python 2.6.1; 4. Tested on Stackless Python 2.5.2. == Please provide any additional information below. And yes, I know that this function is lame and everybody using it also is lame, but it's not really a reason to include buggy functions, right? -- components: Library (Lib), Windows messages: 78190 nosy: malicious.wizard severity: normal status: open title: _winreg.QueryValue fault while reading mangled registry values type: behavior versions: Python 2.5, Python 2.6 ___ Python tracker <http://bugs.python.org/issue4722> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11354] argparse: nargs could accept range of options count
Alex added the comment: I've had a look at the most recent patch and the code surrounding it, and I would be happy to take on the work to update the code and testing. However, > - It's easy to test for this range after parsing, with '*' or '+' nargs. So > the main thing this patch adds is in the help/usage display. It doesn't add > significant functionality. I didn't initially consider this. I'd still be happy to finish this off, but if the general feeling is that contribution time would be better spent elsewhere then that's also fine. -- ___ Python tracker <https://bugs.python.org/issue11354> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43399] xml.etree.ElementTree.extend does not work with iterators when using the Python implementation
Alex added the comment: Is there anything else I should be doing, in order to get this merged in time for 3.10? (the PR is "awaiting merge") For the record, the equivalent PR for PyPy is now merged in the py3.7 branch: https://foss.heptapod.net/pypy/pypy/-/merge_requests/807. Regarding the backporting, I understand from the devguide this is done automatically from GitHub labels (nice!), but it does not look like I have the rights to add those to my PR. -- ___ Python tracker <https://bugs.python.org/issue43399> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44776] Docs on mobile do not use monospace font for code snippets, misaligning carets of improved error messages
New submission from Alex : Now that the docs are mobile-friendly (nice!), I noticed that the code snippets are not using a monospace font (at least on my Android 10 + Chrome 92 device). This misaligns the carets of the improved errors messages, for example on the "what's new": https://docs.python.org/3.10/whatsnew/3.10.html I attached an example on how this renders on my device. -- assignee: docs@python components: Documentation files: E7EuL0KWQAI19nx.jpg messages: 398533 nosy: alexprengere, docs@python priority: normal severity: normal status: open title: Docs on mobile do not use monospace font for code snippets, misaligning carets of improved error messages versions: Python 3.10, Python 3.11 Added file: https://bugs.python.org/file50191/E7EuL0KWQAI19nx.jpg ___ Python tracker <https://bugs.python.org/issue44776> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44776] Docs on mobile do not use monospace font for code snippets, misaligning carets of improved error messages
Alex added the comment: It looks this is already being tracked at: https://github.com/python/pythondotorg/issues/1708 -- ___ Python tracker <https://bugs.python.org/issue44776> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43399] xml.etree.ElementTree.extend does not work with iterators when using the Python implementation
Change by Alex : -- stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue43399> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45892] Improve REPL with the underscore separators for int/float
New submission from Alex : I often use to the Python REPL to perform some simple calculations (typically some combinatorial or probabilities computation). I believe it would be a nice improvement if the number displayed in the REPL would be formatted as if f"{result:_}" was given (with the underscore separators). For example: >>> 36 ** 7 78_364_164_096 As I understand things: * the REPL always shows the __repr__ * updating the __repr__ for int/float is a no-no for backward compatibility reasons If these assumptions are correct (please correct me if this is wrong), then I guess this cannot be implemented, unless I missed something? -- components: Interpreter Core messages: 406934 nosy: alexprengere priority: normal severity: normal status: open title: Improve REPL with the underscore separators for int/float type: behavior versions: Python 3.11 ___ Python tracker <https://bugs.python.org/issue45892> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45892] Improve REPL with the underscore separators for int/float
Alex added the comment: Thanks a lot Eric for your answers, I did not know about sys.displayhook. Now I know I can easily implement this myself, but the larger question would be: "do we want to update the default displayhook for those simple use cases". -- ___ Python tracker <https://bugs.python.org/issue45892> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45961] [doc] Missing documentation for wait_for module
New submission from Alex : I wondering why there is no documentation for the synchronous module "wait_for": site-packages/wait_for/__init__.py It's just missing or there are some reason? I didn't see any deprecation info about this module. -- messages: 407516 nosy: Alex-Izquierdo priority: normal severity: normal status: open title: [doc] Missing documentation for wait_for module versions: Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9 ___ Python tracker <https://bugs.python.org/issue45961> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9495] argparse unittest tracebacks are confusing if an error is raised when not expected
Change by Alex : -- pull_requests: +16626 pull_request: https://github.com/python/cpython/pull/17120 ___ Python tracker <https://bugs.python.org/issue9495> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15243] Misleading documentation for __prepare__
Change by Alex : -- pull_requests: +16632 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/17124 ___ Python tracker <https://bugs.python.org/issue15243> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15243] Misleading documentation for __prepare__
Change by Alex : -- nosy: +alclarks ___ Python tracker <https://bugs.python.org/issue15243> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38785] Segmentation fault in asyncio
New submission from Alex : Get Segmentation fault on run script in attachment. -- components: asyncio files: scratch_15.py messages: 356523 nosy: akayunov, asvetlov, yselivanov priority: normal severity: normal status: open title: Segmentation fault in asyncio type: crash versions: Python 3.7 Added file: https://bugs.python.org/file48712/scratch_15.py ___ Python tracker <https://bugs.python.org/issue38785> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38785] Segmentation fault in asyncio
Alex added the comment: Get seg fault on running script in attachment: root@fake:/opt/securisync/be# python3.7 scratch_15.py In tratata before In tratata2 before Segmentation fault -- ___ Python tracker <https://bugs.python.org/issue38785> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue25866] Reference 3. Data Model: miscellaneous minor cleanups on the word "sequence".
Alex added the comment: Hi, I've taken a look at these suggestions and the documentation and I've posted a patch to get things moving :) A couple of points about the suggested changes that I haven't included in the patch: 1) I think changing the documentation for __dir__() to say it can return an iterable needs some discussion. The documentation also says: "The ``__dir__`` function should accept no arguments, and return a list of strings that represents the names accessible on module. If present, this function overrides the standard :func:`dir` search on a module." And this should definitely be updated from "list of strings" to either "sequence of strings" or "iterable of strings". However, I'm not sure about updating docs to include "accidental" functionality - looking at the testing, news, and documentation from commit https://github.com/python/cpython/commit/3bbb72265411585e64a5d2ccb5ba51763f20e311 the intention was to allow __dir__ to return a sequence. I think updating the docs to say __dir__ should return an iterator would be a separate issue which would also include test enchancements, so I've left that change out of my patch and I've just corrected the line I've quoted above. 2) > The docs still say that the ABCs are in `collections` rather than `collections.abc`. I couldn't find an instance of this, it's probably been corrected at some point. Any thoughts on the above, the other suggestions, or the patch? -- keywords: +patch nosy: +alclarks Added file: https://bugs.python.org/file48713/issue25866.v1.patch ___ Python tracker <https://bugs.python.org/issue25866> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11354] argparse: nargs could accept range of options count
Alex added the comment: Weighing up how little demand there seems to be for this, and how easy it is to achieve the same effect with post-processing within a hypothetical script that happens to need it - I agree with closing it. -- ___ Python tracker <https://bugs.python.org/issue11354> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue25866] Reference 3. Data Model: miscellaneous minor cleanups on the word "sequence".
Alex added the comment: dorosch, please note section 3.9 from the developers guide: "When a patch exists in the issue tracker that should be converted into a GitHub pull request, please first ask the original patch author to prepare their own pull request. If the author does not respond after a week, it is acceptable for another contributor to prepare the pull request based on the existing patch." It's been two hours, not a week, and I would've liked to raise a pull request for this change. -- ___ Python tracker <https://bugs.python.org/issue25866> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue25866] Reference 3. Data Model: miscellaneous minor cleanups on the word "sequence".
Alex added the comment: I've decided to raise a pull request for the patch, considering it's only been a few hours. -- ___ Python tracker <https://bugs.python.org/issue25866> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue25866] Reference 3. Data Model: miscellaneous minor cleanups on the word "sequence".
Change by Alex : -- pull_requests: +16685 pull_request: https://github.com/python/cpython/pull/17177 ___ Python tracker <https://bugs.python.org/issue25866> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38819] The redirect
New submission from Alex <2423067...@qq.com>: Hi. This bug I've found is about the redirect, you know, to redirect the standard input/output stream. It's not really a bug, you can think of it as a feature. The code is like this: import sys sys.stdout = open('redirect.txt','w') print('hello world!') #Something you want to print after you run it in the IDLE: RESTART: XXX.py=== >>> print(1 + 1) >>> You will find you can't output as normal. The version I choose for this issue is Python 3.8.0b4. However, I find this problem is also exist in Python 3.7.5. How to repair it? -- assignee: terry.reedy components: IDLE messages: 356742 nosy: Alex-Python-Programmer, terry.reedy priority: normal severity: normal status: open title: The redirect type: behavior versions: Python 3.8 ___ Python tracker <https://bugs.python.org/issue38819> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38828] http.cookiejar handle cookie.version to be None
Alex added the comment: Hi, it looks like this needs a fix - I'll write a patch to fix up the handling and add some more testing to cover this scenario. -- nosy: +alclarks ___ Python tracker <https://bugs.python.org/issue38828> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40100] Unexpected behavior when handling emoji under codec cp936
New submission from Alex <2423067...@qq.com>: Python 3.8.2 IDLE has an unexpected behavior. When I insert an emoji into IDLE like '๐'. Then I found I can't delete it(by typing backspace). When I type the left arrow then it became '๏ฟฝ๏ฟฝ'(U+FFFD). Then I type the left arrow again, then it is '๐' again! (When I use the delete button, or type the right button there aren't any bugs.) What's wrong? Also, when I have two emojis like '๐๐', I press delete button between them, nothing happens; when I delete on the right, both of them disappear! (This bug seems not appears on plain 0.) -- assignee: terry.reedy components: IDLE messages: 365247 nosy: Alex-Python-Programmer, terry.reedy priority: normal severity: normal status: open title: Unexpected behavior when handling emoji under codec cp936 type: behavior versions: Python 3.8 ___ Python tracker <https://bugs.python.org/issue40100> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40384] IDLE: Undesired highlight
New submission from Alex <2423067...@qq.com>: In this code: def a(): # def def b(): When I delete the # at line 3, the keyword 'def' become blue. -- assignee: terry.reedy components: IDLE messages: 367249 nosy: Alex-Python-Programmer, terry.reedy priority: normal severity: normal status: open title: IDLE: Undesired highlight type: behavior versions: Python 3.8 ___ Python tracker <https://bugs.python.org/issue40384> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40384] IDLE: Undesired highlight
Alex <2423067...@qq.com> added the comment: The sharp is at line 2, not line 3. I made a mistake. -- ___ Python tracker <https://bugs.python.org/issue40384> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43399] xml.etree.ElementTree.extend does not work with iterators when using the Python implementation
New submission from Alex : This issue is only visible when the C accelerator of ElementTree is *not* used. It is the counterpart of the following issue on PyPy3: https://foss.heptapod.net/pypy/pypy/-/issues/3181 >>> from xml.etree.ElementTree import Element >>> r = Element("root") >>> r.extend((Element(str(i)) for i in range(3))) >>> print(list(r)) [] When using the C accelerator, the list is not empty, as expected. In the Python code, a check on the input empties the input iterator. The fix is trivial (one-line change), so if you are interested I could open a PR, which would be my first, so a good occasion to go through the devguide ;) I understand that since Python3.3 the C accelerator is used by default, so I would agree that this is not really a bug, and I can just fix it on PyPy side. -- components: XML messages: 388099 nosy: alexprengere priority: normal severity: normal status: open title: xml.etree.ElementTree.extend does not work with iterators when using the Python implementation type: behavior versions: Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9 ___ Python tracker <https://bugs.python.org/issue43399> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43399] xml.etree.ElementTree.extend does not work with iterators when using the Python implementation
Change by Alex : -- keywords: +patch pull_requests: +23521 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24751 ___ Python tracker <https://bugs.python.org/issue43399> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue41278] Wrong Completion on Editing Mode of IDLE
New submission from Alex <2423067...@qq.com>: When I type (on editing mode, not interacting mode) __main__. + Ctrl+Space, the completion window shows 'idlelib'. -- assignee: terry.reedy components: IDLE messages: 373518 nosy: Alex-Python-Programmer, terry.reedy priority: normal severity: normal status: open title: Wrong Completion on Editing Mode of IDLE type: behavior versions: Python 3.8 ___ Python tracker <https://bugs.python.org/issue41278> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue41278] Wrong Completion on Editing Mode of IDLE
Alex <2423067...@qq.com> added the comment: Well. I found that this bug happens frequntly, sometimes it just shows the proper list, like __builtins__, __docs__ and stuff. Sometimes the completion windows just gives me 'idlelib'. p.s.:idle won't show __main__ when you type something and press ctrl+space, but the completion *seems do* exist (and gives the proper list that I said before) when you type ctrl+space, but by pressing enter a NameError is raised because __main__ *do not* exist, actually. I'm finding out why this happens, and when. p.p.s:I'm using python 3.8.2 shell. -- status: open -> pending ___ Python tracker <https://bugs.python.org/issue41278> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue41278] IDLE: Clarify some completion details in doc
Alex <2423067...@qq.com> added the comment: new feature found: 1.although the name __main__ do not exist even when editing, there will be some completions. 2.if you run a module like this: def new(): pass then create a new module, press __main__. + tab. it will become __main__.new 3.but, if you press __main__._ + tab, the proper list and new will both be shown. 4.the feature 2 & 3 appears even if the first module is closed. -- ___ Python tracker <https://bugs.python.org/issue41278> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue41508] Failed to open os.path in Open Module window of IDLE without any error informations
New submission from Alex <2423067...@qq.com>: When openning os.path by Open Module window in IDLE (Shortcut: Alt + M), the window didn't open 'ntpath'(in Windows) or show any error informations. -- assignee: terry.reedy components: IDLE messages: 375040 nosy: Alex-Python-Programmer, terry.reedy priority: normal severity: normal status: open title: Failed to open os.path in Open Module window of IDLE without any error informations type: behavior versions: Python 3.8 ___ Python tracker <https://bugs.python.org/issue41508> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue41651] Pip: Wrong Showing of Progressbar when Downloading Modules
New submission from Alex <2423067...@qq.com>: 1. Abstract Command line in Windows the progress bar doesn't work like usual after about half of the downloading process. Another remarkble bug is the length of the progressbar seems to be lengthened. 2. Reason(my opinion) I noticed that this bug only happens when the rightmost character reaches the end of the cmd screen. I infer the reason of this bug from the phenomenon: when the progres bar is going to be lengthened, pip will delete the last line. Pip consider the line as an enter that the program output. However, the cmd consider the line as an enter whether it is output by the program or added by cmd itself because of the rightmost character reaches the end of the cmd screen. When pip make cmd delete the last line, pip want cmd to delete the whole progressbar, but cmd only deletes a part of the progressbar which are in the line 2. 3. Instance An instance of the bug, showing what happenred when upgrading pip via py -m pip install --upgrade pip. You can see the progress bar wasn't deleted completly. C:\Users\**>py -m pip install --upgrade pip Collecting pip Downloading pip-20.2.2-py2.py3-none-any.whl (1.5 MB) |โโ | 634 kB 21 kB/s eta 0:00:41 |โโ | 645 kB 21 kB/s eta 0:00:41 |โโ | 655 kB 21 kB/s eta 0:00:40 |โโ | 665 kB 21 kB/s eta 0:00:40 |โโโ | 675 kB 23 kB/s eta 0:00:3 |โโโ | 686 kB 23 kB/s eta 0:00:3 |โโโ | 696 kB 23 kB/s eta 0:00:3 |โโโ | 706 kB 33 kB/s eta 0:00:2 |โโโ | 716 kB 33 kB/s eta 0:00:2 |โโโโ| 727 kB 28 kB/s eta 0:00: || 737 kB 28 kB/s eta 0:00: || 747 kB 28 kB/s eta 0:00: || 757 kB 23 kB/s eta 0:00: |โ | 768 kB 23 kB/s eta 0:00 |โ | 778 kB 23 kB/s eta 0:00 |โ | 788 kB 20 kB/s eta 0:00 |โ | 798 kB 20 kB/s eta 0:00 |โ | 808 kB 20 kB/s eta 0:00 |โโ | 819 kB 20 kB/s eta 0:0 |โโ | 829 kB 20 kB/s eta 0:0 |โโ | 839 kB 25 kB/s eta 0:0 |โโ | 849 kB 25 kB/s eta 0:0 |โโ | 860 kB 19 kB/s eta 0:0 |โโโ | 870 kB 19 kB/s eta 0: |โโโ | 880 kB 17 kB/s eta 0: |โโโ | 890 kB 17 kB/s eta 0: |โโโ | 901 kB 17 kB/s eta 0: |โโโโ| 911 kB 17 kB/s eta 0 |โโโโ| 921 kB 17 kB/s eta 0 || 931 kB 12 kB/s eta 0 || 942 kB 12 kB/s eta 0 || 952 kB 12 kB/s eta 0 |โ | 962 kB 13 kB/s eta |โ | 972 kB 13 kB/s eta |โ | 983 kB 8.9 kB/s eta |โ | 993 kB 6.7 kB/s eta |โโ | 1.0 MB 6.7 kB/s et |โโ | 1.0 MB 6.7 kB/s et |โโ | 1.0 MB 6.7 kB/s et |โโ | 1.0 MB 6.7 kB/s et |โโ | 1.0 MB 8.4 kB/s et |โโโ | 1.1 MB 8.4 kB/s e |โโโ | 1.1 MB 8.4 kB/s e |โโโ | 1.1 MB 8.8 kB/s e |โโโ | 1.1 MB 8.8 kB/s e |โโโ | 1.1 MB 24 kB/s et |โโโโ| 1.1 MB 24 kB/s e || 1.1 MB 16 kB/s e || 1.1 MB 16 kB/s e || 1.1 MB 14 kB/s e |โ | 1.1 MB 14 kB/s |โ | 1.2 MB 14 kB/s |โ | 1.2 MB 14 kB/s |โ | 1.2 MB 12 kB/s |โ | 1.2 MB 12 kB/s |โโ | 1.2 MB 12 kB/s |โโ | 1.2 MB 12 kB/s |โโ | 1.2 MB 12 kB/s |โโ | 1.2 MB 19 kB/s |โโโ | 1.2 MB 19 kB/ |โโโ | 1.2 MB 20 kB/ |โโโ | 1.3 MB 15 kB/ |โ
[issue41652] An Advice on Turning Ellipsis into Keyword
New submission from Alex <2423067...@qq.com>: In early versions of python, programmers can simply swap True and False by >>> True, False = False, True Then True and False and None become keywords so programmers can't change their value. ... is also a keyword, but Ellipsis is not. So the code below is right: >>> Ellipsis = 1 >>> print(Ellipsis) 1 If Ellipsis become a keyword, this will be better. -- components: Interpreter Core messages: 376018 nosy: Alex-Python-Programmer priority: normal severity: normal status: open title: An Advice on Turning Ellipsis into Keyword type: enhancement versions: Python 3.8 ___ Python tracker <https://bugs.python.org/issue41652> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue41651] Pip: Wrong Showing of Progressbar when Downloading Modules
Alex <2423067...@qq.com> added the comment: @cryvate: Okay, and the new issue is crated at <https://github.com/pypa/pip/issues/8852>. -- ___ Python tracker <https://bugs.python.org/issue41651> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue41957] IDLE does not Transform Tabs into Spaces in Interactive Mode
New submission from Alex <2423067...@qq.com>: In Python I usually find the problem like this. >>> for i in range(10): #some code In edit mode, IDLE will automatically transform tabs into spaces. But in interactive mode, IDLE won't do the same. The same problem have been reported in some other forums as far as I know. I don't know how the problem is caused. However, we shoule look at this problem carefully, until we solve it. -- assignee: terry.reedy components: IDLE messages: 378112 nosy: Alex-Python-Programmer, terry.reedy priority: normal severity: normal status: open title: IDLE does not Transform Tabs into Spaces in Interactive Mode versions: Python 3.8 ___ Python tracker <https://bugs.python.org/issue41957> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue42069] Make filecmp more pythonic
New submission from Alex : Cleanup the filecmp file add typing and make it more pythonic -- components: Library (Lib) messages: 378877 nosy: alex.briskin priority: normal severity: normal status: open title: Make filecmp more pythonic versions: Python 3.9 ___ Python tracker <https://bugs.python.org/issue42069> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue42069] Make filecmp more pythonic
Change by Alex : -- keywords: +patch pull_requests: +21712 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22750 ___ Python tracker <https://bugs.python.org/issue42069> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue42399] Error upon pip usage.
New submission from Alex : MacOS catalina 10.15.6 Python -version 3.9 although experienced on 3.8 too. pip -version 20.2.4 Any time I send a command using pip including; pip install, pip freeze, pip list etc. I get this error. Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.8/bin/pip", line 8, in sys.exit(main()) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pip/_internal/cli/main.py", line 73, in main command = create_command(cmd_name, isolated=("--isolated" in cmd_args)) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pip/_internal/commands/__init__.py", line 104, in create_command module = importlib.import_module(module_path) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1014, in _gcd_import File "", line 991, in _find_and_load File "", line 975, in _find_and_load_unlocked File "", line 671, in _load_unlocked File "", line 783, in exec_module File "", line 219, in _call_with_frames_removed File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pip/_internal/commands/list.py", line 9, in from pip._internal.cli.req_command import IndexGroupCommand File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pip/_internal/cli/req_command.py", line 22, in from pip._internal.req.constructors import ( File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pip/_internal/req/__init__.py", line 10, in from .req_install import InstallRequirement File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pip/_internal/req/req_install.py", line 10, in import uuid File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/uuid.py", line 57, in _AIX = platform.system() == 'AIX' File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/platform.py", line 891, in system return uname().system File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/platform.py", line 857, in uname processor = _syscmd_uname('-p', '') File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/platform.py", line 613, in _syscmd_uname output = subprocess.check_output(('uname', option), File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py", line 411, in check_output return run(*popenargs, stdout=PIPE, timeout=timeout, check=True, File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/run/__init__.py", line 145, in __new__ process = cls.create_process(command, stdin, cwd=cwd, env=env, shell=shell) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/run/__init__.py", line 121, in create_process shlex.split(command), File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/shlex.py", line 311, in split return list(lex) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/shlex.py", line 300, in __next__ token = self.get_token() File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/shlex.py", line 109, in get_token raw = self.read_token() File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/shlex.py", line 140, in read_token nextchar = self.instream.read(1) AttributeError: 'tuple' object has no attribute 'read' -- components: Library (Lib) messages: 381339 nosy: alki284 priority: normal severity: normal status: open title: Error upon pip usage. type: crash versions: Python 3.8 ___ Python tracker <https://bugs.python.org/issue42399> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue42399] Error upon pip usage.
Alex added the comment: I tried contacting the pip team and they said it is likely a python issue due to the stdlib stuff being opened. -- ___ Python tracker <https://bugs.python.org/issue42399> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue42399] Error upon pip usage.
Alex added the comment: What would you recommend to fix this? removing the package? I have a suspicion on which package it is. -- ___ Python tracker <https://bugs.python.org/issue42399> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue42399] Error upon pip usage.
Alex added the comment: Uninstalled 3.8 and installed straight to 3.9 using home brew, this fixed the issue. -- ___ Python tracker <https://bugs.python.org/issue42399> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue42399] Error upon pip usage.
Change by Alex : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue42399> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue30951] Documentation error in inspect module
Changes by Alex : -- pull_requests: +2802 ___ Python tracker <http://bugs.python.org/issue30951> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue30951] Documentation error in inspect module
Changes by Alex : -- pull_requests: +2803 ___ Python tracker <http://bugs.python.org/issue30951> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue31087] asyncio.create_subprocess_* do not honor `encoding`
New submission from Alex: Regardless of the value of `encoding`, StreamReaders returned for the `asyncio.subprocess.Process`'s `stdout` and `stderr` would be in binary mode. import sys import asyncio import subprocess async def main(): sp = await asyncio.create_subprocess_exec('ls', '-la', stdin=None, stdout=subprocess.PIPE, encoding='utf8') await sp.wait() data = await sp.stdout.read() print(data) print(isinstance(data, bytes)) loop = asyncio.get_event_loop() loop.run_until_complete(main()) There are two naive solutions: - `create_subprocess_*` could explicitly raise when provided any `encoding` and `errors` (like it now does with `universal_newlines`). - or implement encoding conversions for StreamReaders (and StreamWriters), and forward those. Of course it would be better to have conversions, but I don't know how those will have to deal with decoding partially available data - e.g. returning in the middle of surrogate pair, or having only half a codepoint for UTF16. There should likely cache partial data to process at the next read, but this would require rewriting codecs to support partial decode... seems like it's not that easy :( -- messages: 299537 nosy: toriningen priority: normal severity: normal status: open title: asyncio.create_subprocess_* do not honor `encoding` ___ Python tracker <http://bugs.python.org/issue31087> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue31087] asyncio.create_subprocess_* do not honor `encoding`
Changes by Alex : -- components: +asyncio nosy: +yselivanov versions: +Python 3.6 ___ Python tracker <http://bugs.python.org/issue31087> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue36860] Inconsistent/Undocumented behavior with pathlib resolve and absolute on Windows
New submission from Alex : Maybe I am doing something wrong here but: On Windows 10: > python --version Python 3.7.1 > python >>> from pathlib import Path >>> Path("test.py").resolve() WindowsPath('test.py') >>> Path("test.py").absolute() # this is undocumented in >>> https://docs.python.org/3.7/library/pathlib.html WindowsPath('C:/Users/Name/Desktop/test.py') On Ubuntu 18.04 LTS: $ python3.7 --version Python 3.7.3 $ python3.7 >>> from pathlib import Path >>> Path("test.py").resolve() PosixPath('/home/name/test.py') >>> Path("test.py").absolute() # same as above undocumented PosixPath('/home/name/test.py') Why in Windows does this fail, but not Linux? Why is .absolute() undocumented? I've looked around trying to figure out what the intended behavior is but there is conflicting information. Resolve seems to not work correctly on Windows. Bug? -- components: Library (Lib), Windows messages: 341953 nosy: alexjacobson95, eryksun, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Inconsistent/Undocumented behavior with pathlib resolve and absolute on Windows type: behavior versions: Python 3.7 ___ Python tracker <https://bugs.python.org/issue36860> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue33410] Using type in a format with padding causes TypeError
New submission from alex : When trying to print a type in a formatted string with padding TypeError is raised. See examples below. These work: >>> a = 'abc' >>> print('{a}'.format(a=type(a))) >>> print('{a}'.format(a=str(type(a These don't: >>> print('{a: >10}'.format(a=type(a))) Traceback (most recent call last): File "", line 1, in TypeError: unsupported format string passed to type.__format__ >>> t = type(a) >>> print('{a: >10}'.format(a=t)) Traceback (most recent call last): File "", line 1, in TypeError: unsupported format string passed to type.__format__ -- messages: 316072 nosy: alexomics priority: normal severity: normal status: open title: Using type in a format with padding causes TypeError type: behavior versions: Python 3.6 ___ Python tracker <https://bugs.python.org/issue33410> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34483] eval() raises NameError: name '...' is not defined
New submission from Alex : Builtin eval() function raises NameError on a valid expression: --- example of bug on Python 3.4 Python 3.4.5 (default, May 29 2017, 15:17:55) [GCC 4.8.5 20150623 (Red Hat 4.8.5-11)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> x = [1,2,3] >>> [x for i in x] [[1, 2, 3], [1, 2, 3], [1, 2, 3]] >>> eval('[x for i in x]', {}, dict(x=x)) Traceback (most recent call last): File "", line 1, in File "", line 1, in File "", line 1, in NameError: name 'x' is not defined --- example on Python 2.7 (no bug) Python 2.7.5 (default, May 3 2017, 07:55:04) [GCC 4.8.5 20150623 (Red Hat 4.8.5-14)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> x = [1,2,3] >>> [x for i in x] [[1, 2, 3], [1, 2, 3], [1, 2, 3]] >>> eval('[x for i in x]', {}, dict(x=x)) [[1, 2, 3], [1, 2, 3], [1, 2, 3]] --- Bug reproduced on: - Windows 7: Python 3.4, 3.7 - Red Hat Enterprise Linux Server: Python 3.4 Works without errors on: - Windows 7: Python 2.7 - Red Hat Enterprise Linux Server: Python 2.7 -- components: Interpreter Core messages: 323965 nosy: alexb priority: normal severity: normal status: open title: eval() raises NameError: name '...' is not defined versions: Python 3.4, Python 3.7 ___ Python tracker <https://bugs.python.org/issue34483> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34483] eval() raises NameError: name '...' is not defined
Alex added the comment: Eric, thank you for the clarification. Do you want me to close the ticket? -- ___ Python tracker <https://bugs.python.org/issue34483> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4709] Mingw-w64 and python on windows x64
Alex added the comment: I want to add that this bug led to bizarre behavior (described here: http://stackoverflow.com/questions/18646694/pass-pointer-from-c-to-python-w-boost-python) when using 64-bit Boost-Python compiled with Mingw-w64 in Windows 7. Boost-Python and programs linked to it compiled, but failed at run-time with segfaults. The solution described by jdpipe worked for me, but I only found it after a day of fruitless debugging attempts. -- nosy: +arbitraryvalue ___ Python tracker <http://bugs.python.org/issue4709> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21870] Ctrl-C doesn't interrupt simple loop
New submission from Alex: This infinite loop: def f(): a=b=0 while 1: if a <http://bugs.python.org/issue21870> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21870] Ctrl-C doesn't interrupt simple loop
Changes by Alex : -- components: -Interpreter Core ___ Python tracker <http://bugs.python.org/issue21870> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21870] Ctrl-C doesn't interrupt simple loop
Changes by Alex : -- type: -> behavior ___ Python tracker <http://bugs.python.org/issue21870> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21870] Ctrl-C doesn't interrupt simple loop
Alex added the comment: It's not a major usability issue for me, and I wouldn't be too distressed by a WONTFIX, though I don't know how much it affects other people. I've just noticed that this is a smaller version: while 1: if 0<0: pass I'm curious as to why the above is not interruptible, but things like while 1: if 0+0: pass are. -- ___ Python tracker <http://bugs.python.org/issue21870> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6690] BUILD_SET followed by COMPARE_OP (in) can be optimized if all items are consts
New submission from Alex : Just like we turn BUILD_LIST; COMPARE_OP (in) into a LOAD_CONST if all the members are consts, we can do the same for BUILD_SET, instead turning it into a LOAD_CONST of a frozenset. The following is the bytecode that is current produced for each datastructure. >>> dis.dis(lambda o: o in (1,2,3)) 1 0 LOAD_FAST0 (o) 3 LOAD_CONST 3 ((1, 2, 3)) 6 COMPARE_OP 6 (in) 9 RETURN_VALUE >>> dis.dis(lambda o: o in [1,2,3]) 1 0 LOAD_FAST0 (o) 3 LOAD_CONST 3 ((1, 2, 3)) 6 COMPARE_OP 6 (in) 9 RETURN_VALUE >>> dis.dis(lambda o: o in {1,2,3}) 1 0 LOAD_FAST0 (o) 3 LOAD_CONST 0 (1) 6 LOAD_CONST 1 (2) 9 LOAD_CONST 2 (3) 12 BUILD_SET3 15 COMPARE_OP 6 (in) 18 RETURN_VALUE -- components: Interpreter Core messages: 91506 nosy: alex severity: normal status: open title: BUILD_SET followed by COMPARE_OP (in) can be optimized if all items are consts versions: Python 3.2 ___ Python tracker <http://bugs.python.org/issue6690> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6690] BUILD_SET followed by COMPARE_OP (in) can be optimized if all items are consts
Alex added the comment: Antoine, I hope to have some time to write a patch for this in the coming week. -- ___ Python tracker <http://bugs.python.org/issue6690> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6922] Interpreter hangs up while trying to decode invalid utf32 stream.
New submission from Alex : *** Prerequisites: Python 2.6.2 (r262:71605, Apr 14 2009, 22:40:02) [MSC v.1500 32 bit (Intel)] on win32 *** Description: 'utf_32_le' and 'utf_32_be' codecs are overconsuming memory when input data are damaged and kwarg 'errors' to str.decode is other than 'strict'. *** Steps: 1. Start interpreter 2. Type: '\x01'.decode('utf_32_le', 'replace') or '\x01'.decode('utf32', 'ignore') or ('something'.encode('utf32') + '\x00').decode('utf32', 'ignore') 3. Execute *** Notes: 1. seems like any stream raising UnicodeDecodeError in 'strict' mode causes hangup in 'ignore' or 'replace'. *** Expected result: 1. AssertionError on "assert errors == 'strict'" raised, just as bz2_codec does, if utf32 cannot be partially decoded at all. 2. Behaviour that 'utf8' and 'utf16' implement for such cases. *** Received result: 1. Interpreter hangs, uses up to 100% of CPU kernel and starts to consume RAM. 2. Grows large enough to consume all the RAM it could get (takes up to several minutes on my machine). 3. Produces following traceback: Traceback (most recent call last): File "", line 1, in File "C:\Python26\lib\encodings\utf_32_be.py", line 11, in decode return codecs.utf_32_be_decode(input, errors, True) MemoryError 4. Sometimes traceback is printed, but text "MemoryError" is not, just leaving blank line in the place. -- components: Interpreter Core, Library (Lib), Unicode, Windows messages: 92704 nosy: mwizard severity: normal status: open title: Interpreter hangs up while trying to decode invalid utf32 stream. versions: Python 2.6 ___ Python tracker <http://bugs.python.org/issue6922> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7122] multiprocessing.Pool() problem in windows
New submission from Alex : Maybe I didn't understand how multiprocessing works but when running the test code below I get 200+ processes in Windows and it never finishes. It works fine on Linux. -- components: Library (Lib) files: prueba.py messages: 93975 nosy: SirLalala severity: normal status: open title: multiprocessing.Pool() problem in windows versions: Python 2.6 Added file: http://bugs.python.org/file15123/prueba.py ___ Python tracker <http://bugs.python.org/issue7122> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com