[issue37636] Deprecate slicing and ordering operations on sys.version

2019-08-09 Thread Raymond Hettinger
Raymond Hettinger added the comment: > Regarding the "Would releasing 4.0 instead avoid problems?" > Anthony actually did that experiment, too: it broke third > party projects even more impressively than the 3.10 build did. That's good to know. Please thank Anthony for doing his homework.

[issue16837] Number ABC can be instantiated

2019-08-09 Thread Raymond Hettinger
Raymond Hettinger added the comment: I looked into this a bit more and don't see another non-invasive way of blocking instantiation. Marking for Guido to take a look at. He's the expert on ABCs and typing and is the originator of the __hash__ = None approach to turning off hashability.

[issue37806] Infinite recursion with typing.get_type_hints

2019-08-09 Thread Valerio G
Change by Valerio G : -- type: -> crash ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37806] Infinite recursion with typing.get_type_hints

2019-08-09 Thread Valerio G
New submission from Valerio G : I encountered one condition where calling get_type_hints causes infinite recursion when dealing with forward declaration and cyclic types. Here's an example: from typing import Union, List, get_type_hints ValueList = List['Value'] Value = Union[str,

[issue37799] Renaming Doc/reference/ to Doc/language/

2019-08-09 Thread Mariatta
Mariatta added the comment: The change is not worth doing for several reasons: - renaming filename/directory breaks git history on GitHub web UI. The history can still be viewed if you use the command line e.g. git log --follow. - other pages like stack overflow or blog posts have linked

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

2019-08-09 Thread Raymond Hettinger
Raymond Hettinger added the comment: One possibility is to restrict the warning to a backslash followed by an alphabetic character or backslash, and that we define backslash followed by any other printable character as specifically allowed. This would catch the likely sources of errors

[issue36714] Tweak doctest 'example' regex to allow a leading ellipsis in 'want' line

2019-08-09 Thread Brian Skinn
Brian Skinn added the comment: On reflection, it would probably be better to limit the ELLIPSIS to 3 or 4 periods ('[.]{3,4}'); otherwise, it would be impossible to express an ellipsis followed by a period in a 'want'. -- ___ Python tracker

[issue14465] xml.etree.ElementTree: add feature to prettify XML output

2019-08-09 Thread Raymond Hettinger
Raymond Hettinger added the comment: FWIW, here is the relevant section of the XML specification, https://www.w3.org/TR/2008/REC-xml-20081126/#sec-white-space : """In editing XML documents, it is often convenient to use "white space" (spaces, tabs, and blank lines) to set apart the markup

[issue16837] Number ABC can be instantiated

2019-08-09 Thread Raymond Hettinger
Raymond Hettinger added the comment: Usually, setting hash to None is the proper way to turn-off hashability. And it's possible that existing code has subclassed Number and provided other methods but not __hash__, so this could potentially break their code. On the other hand, it would be

[issue37799] Renaming Doc/reference/ to Doc/language/

2019-08-09 Thread Emmanuel Arias
Emmanuel Arias added the comment: Hello maggyero, I thinks that could be a good improve. But this structure is used on since old cpython versions, so I don't know if it will be a necessary change. But, if you don't receive some feedback from here, you can propose a PR, maybe other core dev

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

2019-08-09 Thread Gregory P. Smith
Gregory P. Smith added the comment: I haven't looked, so not that i'm aware of. I suggest filing one for each of those. The warning not pointing to the right line in a multiline literal sounds like a bug to me so that one, if fixed, seems reasonable for 3.8. The release manager gets to

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

2019-08-09 Thread Aaron Meurer
Aaron Meurer added the comment: Are there issues tracking the things I mentioned, which should IMO happen before this becomes a hard error (making the warnings reproduce even if the file has already been compiled, and making warning message point to the correct line in multiline strings)?

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

2019-08-09 Thread Gregory P. Smith
Gregory P. Smith added the comment: I'm leaving this open, as we may still want to do it in 3.9+, just in a less disruptive manner. (That, and how, hasn't been decided yet) Follow the thread(s) on python-dev for the latest on that. -- resolution: fixed -> stage: resolved ->

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

2019-08-09 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thank you! -- stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue26543] [EASY] imaplib noop Debug: bytes vs Unicode bug in debug mode

2019-08-09 Thread Kostis Anagnostopoulos
Kostis Anagnostopoulos added the comment: > > BTW, i went back to my code and pasted what seemed to cure the problem, > added in commit 2b99cec in my PR. But i don't have much time to track if it really works. I hope it will help you resolve the issue. Best, Kostis --

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

2019-08-09 Thread Gregory P. Smith
Change by Gregory P. Smith : -- pull_requests: +14927 pull_request: https://github.com/python/cpython/pull/15195 ___ Python tracker ___

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

2019-08-09 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset 4c5b6bac2408f879231c7cd38d67657dd4804e7c by Gregory P. Smith (Serhiy Storchaka) in branch '3.8': [3.8] bpo-32912: Revert SyntaxWarning on invalid escape sequences (GH-15142)

[issue37805] json.dump(..., skipkeys=True) has no unit tests

2019-08-09 Thread Julian Berman
New submission from Julian Berman : Looks like there possibly are upstream tests that could be pulled in with modification: https://github.com/simplejson/simplejson/blob/00ed20da4c0e5f0396661f73482418651ff4d8c7/simplejson/tests/test_dump.py#L53-L66 (Found via

[issue37398] contextlib.ContextDecorator decorating async functions

2019-08-09 Thread Nathaniel Smith
Nathaniel Smith added the comment: @Yury: depends on what you mean by "100% reliable" :-). Like I said above, I'm normally super against automagic detection of sync-vs-async functions because of all the edge cases where it goes wrong, but in this specific case where people are writing a

[issue23666] Add shell session logging option to IDLE

2019-08-09 Thread Tal Einat
Tal Einat added the comment: I'm happy to look into implementing this. Also perhaps auto-saved backups for edited files. Where would you suggest the files be kept? The user's .idlerc directory? -- nosy: +taleinat ___ Python tracker

[issue37398] contextlib.ContextDecorator decorating async functions

2019-08-09 Thread Yury Selivanov
Yury Selivanov added the comment: > I hear you on the semantic confusion, but is a single check at definition > time really that expensive? Do you know how to make that single check 100% reliable? -- ___ Python tracker

[issue37398] contextlib.ContextDecorator decorating async functions

2019-08-09 Thread Nathaniel Smith
Nathaniel Smith added the comment: > I wouldn't be OK with magic switching in the behaviour of ContextDecorator > (that's not only semantically confusing, it's also going to make the > contextlib function wrappers even slower than they already are). I hear you on the semantic confusion, but

[issue37801] Compilation on MINGW64 fails (CODESET,wcstok,...)

2019-08-09 Thread Eryk Sun
Eryk Sun added the comment: I wasn't aware that CPython builds for MSYS2 out of the box, since it's a POSIX-on-Windows platform like Cygwin. Apparently there are patches that enable it to build, since MSYS2 has Python available. For Windows, WCSTOK expands to wcstok_s, which takes a context

[issue26543] [EASY] imaplib noop Debug: bytes vs Unicode bug in debug mode

2019-08-09 Thread Kostis Anagnostopoulos
Kostis Anagnostopoulos added the comment: Dear Sanyam, My apologies, it's been almost a year that i don't need the fix for this code, my app has been graciously decommissioned, and i don;t have any time for it. Best, Kostis On Fri, 9 Aug 2019 at 21:35, Sanyam Khurana wrote: > > Sanyam

[issue34331] Incorrectly pluralized abstract class error message

2019-08-09 Thread Sanyam Khurana
Sanyam Khurana added the comment: Adding 3.9 to this bug. I've reviewed the PR and it looks good to me. -- nosy: +CuriousLearner versions: +Python 3.9 ___ Python tracker ___

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

2019-08-09 Thread Sanyam Khurana
Change by Sanyam Khurana : -- nosy: +CuriousLearner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

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

2019-08-09 Thread Eryk Sun
Eryk Sun added the comment: > Thanks for the detailed explanation Eryk. While it is a little > annoying that it comes 2 years after the initial proposed > solution, I'll happily take that if the end result is a better fix :) Mea culpa. I am sorry about that. I do respect your time and the

[issue36714] Tweak doctest 'example' regex to allow a leading ellipsis in 'want' line

2019-08-09 Thread Brian Skinn
Brian Skinn added the comment: I suppose one alternative solution might be to tweak the ELLIPSIS feature of doctest, such that it would interpret a run of >=3 periods in a row (matching regex pattern of "[.]{3,}") as 'ellipsis'. The regex for PS2 could then have a negative lookahead added,

[issue26543] [EASY] imaplib noop Debug: bytes vs Unicode bug in debug mode

2019-08-09 Thread Sanyam Khurana
Sanyam Khurana added the comment: Hey ankostis, Please let us know if you've time to complete the PR. Thank you :) -- ___ Python tracker ___

[issue26543] [EASY] imaplib noop Debug: bytes vs Unicode bug in debug mode

2019-08-09 Thread Sanyam Khurana
Sanyam Khurana added the comment: Removing 3.5 as it is in security fix mode. Also, the PR just contains the test case that would trigger the condition and not the actual code. -- nosy: +CuriousLearner stage: -> patch review versions: +Python 3.7, Python 3.8, Python 3.9 -Python 3.5

[issue37785] argparse uses %s in gettext calls causing xgettext warnings

2019-08-09 Thread Sanyam Khurana
Sanyam Khurana added the comment: Hi Jakub, Welcome and thank you for contributing. I've added a suggestion on your pull request. Python 3.6 and Python 3.5 are in security fixes stage, so I've removed those tags from this bug. -- nosy: +CuriousLearner type: -> behavior versions:

[issue36714] Tweak doctest 'example' regex to allow a leading ellipsis in 'want' line

2019-08-09 Thread Brian Skinn
Brian Skinn added the comment: Mm, agreed--that regex wouldn't be hard to write. The problem is, AFAICT there's irresolvable syntactic ambiguity in a line starting with exactly three periods, if the doctest PS2 specification is not constrained to be exactly "... ". In such a case, "..."

[issue35712] Make NotImplemented unusable in boolean context

2019-08-09 Thread Vedran Čačić
Vedran Čačić added the comment: Another reason why current behavior is confusing: what do you think filter(2 .__eq__, 'text') should yield? :-o (Yes, I know this isn't the right way to do it, but (element for element in 'text' if element == 2) is twice longer.:) -- nosy:

[issue16837] Number ABC can be instantiated

2019-08-09 Thread Sanyam Khurana
Sanyam Khurana added the comment: I'm changing the versions to Python 3.8 and 3.9 for this bug. -- versions: +Python 3.8, Python 3.9 -Python 3.4, Python 3.5 ___ Python tracker

[issue16837] Number ABC can be instantiated

2019-08-09 Thread Sanyam Khurana
Sanyam Khurana added the comment: Hi Alexander, Can you please address the reviews and turn this patch into a GitHub PR, please? -- nosy: +CuriousLearner ___ Python tracker

[issue37398] contextlib.ContextDecorator decorating async functions

2019-08-09 Thread Nick Coghlan
Nick Coghlan added the comment: I wouldn't be OK with magic switching in the behaviour of ContextDecorator (that's not only semantically confusing, it's also going to make the contextlib function wrappers even slower than they already are). I'm also entirely unclear on what you would expect

[issue12128] Allow an abc.abstractproperty to be overridden by an instance data attribute

2019-08-09 Thread Sanyam Khurana
Sanyam Khurana added the comment: I was trying to search the mailing list archives for the URL posted by Eric: http://mail.python.org/pipermail/python-list/2011-May/1272604.html But I couldn't find it. Also that URL shows 404. Eric, is it possible for you to post the correct link?

[issue37752] Redundant Py_CHARMASK called in some files

2019-08-09 Thread hai shi
hai shi added the comment: typo error: delte->delete -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37752] Redundant Py_CHARMASK called in some files

2019-08-09 Thread hai shi
hai shi added the comment: Due to this macro documented in https://docs.python.org/3.9/c-api/intro.html#c.Py_CHARMASK and we don't know how much user use this marco, I don't think we need delte this function(deleting operation should be careful). --

[issue37636] Deprecate slicing and ordering operations on sys.version

2019-08-09 Thread Nick Coghlan
Nick Coghlan added the comment: Regarding the "Would releasing 4.0 instead avoid problems?" Anthony actually did that experiment, too: it broke third party projects even more impressively than the 3.10 build did. I think Serhiy's point is fairly compelling though - check whether or not

[issue26131] Raise ImportWarning when loader.load_module() is used

2019-08-09 Thread Brett Cannon
Brett Cannon added the comment: If you look at https://github.com/python/cpython/blob/master/Lib/importlib/_bootstrap.py and https://github.com/python/cpython/blob/master/Lib/importlib/_bootstrap_external.py you will notice a bunch of comments near all the calls to load_module(). Those are

[issue37801] Compilation on MINGW64 fails (CODESET,wcstok,...)

2019-08-09 Thread Steve Dower
Steve Dower added the comment: Guessing it needs an extra header file that is implicitly included in the Windows headers? -- ___ Python tracker ___

[issue37804] Remove Thread.isAlive

2019-08-09 Thread Dong-hee Na
Change by Dong-hee Na : -- components: +Library (Lib) title: Remove isAlive -> Remove Thread.isAlive ___ Python tracker ___ ___

[issue37804] Remove isAlive

2019-08-09 Thread Dong-hee Na
New submission from Dong-hee Na : As we discussed https://bugs.python.org/issue35283. Now is the time to remove Thread.isAlive. If it is okay, I 'd like to work on this issue. -- messages: 349293 nosy: asvetlov, corona10, vstinner priority: normal severity: normal status: open title:

[issue34155] email.utils.parseaddr mistakenly parse an email

2019-08-09 Thread Ned Deily
Ned Deily added the comment: New changeset 13a19139b5e76175bc95294d54afc9425e4f36c9 by Ned Deily (Miss Islington (bot)) in branch '3.6': bpo-34155: Dont parse domains containing @ (GH-13079) (GH-14826) https://github.com/python/cpython/commit/13a19139b5e76175bc95294d54afc9425e4f36c9

[issue21161] list comprehensions don't see local variables in pdb in python3

2019-08-09 Thread daniel hahler
Change by daniel hahler : -- pull_requests: +14926 pull_request: https://github.com/python/cpython/pull/15194 ___ Python tracker ___

[issue37803] "python -m pdb --help" does not work

2019-08-09 Thread daniel hahler
Change by daniel hahler : -- keywords: +patch pull_requests: +14925 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15193 ___ Python tracker ___

[issue37803] "python -m pdb --help" does not work

2019-08-09 Thread daniel hahler
New submission from daniel hahler : The long options passed to `getopt.getopt` should not include the leading dashes: % python -m pdb --help Traceback (most recent call last): File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main "__main__", mod_spec)

[issue37642] timezone allows no offset from range (23:59, 24:00)

2019-08-09 Thread Paul Ganssle
Paul Ganssle added the comment: New changeset 92c7e30adf5c81a54d6e5e555a6bdfaa60157a0d by Paul Ganssle (Ngalim Siregar) in branch 'master': bpo-37642: Update acceptable offsets in timezone (GH-14878) https://github.com/python/cpython/commit/92c7e30adf5c81a54d6e5e555a6bdfaa60157a0d

[issue36714] Tweak doctest 'example' regex to allow a leading ellipsis in 'want' line

2019-08-09 Thread Paul Moore
Paul Moore added the comment: It shouldn't be hard to update the regex to accept either "... " followed by other text or "..." on a line on its own, surely? -- nosy: +paul.moore ___ Python tracker

[issue37752] Redundant Py_CHARMASK called in some files

2019-08-09 Thread Jordon.X
Jordon.X <9651...@qq.com> added the comment: Hi Ma, I think this is a very valuable suggestion. And if we want to delete the definition of Py_CHARMASK, maybe another issue needed. I am not very sure about the considerations of this macro definition. And whether there are any side

[issue26131] Raise ImportWarning when loader.load_module() is used

2019-08-09 Thread Joannah Nanjekye
Joannah Nanjekye added the comment: Feel free to open a PR. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue37802] micro-optimization of PyLong_FromSize_t()

2019-08-09 Thread Sergey Fedoseev
Change by Sergey Fedoseev : -- keywords: +patch pull_requests: +14924 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15192 ___ Python tracker ___

[issue26131] Raise ImportWarning when loader.load_module() is used

2019-08-09 Thread Michael Anckaert
Michael Anckaert added the comment: Clarification: the imp module shows a DeprecationWarning when imported. Was this what was meant? -- ___ Python tracker ___

[issue37802] micro-optimization of PyLong_FromSize_t()

2019-08-09 Thread Sergey Fedoseev
New submission from Sergey Fedoseev : Currently PyLong_FromSize_t() uses PyLong_FromLong() for values < PyLong_BASE. It's suboptimal because PyLong_FromLong() needs to handle the sign. Removing PyLong_FromLong() call and handling small ints directly in PyLong_FromSize_t() makes it faster: $

[issue26131] Raise ImportWarning when loader.load_module() is used

2019-08-09 Thread Michael Anckaert
Michael Anckaert added the comment: I checked out the source (Lib/imp.py:219) and only see the docstring marking this method als Deprecated. No exceptions are being raised. I would like to work on this issue. -- nosy: +michaelanckaert ___ Python

[issue37788] fix for bpo-36402 (threading._shutdown() race condition) causes reference leak

2019-08-09 Thread Kubilay Kocak
Change by Kubilay Kocak : -- nosy: +koobs ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37801] Compilation on MINGW64 fails (CODESET,wcstok,...)

2019-08-09 Thread Emmanuel Arias
Change by Emmanuel Arias : -- nosy: +eamanu ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37801] Compilation on MINGW64 fails (CODESET,wcstok,...)

2019-08-09 Thread Vadim Engelson
Vadim Engelson added the comment: (code from Python-3.8.0b3, but Python-3.7.2 had similar issues) -- ___ Python tracker ___ ___

[issue37801] Compilation on MINGW64 fails (CODESET,wcstok,...)

2019-08-09 Thread Vadim Engelson
New submission from Vadim Engelson : Compilation on MINGW64 fails (CODESET,wcstok,...) I am using the latest MINGW64 (http://repo.msys2.org/distrib/x86_64/msys2-x86_64-20190524.exe) Versions: Python-3.7.2, Python-3.8.0b3 $ gcc -v Using built-in specs. COLLECT_GCC=C:\msys64\mingw64\bin\gcc.exe

[issue36402] threading._shutdown() race condition: test_threading test_threads_join_2() fails randomly

2019-08-09 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Please note that this fix appears to be the cause of #37788 -- nosy: +kristjan.jonsson ___ Python tracker ___

[issue37800] Clean up the documentation on module attributes

2019-08-09 Thread Géry
Change by Géry : -- assignee: docs@python components: Documentation nosy: docs@python, eric.snow, maggyero priority: normal pull_requests: 14923 severity: normal status: open title: Clean up the documentation on module attributes type: enhancement versions: Python 3.7

[issue37799] Renaming Doc/reference/ to Doc/language/

2019-08-09 Thread Géry
New submission from Géry : The page https://docs.python.org/3/ lists these two parts: - Library Reference - Language Reference So both parts are "references". However in the cpython GitHub repository, the Doc/ directory contains these two directories: - library/ - reference/ So to be

[issue37799] Renaming Doc/reference/ to Doc/language/

2019-08-09 Thread Géry
Change by Géry : -- type: -> enhancement ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34155] email.utils.parseaddr mistakenly parse an email

2019-08-09 Thread miss-islington
miss-islington added the comment: New changeset 217077440a6938a0b428f67cfef6e053c4f8673c by Miss Islington (bot) in branch '3.8': bpo-34155: Dont parse domains containing @ (GH-13079) https://github.com/python/cpython/commit/217077440a6938a0b428f67cfef6e053c4f8673c --

[issue34155] email.utils.parseaddr mistakenly parse an email

2019-08-09 Thread miss-islington
miss-islington added the comment: New changeset c48d606adcef395e59fd555496c42203b01dd3e8 by Miss Islington (bot) in branch '3.7': bpo-34155: Dont parse domains containing @ (GH-13079) https://github.com/python/cpython/commit/c48d606adcef395e59fd555496c42203b01dd3e8 --

[issue35181] Doc: Namespace Packages: Inconsistent documentation of __loader__ being None

2019-08-09 Thread Géry
Change by Géry : -- pull_requests: +14922 pull_request: https://github.com/python/cpython/pull/15190 ___ Python tracker ___ ___

[issue37764] email.Message.as_string infinite loop

2019-08-09 Thread Abhilash Raj
Change by Abhilash Raj : -- versions: +Python 3.8 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37764] email.Message.as_string infinite loop

2019-08-09 Thread Abhilash Raj
Abhilash Raj added the comment: This does look like a side-effect of the commit mentioned by mytran. The issues seems to be that email._header_value_parser.get_unstructured wrongfully assumes that anything leading with '=?' would be a valid rfc 2047 encoded word. This is a smaller test

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

2019-08-09 Thread Bernhard Hiller
Bernhard Hiller added the comment: Please find enclosed a screen shot of the command line, when the same script is run there. If you want to perform the tests yourself in order to get more information about the type of those characters, you may simply run the script mentioned in my first

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

2019-08-09 Thread Srinivas Nyayapati
Srinivas Nyayapati added the comment: When I try to put the skipUnless decorator on CryptTestCase, I am still seeing a failure when I try to run this. The error is - File "C:\Users\srao\projects\cpython\lib\test\test_crypt.py", line 59, in CryptTestCase