[issue20692] Tutorial and FAQ: how to call a method on an int

2021-03-22 Thread Irit Katriel
Change by Irit Katriel : -- keywords: +easy versions: +Python 3.10 -Python 2.7 ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue43594] A metaclass that inherits both `ABC` and `ABCMeta` breaks on `__subclasscheck__`

2021-03-22 Thread Kamil Turek
Change by Kamil Turek : -- nosy: +kamilturek ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue43596] change assertRaises message when wrong exception is raised

2021-03-22 Thread Kamil Turek
Change by Kamil Turek : -- nosy: +kamilturek ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue38905] venv python reports wrong sys.executable in a subprocess on Windows

2021-03-22 Thread Eryk Sun
Eryk Sun added the comment: In some cases, the problem can be worked around by setting the __PYVENV_LAUNCHER__ environment variable and executing the base executable. For example: import os import sys import subprocess def get_python_exe_env(): if sys.executable == g

[issue39091] _PyErr_CreateException() must check that the result is an exception (CPython Segfault in 5 lines of code)

2021-03-22 Thread Irit Katriel
Change by Irit Katriel : -- versions: +Python 3.10 -Python 3.7 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40813] Line number of SyntaxError

2021-03-22 Thread Terry J. Reedy
Terry J. Reedy added the comment: Whatever the situation was last May, current 3.10 now results in a correct and improved traceback ending in File "F:\Python\a\tem4.py", line 2 print("hello world" ^ SyntaxError: '(' was never closed Same if \n or additional text is added to th

[issue41718] test.regrtest has way too many imports

2021-03-22 Thread STINNER Victor
STINNER Victor added the comment: New changeset 532e063fc2bf9e6e80550670ddc5dc5d2b1d2450 by Victor Stinner in branch 'master': bpo-41718: regrtest saved_test_environment avoids imports (GH-24934) https://github.com/python/cpython/commit/532e063fc2bf9e6e80550670ddc5dc5d2b1d2450 -- _

[issue41718] test.regrtest has way too many imports

2021-03-22 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +23740 pull_request: https://github.com/python/cpython/pull/24980 ___ Python tracker ___ __

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

2021-03-22 Thread Felix C. Stegerman
Felix C. Stegerman added the comment: I've closed the PR for now. Using a carefully crafted ZipInfo object doesn't work because ZipFile modifies its .external_attr when set to 0. Using something like this quickly hacked together ZipInfo subclass does work: class ZeroedZipInfo(zipfile.ZipInf

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

2021-03-22 Thread Felix C. Stegerman
Change by Felix C. Stegerman : -- components: -IO, Library (Lib) versions: -Python 3.6, Python 3.7, Python 3.8, Python 3.9 ___ Python tracker ___

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

2021-03-22 Thread Felix C. Stegerman
Change by Felix C. Stegerman : -- components: +Library (Lib) ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

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

2021-03-22 Thread Felix C. Stegerman
Change by Felix C. Stegerman : -- type: -> enhancement ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https

[issue41718] test.regrtest has way too many imports

2021-03-22 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +23741 pull_request: https://github.com/python/cpython/pull/24981 ___ Python tracker ___ __

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

2021-03-22 Thread Felix C. Stegerman
Felix C. Stegerman added the comment: > external_attr == 0 may cause issues with permissions. That may be true in some scenarios, but not being able to set it to 0 means you can't create identical files to those produced by other tools -- like those used to generate APKs -- which do in fact

[issue43597] robotparser should support specifying SSL context

2021-03-22 Thread Tarun Chinmai Sekar
Change by Tarun Chinmai Sekar : -- nosy: Tchinmai7 priority: normal severity: normal status: open title: robotparser should support specifying SSL context type: enhancement versions: Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9 ___ Py

[issue41718] test.regrtest has way too many imports

2021-03-22 Thread STINNER Victor
STINNER Victor added the comment: New changeset 10417dd15f135c179cf4234d1abe506915d802ff by Victor Stinner in branch 'master': bpo-41718: Reduce libregrtest runtest imports (GH-24980) https://github.com/python/cpython/commit/10417dd15f135c179cf4234d1abe506915d802ff -- _

[issue43597] robotparser should support specifying SSL context

2021-03-22 Thread Tarun Chinmai Sekar
Change by Tarun Chinmai Sekar : -- components: +Library (Lib) ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43555] Location of SyntaxError with new parser missing (after continuation character)

2021-03-22 Thread Terry J. Reedy
Terry J. Reedy added the comment: Before the patch, IDLE highlighted the \n endline with a red background, which tk displays as red background from the blank space after the 4 to the right edge of the text widget, including in 3.8.8. The 3.8 result, different from REPL, is due the the diffe

[issue43597] robotparser should support specifying SSL context

2021-03-22 Thread Tarun Chinmai Sekar
New submission from Tarun Chinmai Sekar : IMO this could be enhanced by adding a sslcontext parameter to read method a sample change would it could look like ``` def read(self, sslcontext=None): """Reads the robots.txt URL and feeds it to the parser.""" try: if sslcontext:

[issue41718] test.regrtest has way too many imports

2021-03-22 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +23742 pull_request: https://github.com/python/cpython/pull/24982 ___ Python tracker ___ __

[issue41718] test.regrtest has way too many imports

2021-03-22 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +23743 pull_request: https://github.com/python/cpython/pull/24983 ___ Python tracker ___ __

[issue43555] Location of SyntaxError with new parser missing (after continuation character)

2021-03-22 Thread Guido van Rossum
Guido van Rossum added the comment: We should definitely document the column offset being 1-based, if it hasn't been already. But be careful, there are some APIs that are 0-based and others that are 1-based, for column offsets. I was quite surprised at some point to find out that we were inc

[issue43555] Location of SyntaxError with new parser missing (after continuation character)

2021-03-22 Thread Ammar Askar
Ammar Askar added the comment: > We should definitely document the column offset being 1-based Yes please, I remember working on that issue to make it consistently 1-based a while ago and I remember that the tooling was relying on 1-based indexes for column offsets. -- nosy: +ammar2

[issue43597] robotparser should support specifying SSL context

2021-03-22 Thread Tarun Chinmai Sekar
Change by Tarun Chinmai Sekar : -- keywords: +patch pull_requests: +23744 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24984 ___ Python tracker ___

[issue41718] test.regrtest has way too many imports

2021-03-22 Thread STINNER Victor
STINNER Victor added the comment: New changeset 0473fb222956063814b6beb5fd401f9eeaa8a56a by Victor Stinner in branch 'master': bpo-41718: libregrtest runtest avoids import_helper (GH-24983) https://github.com/python/cpython/commit/0473fb222956063814b6beb5fd401f9eeaa8a56a -- ___

[issue41718] test.regrtest has way too many imports

2021-03-22 Thread STINNER Victor
STINNER Victor added the comment: New changeset 30793e81bd90f3346e962435d49073bc588f067c by Victor Stinner in branch 'master': bpo-41718: Disable support.testresult XML output by default (GH-24982) https://github.com/python/cpython/commit/30793e81bd90f3346e962435d49073bc588f067c --

[issue41718] test.regrtest has way too many imports

2021-03-22 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +23745 pull_request: https://github.com/python/cpython/pull/24985 ___ Python tracker ___ __

[issue43597] robotparser should support specifying SSL context

2021-03-22 Thread Tarun Chinmai Sekar
Change by Tarun Chinmai Sekar : -- pull_requests: +23746 pull_request: https://github.com/python/cpython/pull/24986 ___ Python tracker ___

[issue41718] test.regrtest has way too many imports

2021-03-22 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +23747 pull_request: https://github.com/python/cpython/pull/24987 ___ Python tracker ___ __

[issue10572] Move test sub-packages to Lib/test

2021-03-22 Thread Terry J. Reedy
Terry J. Reedy added the comment: I added idlelib.idletest in May 2013 with the concurrence of Nick Coughlin, who also suggested 'idle_test' rather than just 'test'. It currently has 72 files (66 test_xyz files for idlelib modules). Foord's opening justification for moving package tests was

[issue41718] test.regrtest has way too many imports

2021-03-22 Thread STINNER Victor
STINNER Victor added the comment: New changeset 9feae41c4f04ca27fd2c865807a5caeb50bf4fc4 by Victor Stinner in branch 'master': bpo-41718: libregrtest avoids importing datetime (GH-24985) https://github.com/python/cpython/commit/9feae41c4f04ca27fd2c865807a5caeb50bf4fc4 -- __

[issue43598] test_subprocess logs multiple ResourceWarning warnings

2021-03-22 Thread STINNER Victor
New submission from STINNER Victor : $ ./python -m test test_subprocess -v (...) test_send_signal_race2 (test.test_subprocess.POSIXProcessTestCase) ... /home/vstinner/python/master/Lib/subprocess.py:1062: ResourceWarning: subprocess 137193 is still running _warn("subprocess %s is still runni

[issue41718] test.regrtest has way too many imports

2021-03-22 Thread STINNER Victor
STINNER Victor added the comment: len(sys.modules) of msg376374 test_sys_modules: * Python 3.6: 184 * Python 3.7: 183 * Python 3.8: 221 * Python 3.9: 233 * master: 131 The master branch imports 102 less modules than Python 3.9 (233 => 131)! Almost the half. asyncio, logging, multiprocessing

[issue43598] test_subprocess logs multiple ResourceWarning warnings

2021-03-22 Thread Dong-hee Na
Change by Dong-hee Na : -- nosy: +corona10 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue43558] The dataclasses documentation should mention how to call super().__init__

2021-03-22 Thread Dong-hee Na
Change by Dong-hee Na : -- nosy: +corona10 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue14364] Argparse incorrectly handles '--' as argument to option

2021-03-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: Unassigning because I haven't been able to make time for this one. -- assignee: rhettinger -> ___ Python tracker ___

[issue35118] Add peek() or first() method in queue

2021-03-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: >> FWIW, the standard library queue module doesn't have >> a straight-forward way to implement a peek() method. > I currently use `q.deque[0]` The Queue class is only allowed to call _init, _qsize, _put, and _get. It is not allowed to directly touch the

[issue43599] Setting long domain of locale.dgettext() crashes Python interpreter

2021-03-22 Thread Xinmeng Xia
New submission from Xinmeng Xia : Setting the first argument of locale.dgettext() long string, Python interpreter crashes. == Python 3.10.0a6 (default, Mar 19 2021, 11:45:56) [GCC 7.5.0] on linux Type "help", "copyright", "credits" or "licen

[issue37405] socket.getsockname() returns string instead of tuple

2021-03-22 Thread FRANK BENNETT
FRANK BENNETT added the comment: $ make test TESTOPTS="-v test_socket" ERROR: testSendFrame (__main__.CANTest) -- Traceback (most recent call last): File "/s/opt/cpython/debug/test_socket.py", line 2052, in testSendFrame

[issue43600] IDLE: fix highlight locationfor f-string field errors

2021-03-22 Thread Terry J. Reedy
New submission from Terry J. Reedy : Spinoff from #41064. In current python, the f'{*x}' traceback ends with (*x) ^ SyntaxError: f-string: can't use starred expression here. For f'{**x}', the message is "f-string: invalid syntax" and the ^ is also under the 2nd character in the rep

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

2021-03-22 Thread Terry J. Reedy
Terry J. Reedy added the comment: Cressey noted both a compile and IDLE Shell issue. They must be handled separately by different people in separate bpo issues. The first is about the helpful versus less helpful SyntaxError messages in the following (master compiled today). >>> f'{*x}' F

[issue25130] Make tests more PyPy compatible

2021-03-22 Thread Terry J. Reedy
Terry J. Reedy added the comment: With 2.7 EOL, is this still relevant? -- nosy: +terry.reedy ___ Python tracker ___ ___ Python-bug

[issue20608] 'SyntaxError: invalid token' is unfriendly

2021-03-22 Thread Terry J. Reedy
Terry J. Reedy added the comment: Fixed elsewhere. >>> 04208 File "", line 1 04208 ^ SyntaxError: leading zeros in decimal integer literals are not permitted; use an 0o prefix for octal integers >>> 0o38 File "", line 1 0o38 ^ SyntaxError: invalid digit '8' in octal

[issue1634034] Show "expected" token on syntax error

2021-03-22 Thread Terry J. Reedy
Terry J. Reedy added the comment: I think that this issue should be closed as 'out of date' as it was pretty open-ended and it is unclear what request remains. For the specific case "for a in (8,9)", the suggested "expected ':'" has been added on another issue. I expect that there are other

[issue43601] Tools/c-analyzer/check-c-globals.py run throw exception err

2021-03-22 Thread junyixie
New submission from junyixie : how to use Tools/c-analyzer/check-c-globals.py? in readme, python3 Tools/c-analyzer/check-c-globals.py /Users/xiejunyi/cpython/Tools/c-analyzer/c_common/tables.py:236: FutureWarning: Possible nested set at position 12 _COLSPEC_RE = re.compile(textwrap.dedent(

[issue43347] IDLE crashes in macOS Apple chip, maybe completions

2021-03-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: This time I got a screen shot showing the gray completion box that appeared just as IDLE stopped responding and froze: https://www.dropbox.com/s/eu3wd13vytz6tt8/Screen%20Shot%202021-03-22%20at%209.37.56%20PM.png?dl=0 Am now running Python 3.10.0a6 on Big

[issue43602] Include Decimal's in numbers.Real

2021-03-22 Thread Sergey B Kirpichev
New submission from Sergey B Kirpichev : Commit 82417ca9b2 includes Decimal's in the numbers tower, but only as an implementation of the abstract numbers.Number. The mentioned reason is "Decimals are not interoperable with floats" (see comments in the numbers.py as well), i.e. there is no lo

<    1   2