[issue37004] SequenceMatcher.ratio() noncommutativity not well-documented

2019-08-06 Thread miss-islington
Change by miss-islington : -- pull_requests: +14893 pull_request: https://github.com/python/cpython/pull/15159 ___ Python tracker ___

[issue37004] SequenceMatcher.ratio() noncommutativity not well-documented

2019-08-06 Thread miss-islington
Change by miss-islington : -- pull_requests: +14892 pull_request: https://github.com/python/cpython/pull/15158 ___ Python tracker ___

[issue37004] SequenceMatcher.ratio() noncommutativity not well-documented

2019-08-06 Thread miss-islington
Change by miss-islington : -- pull_requests: +14891 pull_request: https://github.com/python/cpython/pull/15157 ___ Python tracker ___

[issue37004] SequenceMatcher.ratio() noncommutativity not well-documented

2019-08-06 Thread miss-islington
miss-islington added the comment: New changeset e9cbcd0018abd2a5f2348c45d5c9c4265c4f42dc by Miss Islington (bot) (sweeneyde) in branch 'master': bpo-37004: Documented asymmetry of string arguments in difflib.SequenceMatcher for ratio method (GH-13482)

[issue37772] zipfile.Path.iterdir() outputs sub directories many times or not at all

2019-08-06 Thread Srinivas Nyayapati
Srinivas Nyayapati added the comment: I have attempted a fix to Path._add_implied_dirs and have the changes in my github branch https://github.com/shireenrao/cpython/tree/zipfile. Is it ok if I submitted a PR on this? I have run test_zipfile.py and the test case provided by Jörn Heissler

[issue31226] shutil.rmtree fails when target has an internal directory junction (Windows)

2019-08-06 Thread Eryk Sun
Eryk Sun added the comment: > Junctions are sometimes used as links (e.g. mklink /j) and sometimes > as volume mount points (e.g. mountvol.exe). That people sometimes use junctions as if they're symlinks doesn't mean that we should pretend it's true. The reparse tag is

[issue37780] A strange bug in eval() not present in Python 3

2019-08-06 Thread Raymond Hettinger
Raymond Hettinger added the comment: This isn't a bug. In Python 2, True and False are variable names rather than keywords. That means they can be shadowed: >>> False = 10 >>> True = 20 >>> [False, True] [10, 20] A Counter() is a kind a dictionary that returns zero rather than raising a

[issue37781] Use "z" for PY_FORMAT_SIZE_T

2019-08-06 Thread Inada Naoki
Change by Inada Naoki : -- keywords: +patch pull_requests: +14890 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15156 ___ Python tracker ___

[issue37781] Use "z" for PY_FORMAT_SIZE_T

2019-08-06 Thread Inada Naoki
Change by Inada Naoki : -- versions: +Python 3.9 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37781] Use "z" for PY_FORMAT_SIZE_T

2019-08-06 Thread Inada Naoki
New submission from Inada Naoki : MSVC 2015 supports "z" for size_t format. I'm not sure about 2013. AIX support it too. Now "z" is portable enough. https://mail.python.org/archives/list/python-...@python.org/thread/CAXKWESUIWJNJFLLXXWTQDUWTN3F7KOU/#QVSBYYICHYC3IFITF4QNMGIOLOGAQS6I

[issue37780] A strange bug in eval() not present in Python 3

2019-08-06 Thread wang xuancong
New submission from wang xuancong : We all know that since: [False, True, False].count(True) gives 1 eval('[False, True, False].count(True)') also gives 1. However, in Python 2, eval('[False, True, False].count(True)', {}, Counter()) gives 3, while eval('[False, True, False].count(True)', {},

[issue37741] importlib.metadata docs not showing up in the module index

2019-08-06 Thread miss-islington
Change by miss-islington : -- pull_requests: +14889 pull_request: https://github.com/python/cpython/pull/15154 ___ Python tracker ___

[issue37646] eval() in a list comprehension

2019-08-06 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset 9341dcb4b9520ab92df10d4256e93a50e1e7d19f by Raymond Hettinger (Miss Islington (bot)) in branch '3.8': bpo-37646: Document that eval() cannot access nested scopes (GH-15117) (GH-15155)

[issue37646] eval() in a list comprehension

2019-08-06 Thread Raymond Hettinger
Change by Raymond Hettinger : -- assignee: -> docs@python components: +Documentation -Interpreter Core nosy: +docs@python resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue37646] eval() in a list comprehension

2019-08-06 Thread miss-islington
Change by miss-islington : -- pull_requests: +14888 pull_request: https://github.com/python/cpython/pull/15155 ___ Python tracker ___

[issue37646] eval() in a list comprehension

2019-08-06 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset 610a4823cc0a3c2380ad0dfe64ae483ced4e5304 by Raymond Hettinger in branch 'master': bpo-37646: Document that eval() cannot access nested scopes (GH-15117) https://github.com/python/cpython/commit/610a4823cc0a3c2380ad0dfe64ae483ced4e5304

[issue25172] Unix-only crypt should not be present on Windows.

2019-08-06 Thread Terry J. Reedy
Terry J. Reedy added the comment: I agree with Paul about the wording. Note that the proposed platform-specific catch and raise are for crypt.py, not test_crypt.py. If a test module should be skipped entirely, import_module is correct. For more refinement, test_idle has, for example, tk

[issue34488] improve performance of BytesIO.writelines() by avoiding creation of unused PyLongs

2019-08-06 Thread Inada Naoki
Change by Inada Naoki : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue34488] improve performance of BytesIO.writelines() by avoiding creation of unused PyLongs

2019-08-06 Thread Inada Naoki
Inada Naoki added the comment: New changeset 3e41f3cabb661824a1a197116f7f5ead64eb6ced by Inada Naoki (Sergey Fedoseev) in branch 'master': bpo-34488: optimize BytesIO.writelines() (GH-8904) https://github.com/python/cpython/commit/3e41f3cabb661824a1a197116f7f5ead64eb6ced --

[issue37757] TargetScopeError not raised for comprehension scope conflict

2019-08-06 Thread Guido van Rossum
Guido van Rossum added the comment: If you and Nick both feel strongly about this please take it to python-dev, I'm sure we'll get closure quickly there. -- ___ Python tracker

[issue37762] IDLE very slow due a super long line output in chunks

2019-08-06 Thread Terry J. Reedy
Terry J. Reedy added the comment: For the general issue of interpreting control chars, see #23220 (and duplicate #24572). IDLE is a development environment, not a production environment. If Tal's hypothesis is correct, a solution for Bernard would be a new addition I want for Run

[issue37757] TargetScopeError not raised for comprehension scope conflict

2019-08-06 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: > OTOH This would require a PEP change, formal review, etc. It would be trivial though. There are only two references to TargetScopeError in the PEP. One talks about adding the exception and the other just mentions it almost in passing as a subclass of

[issue37741] importlib.metadata docs not showing up in the module index

2019-08-06 Thread Barry A. Warsaw
Change by Barry A. Warsaw : -- keywords: +patch pull_requests: +14887 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15153 ___ Python tracker ___

[issue25172] Unix-only crypt should not be present on Windows.

2019-08-06 Thread Srinivas Nyayapati
Srinivas Nyayapati added the comment: How do I write tests which only run for a given platform? Looking at test_crypt.py, I see that the crypt module is imported using test.support module so the exception will be raised even before the tests run. Is there a way to test imports? --

[issue37741] importlib.metadata docs not showing up in the module index

2019-08-06 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: I’ll do a PR for that too. > On Aug 6, 2019, at 14:07, Brett Cannon wrote: > > > Brett Cannon added the comment: > > If there's no porting benefit then let's move it to a single module instead > of a package. > > -- > >

[issue37777] imap breaks on OpenSSL 1.1.1 when SNI is enforced

2019-08-06 Thread Casey
Casey added the comment: Update: After digging further (and enabling the "Less secure app access" setting on the test Google account) it looks like Python 2.7 caps TLS at 1.2 rather than using 1.3 when OpenSSL is upgraded. This prevents breakage, and it looks like the SSLSocket class

[issue2920] Patch to print symbolic value of errno in OSError.__str__()

2019-08-06 Thread Zackery Spytz
Zackery Spytz added the comment: Eryk, I'm not sure if something similar should be done for winerror. I think it's best to keep OSError_str() as simple as possible. -- ___ Python tracker

[issue37741] importlib.metadata docs not showing up in the module index

2019-08-06 Thread Brett Cannon
Brett Cannon added the comment: If there's no porting benefit then let's move it to a single module instead of a package. -- ___ Python tracker ___

[issue37444] Differing exception between builtins and importlib when importing beyond top-level package

2019-08-06 Thread Brett Cannon
Change by Brett Cannon : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue37775] update doc of compileall

2019-08-06 Thread Brett Cannon
Change by Brett Cannon : -- nosy: +vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37772] zipfile.Path.iterdir() outputs sub directories many times or not at all

2019-08-06 Thread Brett Cannon
Change by Brett Cannon : -- nosy: +jaraco ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37778] Windows Store package uses wrong icons for file association

2019-08-06 Thread Steve Dower
Change by Steve Dower : -- keywords: +patch pull_requests: +14886 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/15150 ___ Python tracker

[issue37779] configparser: add documentation about several read() behaviour

2019-08-06 Thread Stéphane Blondon
New submission from Stéphane Blondon : The documentation is not explicit about the behaviour if several files are read by the same ConfigParser: the data are not reset between two read(). I suggest to add such information in the documentation. There is a draft: === start === When a

[issue37778] Windows Store package uses wrong icons for file association

2019-08-06 Thread Steve Dower
New submission from Steve Dower : No Logo element is specified in the FileTypeAssociation element, and so files get a different icon from the regular installer. See https://docs.microsoft.com/en-us/uwp/schemas/appxpackage/appxmanifestschema/element-1-logo -- assignee: steve.dower

[issue37777] imap breaks on OpenSSL 1.1.1 when SNI is enforced

2019-08-06 Thread Casey
New submission from Casey : OpenSSL 1.1.1 is an LTS release that will see long maintenance, and Ubuntu 18.04 LTS has now upgraded from 1.1.0 to 1.1.1. However, with this upgrade, TLS 1.3 allows email clients to require an SNI for the handshake to succeed. Because the 2.7 imap module does not

[issue25172] Unix-only crypt should not be present on Windows.

2019-08-06 Thread Paul Moore
Paul Moore added the comment: It might be worth adding a test (running only on Windows) to confirm that if you try to import crypt you get an import error with a message that includes the phrase "not supported". That will ensure that we don't get regressions here in future, while still not

[issue25172] Unix-only crypt should not be present on Windows.

2019-08-06 Thread Srinivas Nyayapati
Srinivas Nyayapati added the comment: Sorry, I should have waited 1 day after submitting the CLA before submitting the PR. The system is waiting for my CLA to be cleared. -- ___ Python tracker

[issue25172] Unix-only crypt should not be present on Windows.

2019-08-06 Thread Srinivas Nyayapati
Change by Srinivas Nyayapati : -- keywords: +patch pull_requests: +14884 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/15149 ___ Python tracker

[issue37583] Got a 113 error when running the test_socket

2019-08-06 Thread hai shi
hai shi added the comment: ping :) -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue27379] SocketType changed in Python 3

2019-08-06 Thread hai shi
hai shi added the comment: ping -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37776] Test Py_Finalize() from a subinterpreter

2019-08-06 Thread Joannah Nanjekye
Change by Joannah Nanjekye : -- components: +Tests stage: -> needs patch versions: +Python 3.9 ___ Python tracker ___ ___

[issue25172] Unix-only crypt should not be present on Windows.

2019-08-06 Thread Paul Moore
Paul Moore added the comment: The proposed wording seems good to me. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue36225] Lingering subinterpreters should be implicitly cleared on shutdown

2019-08-06 Thread Joannah Nanjekye
Joannah Nanjekye added the comment: The test request is moved to issue37776. -- ___ Python tracker ___ ___ Python-bugs-list

[issue37776] Test Py_Finalize() from a subinterpreter

2019-08-06 Thread Joannah Nanjekye
New submission from Joannah Nanjekye : Am opening a test request from @ncoghlan from the discussing on issue 36225. There is a need to add a test that exercises what happens when Py_Finalize() is called from a sub-interpreter rather than the main interpreter. -- messages: 349123

[issue19978] Update multiprocessing.spawn to use runpy.run_path

2019-08-06 Thread Joannah Nanjekye
Joannah Nanjekye added the comment: Working on issue 19982 is important prior to this. -- ___ Python tracker ___ ___

[issue37775] update doc of compileall

2019-08-06 Thread hai shi
Change by hai shi : -- keywords: +patch pull_requests: +14883 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15148 ___ Python tracker ___

[issue19982] Add a "target" parameter to runpy.run_path and runpy.run_module

2019-08-06 Thread Joannah Nanjekye
Joannah Nanjekye added the comment: issue 19978 also needs this. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue37775] update doc of compileall

2019-08-06 Thread hai shi
New submission from hai shi : due to https://github.com/python/cpython/commit/a6b3ec5b6d4f6387820fccc570eea08b9615620d, we need update invalidation_mode's value from py_compile.PycInvalidationMode.TIMESTAMP to None in compile_xx function. -- assignee: docs@python components:

[issue36225] Lingering subinterpreters should be implicitly cleared on shutdown

2019-08-06 Thread Joannah Nanjekye
Joannah Nanjekye added the comment: I am investigating this but in the meantime. > It also occurs to me that we don't currently have a test case for what > happens if you call Py_Finalize from a sub-interpreter rather than the main > interpreter. @ncoghlan Am moving this test request in a

[issue25172] Unix-only crypt should not be present on Windows.

2019-08-06 Thread Steve Dower
Steve Dower added the comment: > Can I submit my PR now? Sure, though if others want to weigh in on wording they should feel free to do it here. > I forgot to ask about tests? I see there is test_crypt.py under Lib\test. Do > you have any thoughts on how to test this? It should continue

[issue25172] Unix-only crypt should not be present on Windows.

2019-08-06 Thread Srinivas Nyayapati
Srinivas Nyayapati added the comment: I forgot to ask about tests? I see there is test_crypt.py under Lib\test. Do you have any thoughts on how to test this? -- ___ Python tracker

[issue25172] Unix-only crypt should not be present on Windows.

2019-08-06 Thread Srinivas Nyayapati
Srinivas Nyayapati added the comment: Sounds good. Can I submit my PR now? -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue25172] Unix-only crypt should not be present on Windows.

2019-08-06 Thread Steve Dower
Steve Dower added the comment: `sys.platform` is the value that reflects how Python was compiled - `sys.platform == 'win32'` means compiled for Windows. And since this issue is related to compilation, it makes the most sense to use sys. (`os.name` is also based on compilation, but it really

[issue25172] Unix-only crypt should not be present on Windows.

2019-08-06 Thread Srinivas Nyayapati
Srinivas Nyayapati added the comment: What is the recommended way to check for platform in cpython? Is it using the sys module or os module? As for the error messages I couldn't think of anything better then what you suggested :). win32: raise ImportError("The crypt module is not supported

[issue35982] Create unit-tests for os.renames()

2019-08-06 Thread Joannah Nanjekye
Joannah Nanjekye added the comment: @giampaolo, are you still working on these tests? If not can someone else pick this up? -- components: +Tests stage: -> needs patch versions: +Python 3.9 ___ Python tracker

[issue37734] Registry keys for Windows Store package have wrong executable

2019-08-06 Thread Steve Dower
Change by Steve Dower : -- keywords: +patch pull_requests: +14882 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/15146 ___ Python tracker

[issue37734] Registry keys for Windows Store package have wrong executable

2019-08-06 Thread Steve Dower
Steve Dower added the comment: It looks like the best solution here may be to rename the bundled executables to "python3.8.exe" etc. rather than "python.exe". We will still keep the "python.exe" alias, and sys.executable won't change (it'll still point to the stable alias), but by having

[issue25172] Unix-only crypt should not be present on Windows.

2019-08-06 Thread Steve Dower
Steve Dower added the comment: That sounds good to me, though you may want to propose the error message here first so we can get the wording right - probably not everyone will be watching github PR. It probably makes sense to raise a different error message on platforms where we do expect

[issue37762] IDLE very slow due a super long line output in chunks

2019-08-06 Thread Tal Einat
Tal Einat added the comment: So, Jupyter notebook has special support for carriage-return ('\r') and backspace ('\b') characters[1]. Do we want to consider adding similar support in IDLE? [1]

[issue37774] Micro-optimize vectorcall using PY_LIKELY

2019-08-06 Thread Jeroen Demeyer
Change by Jeroen Demeyer : -- keywords: +patch pull_requests: +14881 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15144 ___ Python tracker ___

[issue37762] IDLE very slow due a super long line output in chunks

2019-08-06 Thread Tal Einat
Tal Einat added the comment: IDLE in general doesn't recognize and support control characters commonly used in terminals. This is often a problem with running things that show a progress bars, which usually print "\r" to return the cursor to the beginning of the line and then overwrite the

[issue37774] Micro-optimize vectorcall using PY_LIKELY

2019-08-06 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37774] Micro-optimize vectorcall using PY_LIKELY

2019-08-06 Thread Jeroen Demeyer
New submission from Jeroen Demeyer : Take the LIKELY/UNLIKELY macros out of Objects/obmalloc.c (renaming them of course). Use them in a few places to micro-optimize vectorcall. -- components: Interpreter Core messages: 349108 nosy: Mark.Shannon, inada.naoki, jdemeyer priority: normal

[issue37771] No equivalent of `inspect.getcoroutinestate` for PyAsyncGenASend instances

2019-08-06 Thread George Zhang
Change by George Zhang : -- versions: +Python 3.9 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue1967] Backport dictviews to 2.7

2019-08-06 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +14880 pull_request: https://github.com/python/cpython/pull/15143 ___ Python tracker ___

[issue1967] Backport dictviews to 2.7

2019-08-06 Thread Thomas Grainger
Thomas Grainger added the comment: It seems that 'viewkeys', 'viewvalues' and 'viewitems' methods were not added to types.DictProxyType, was that intentional? -- nosy: +graingert ___ Python tracker

[issue32912] Raise non-silent warning for invalid escape sequences

2019-08-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: PR 15142 reverts that change for 3.8. -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue32912] Raise non-silent warning for invalid escape sequences

2019-08-06 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +14879 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/15142 ___ Python tracker ___

[issue37773] ValueError: I/O operation on closed file. in ZipFile destructor

2019-08-06 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37773] ValueError: I/O operation on closed file. in ZipFile destructor

2019-08-06 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: This looks like a regression in 3.8 so I have added 3.8 regression tag. -- keywords: +3.8regression nosy: +xtreak ___ Python tracker

[issue37773] ValueError: I/O operation on closed file. in ZipFile destructor

2019-08-06 Thread Jörn Heissler
New submission from Jörn Heissler : When running this code: from zipfile import ZipFile import io def foo(): pass data = io.BytesIO() zf = ZipFile(data, "w") I get this message: Exception ignored in: Traceback (most recent call last): File

[issue32912] Raise non-silent warning for invalid escape sequences

2019-08-06 Thread Gregory P. Smith
Gregory P. Smith added the comment: Can the pyc compilation step done by our normal package installers be made to treat this warning as an error so that it is forced into the package owners faces instead of overlooked because it was just something on stderr? This syntax warning is

[issue37752] Redundant Py_CHARMASK called in some files

2019-08-06 Thread Ma Lin
Ma Lin added the comment: VC2017 optimizes multiple `unsigned char)((c) & 0xff` to a single `movzx` operation, maybe other compilers do it as well. If so, there will be no performance changes. -- ___ Python tracker

[issue37772] zipfile.Path.iterdir() outputs sub directories many times or not at all

2019-08-06 Thread Jörn Heissler
New submission from Jörn Heissler : Hello, #!/usr/bin/python3.8 from zipfile import ZipFile, Path import io def recurse_print(parent): for child in parent.iterdir(): if child.is_file(): print(child, child.read_text()) if child.is_dir():