[issue35041] urllib.parse.quote safe Parameter Not Optional

2018-10-21 Thread william.ayd
william.ayd added the comment: What if we instead just raised for anything that isn't a string or a byte? The docstring for quote suggests that it should only accept str or byte objects for safe, though it doesn't enforce that:

[issue35041] urllib.parse.quote safe Parameter Not Optional

2018-10-21 Thread Ammar Askar
Ammar Askar added the comment: I agree that urllib.parse.quote("/", safe=['/']) should probably work. It looks like the reason it doesn't is because quote tries to normalize the safe iterable to ASCII characters only. As part of this it attempts to run `< 128` on each element of safe. As

[issue35041] urllib.parse.quote safe Parameter Not Optional

2018-10-21 Thread william.ayd
william.ayd added the comment: Hmm well I still personally feel that the implementation is somewhat off mores than the documentation. Specifically I think it is confusing that it accepts an empty iterable but not one containing elements. This is fine: urllib.parse.quote("/", safe=[])

[issue35041] urllib.parse.quote safe Parameter Not Optional

2018-10-21 Thread Ammar Askar
Ammar Askar added the comment: Does rewording that prior part to "safe parameter specifies an iterable of additional ASCII characters" make it less confusing? -- ___ Python tracker

[issue19217] Calling assertEquals for moderately long list takes too long

2018-10-21 Thread Srinivas Reddy Thatiparthy
Change by Srinivas Reddy Thatiparthy : -- pull_requests: +9372 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue35041] urllib.parse.quote safe Parameter Not Optional

2018-10-21 Thread Ammar Askar
Ammar Askar added the comment: I would say so since the documentation says: safe parameter specifies additional ASCII characters None isn't really a set of ASCII characters but the empty string and empty list are. -- ___ Python tracker

[issue35040] functools.lru_cache does not work with coroutines

2018-10-21 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +xtreak ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35041] urllib.parse.quote safe Parameter Not Optional

2018-10-21 Thread william.ayd
william.ayd added the comment: Semantics aside is it still the intended behavior that these calls should work: urllib.parse.quote("/", safe='') AND urllib.parse.quote("/", safe=[]) But that this should raise? urllib.parse.quote("/", safe=None) IMO seems counterintuitive --

[issue35041] urllib.parse.quote safe Parameter Not Optional

2018-10-21 Thread Ammar Askar
Ammar Askar added the comment: The documentation also goes on to say that its default value is '/'. It is optional in the sense that the function can be called without providing it. It doesn't mean that `None` is somehow a valid type for it. Consider the open function for example:

[issue35041] urllib.parse.quote safe Parameter Not Optional

2018-10-21 Thread william.ayd
New submission from william.ayd : The safe parameter in urllib.parse.quote is documented as optional. However, the following will raise TypeError: 'NoneType' object is not iterable: urllib.parse.quote("/", safe=None) whereas explicitly providing an iterable will allow the function to

[issue35040] functools.lru_cache does not work with coroutines

2018-10-21 Thread Liran Nuna
New submission from Liran Nuna : lru_cache is a very useful method but it does not work well with coroutines since they can only be executed once. Take for example, the attached code (test-case.py) - It will throw a RuntimeError because you cannot reuse an already awaited coroutine. A

[issue33899] Tokenize module does not mirror "end-of-input" is newline behavior

2018-10-21 Thread Ned Deily
Ned Deily added the comment: Apparently this change also affected IPython. Perhaps we should add an entry to the whatsnew documents for 3.7.1 and 3.7.6: https://docs.python.org/3/whatsnew/3.7.html#notable-changes-in-python-3-7-1

[issue33899] Tokenize module does not mirror "end-of-input" is newline behavior

2018-10-21 Thread Anthony Sottile
Anthony Sottile added the comment: I'm surprised this was classified as a bug! Though that's subjective so I get that it's difficult to decide what is and what isn't ¯\(ツ)/¯ -- ___ Python tracker

[issue35033] Column or row spanning cells are not implemented.

2018-10-21 Thread Julien Palard
Julien Palard added the comment: Started implementing a POC sphinx-side so we may not have to "fix" our doc: https://github.com/JulienPalard/sphinx/tree/text-colspan-rowspan -- ___ Python tracker

[issue34963] String representation for types created with typing.NewType(…) are opaque and unappealing

2018-10-21 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: OK, so now we have two "competing" PRs. I think I like Serhiy's PR a bit more, since it is simpler. I would propose to look at benchmarks and then decide. Are there any other factors I am missing for choosing one or other approach? --

[issue35039] remove unused vars in Lib/turtledemo module

2018-10-21 Thread Srinivas Reddy Thatiparthy
Change by Srinivas Reddy Thatiparthy : -- keywords: +patch pull_requests: +9371 stage: -> patch review ___ Python tracker ___ ___

[issue35039] remove unused vars in Lib/turtledemo module

2018-10-21 Thread Srinivas Reddy Thatiparthy
Change by Srinivas Reddy Thatiparthy : -- components: Library (Lib) nosy: thatiparthy priority: normal severity: normal status: open title: remove unused vars in Lib/turtledemo module versions: Python 3.8 ___ Python tracker

Re: UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 10442: character maps to

2018-10-21 Thread Marko Rauhamaa
pjmcle...@gmail.com: > not sure why utf-8 gives an error when thats the most wide all caracters > inclusive right?/ Not all sequences of bytes are legal in UTF-8. For example, >>> b'\x80'.decode("utf-8") Traceback (most recent call last): File "", line 1, in UnicodeDecodeError:

Re: UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 10442: character maps to

2018-10-21 Thread pjmclenon
On Saturday, October 20, 2018 at 1:23:50 PM UTC-4, Terry Reedy wrote: > On 10/20/2018 8:24 AM, pjmcle...@gmail.com wrote: > > On Saturday, October 13, 2018 at 7:24:14 PM UTC-4, MRAB wrote: > > > i have a sort of decode error > > UnicodeDecodeError; 'utf-8' can't decode byte 0xb0 in position

[issue34282] Enum._convert shadows members named _convert

2018-10-21 Thread orlnub123
Change by orlnub123 : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue35027] distutils.core.setup does not raise TypeError when if classifiers, keywords and platforms fields are not specified as a list

2018-10-21 Thread Tilman Krummeck
Tilman Krummeck added the comment: I've submitted the PR just now: https://github.com/python/cpython/pull/10032. The CLA is signed but most probably not processed yet. -- ___ Python tracker

[issue35027] distutils.core.setup does not raise TypeError when if classifiers, keywords and platforms fields are not specified as a list

2018-10-21 Thread Tilman Krummeck
Change by Tilman Krummeck : -- keywords: +patch pull_requests: +9370 stage: -> patch review ___ Python tracker ___ ___

[issue33899] Tokenize module does not mirror "end-of-input" is newline behavior

2018-10-21 Thread Tal Einat
Tal Einat added the comment: This was backported since it was considered a bug, but you are right that it broke backwards compatibility, and perhaps shouldn't have been backported. Still, with 3.6.6 and 3.7.1 now released, that ship has sailed. We could perhaps revert this on the 2.7

[issue34271] Please support logging of SSL master secret by env variable SSLKEYLOGFILE

2018-10-21 Thread Johannes Frank
Johannes Frank added the comment: Hello Christian, much appreciated. Thank you so much. Johannes -- ___ Python tracker ___ ___

[issue33899] Tokenize module does not mirror "end-of-input" is newline behavior

2018-10-21 Thread Anthony Sottile
Anthony Sottile added the comment: This change in behaviour is breaking pycodestyle: https://github.com/PyCQA/pycodestyle/issues/786 Perhaps it shouldn't have been backported (especially all the way to python2.7?) -- nosy: +Anthony Sottile ___

[issue34271] Please support logging of SSL master secret by env variable SSLKEYLOGFILE

2018-10-21 Thread Christian Heimes
Christian Heimes added the comment: Nathaniel, I created a PR with keylog and message callback patch. The message callback is really useful to investigate handshake and trace messages like close alert. I decided against making the key log feature a callback and rather make it a filename

[issue34271] Please support logging of SSL master secret by env variable SSLKEYLOGFILE

2018-10-21 Thread Christian Heimes
Change by Christian Heimes : -- keywords: +patch pull_requests: +9369 stage: needs patch -> patch review ___ Python tracker ___ ___

[issue29843] errors raised by ctypes.Array for invalid _length_ attribute

2018-10-21 Thread Tal Einat
Change by Tal Einat : -- pull_requests: +9368 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35038] AttributeError: 'frame' object has no attribute 'f_restricted'

2018-10-21 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- stage: -> needs patch versions: +Python 3.7, Python 3.8 ___ Python tracker ___ ___

[issue35038] AttributeError: 'frame' object has no attribute 'f_restricted'

2018-10-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is an issue with the documentation. -- keywords: +easy nosy: +serhiy.storchaka ___ Python tracker ___

Re: PEP 394

2018-10-21 Thread eryk sun
On 10/20/18, Terry Reedy wrote: > > On Windows, there is a better solution: the py launcher. > > py # launches the most most recent version installed* > > py -x # launches the most recent x.y > > py -x.y # launches x.y if installed, else lists installed versions > > * At first, 2.x took

[issue35038] AttributeError: 'frame' object has no attribute 'f_restricted'

2018-10-21 Thread Adrien
New submission from Adrien : In the documentation (https://docs.python.org/3/library/inspect.html#types-and-members), the attribute `f_restricted` is listed as a member of `frame` objects. However, while trying to access it or even when calling `help()`, the object does not seem to have

[issue29843] errors raised by ctypes.Array for invalid _length_ attribute

2018-10-21 Thread Tal Einat
Tal Einat added the comment: Should this be back-ported to 3.7 and 3.6? 2.7? -- nosy: +taleinat ___ Python tracker ___ ___

[issue34081] Sphinx duplicate label warning in docs

2018-10-21 Thread Julien Palard
Change by Julien Palard : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue34081] Sphinx duplicate label warning in docs

2018-10-21 Thread Julien Palard
Julien Palard added the comment: New changeset 121eb1694cab14df857ba6abe9839654cada15cf by Julien Palard (Xtreak) in branch 'master': bpo-34081: Fix wrong example link that was linking to distutils (GH-8248) https://github.com/python/cpython/commit/121eb1694cab14df857ba6abe9839654cada15cf

[issue29743] Closing transport during handshake process leaks open socket

2018-10-21 Thread Tal Einat
Change by Tal Einat : -- pull_requests: +9367 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34876] Python3.8 changes how decorators are traced

2018-10-21 Thread Ned Batchelder
Ned Batchelder added the comment: Thanks, the fix looks good to me. I made a comparison of some decorator tracing to check it out: https://gist.github.com/nedbat/d603a34136299f0c0b8e442fccadeb7d TBH, the first time I tried it, something seemed wrong, but I can't see it now, so ¯\_(ツ)_/¯

[issue34973] Crash in bytes constructor with mutating list

2018-10-21 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue35036] logger failure in suspicious.py

2018-10-21 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Thanks @xtreak for the catch and PR! -- ___ Python tracker ___ ___ Python-bugs-list

[issue35036] logger failure in suspicious.py

2018-10-21 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue35036] logger failure in suspicious.py

2018-10-21 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset c3f52a59ce8406d9e59253ad4621e4749abdaeef by Pablo Galindo (Xtreak) in branch 'master': bpo-35036: Remove empty log line in the suspicious.py tool (GH-10024)

[issue34973] Crash in bytes constructor with mutating list

2018-10-21 Thread miss-islington
miss-islington added the comment: New changeset 8bb037167cf3204a7d620ba11fbf43d2a9ec36e6 by Miss Islington (bot) in branch '3.6': bpo-34973: Fix crash in bytes constructor. (GH-9841) https://github.com/python/cpython/commit/8bb037167cf3204a7d620ba11fbf43d2a9ec36e6 --

[issue34973] Crash in bytes constructor with mutating list

2018-10-21 Thread miss-islington
miss-islington added the comment: New changeset 7f34d550231e047c88a1817b58bda03a33817490 by Miss Islington (bot) in branch '3.7': bpo-34973: Fix crash in bytes constructor. (GH-9841) https://github.com/python/cpython/commit/7f34d550231e047c88a1817b58bda03a33817490 -- nosy:

[issue34984] Improve error messages in bytes and bytearray constructors

2018-10-21 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue34984] Improve error messages in bytes and bytearray constructors

2018-10-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 2c2044e789875ea736ec42e216fdbe61816fbe28 by Serhiy Storchaka in branch 'master': bpo-34984: Improve error messages for bytes and bytearray constructors. (GH-9874)

[issue34973] Crash in bytes constructor with mutating list

2018-10-21 Thread miss-islington
Change by miss-islington : -- pull_requests: +9366 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34973] Crash in bytes constructor with mutating list

2018-10-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 914f9a078f997e58cfcfabcbb30fafdd1f277bef by Serhiy Storchaka in branch 'master': bpo-34973: Fix crash in bytes constructor. (GH-9841) https://github.com/python/cpython/commit/914f9a078f997e58cfcfabcbb30fafdd1f277bef --

[issue34973] Crash in bytes constructor with mutating list

2018-10-21 Thread miss-islington
Change by miss-islington : -- pull_requests: +9365 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34973] Crash in bytes constructor with mutating list

2018-10-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Xiang and Alexandre. I'll merge PR 9841. -- ___ Python tracker ___ ___

[issue35037] PYLONG_BITS_IN_DIGIT differs between MinGW and MSVC

2018-10-21 Thread Steve Dower
Steve Dower added the comment: That variable should be inferred somewhere, either in PC/pyconfig.h or pyport.h. If there's a way to also infer it on 64-bit MinGW then we would consider a patch for that. -- ___ Python tracker

[issue34794] Memory leak in Tkinter

2018-10-21 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- title: memory leak in TkApp:_createbytearray -> Memory leak in Tkinter ___ Python tracker ___ ___

[issue34794] memory leak in TkApp:_createbytearray

2018-10-21 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +9364 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34794] memory leak in TkApp:_createbytearray

2018-10-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a simpler reproducer. Actually the problem was not in _createbytearray(), but in converting the Python wrapper around Tcl_Obj into Tcl_Obj. _createbytearray() just exposed it. The leak exists in Python 3 too, but it is hard to reproduce it.

Re: UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 10442: character maps to

2018-10-21 Thread pjmclenon
On Thursday, January 29, 2009 at 11:24:46 AM UTC-5, Anjanesh Lekshminarayanan wrote: > Im reading a file. But there seems to be some encoding error. > > >>> f = open(filename) > >>> data = f.read() > Traceback (most recent call last): > File "", line 1, in > data = f.read() > File

[issue35037] PYLONG_BITS_IN_DIGIT differs between MinGW and MSVC

2018-10-21 Thread Stefan Behnel
Stefan Behnel added the comment: > There's PyLong_GetInfo ... Thanks, I understand that this information can be found at runtime. However, in order to correctly compile C code against a given CPython runtime, there needs to be a guarantee that extension module builds use the same

[issue35037] PYLONG_BITS_IN_DIGIT differs between MinGW and MSVC

2018-10-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: At runtime this information is available as sys.int_info.bits_per_digit. > In MinGW, "SIZEOF_VOID_P" is 4, whereas "sizeof(void*)" resolves to 8. Looks like a misconfiguration. I suppose this will cause more issues than just wrong PYLONG_BITS_IN_DIGIT.

[issue35037] PYLONG_BITS_IN_DIGIT differs between MinGW and MSVC

2018-10-21 Thread Mark Dickinson
Mark Dickinson added the comment: > Is there a reason why CPython cannot store its compile time value for the > PYLONG_BITS_IN_DIGIT setting somewhere? There's PyLong_GetInfo [1], and at Python level, the corresponding sys.long_info (Python 2) / sys.int_info (Python 3). Does that help?

[issue35037] PYLONG_BITS_IN_DIGIT differs between MinGW and MSVC

2018-10-21 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: +mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34831] Asyncio Tutorial

2018-10-21 Thread Caleb Hattingh
Caleb Hattingh added the comment: I've added a few ideas for items in the "cookbook" page, which you'll see in the PR. If anyone has suggestions for more or better cookbook entries (recipes?), feel free to mention here or in the PR, I check both places. I expect to get more time to work on

[issue31500] IDLE: Tiny font on HiDPI display

2018-10-21 Thread Tal Einat
Tal Einat added the comment: Just tested on a 13" Retina MacBook Pro (2560x1600), everything looks fine. -- nosy: +taleinat ___ Python tracker ___

[issue34996] Add name to process and thread pool

2018-10-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thanks for posting this. I think this is a good idea, will take a look at the PR later. -- ___ Python tracker ___

[issue35037] PYLONG_BITS_IN_DIGIT differs between MinGW and MSVC

2018-10-21 Thread Stefan Behnel
Stefan Behnel added the comment: Some more information. CPython uses this code snippet to decide on the PyLong digit size: #ifndef PYLONG_BITS_IN_DIGIT #if SIZEOF_VOID_P >= 8 #define PYLONG_BITS_IN_DIGIT 30 #else #define PYLONG_BITS_IN_DIGIT 15 #endif #endif In MinGW, "SIZEOF_VOID_P" is 4,

[issue35037] PYLONG_BITS_IN_DIGIT differs between MinGW and MSVC

2018-10-21 Thread Stefan Behnel
New submission from Stefan Behnel : I see reports from Cython users on Windows-64 that extension modules that use "longintrepr.h" get miscompiled by MinGW. A failing setup looks as follows: Stock 64 bit CPython on Windows, e.g. Python 3.6.3 (v3.6.3:2c5fed8, Oct 3 2017, 18:11:49) [MSC v.1900

[issue35036] logger failure in suspicious.py

2018-10-21 Thread Caleb Hattingh
Change by Caleb Hattingh : -- nosy: +cjrh ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34996] Add name to process and thread pool

2018-10-21 Thread Raz Manor
Raz Manor added the comment: The default name of the threads does not allow differentiation between pool threads and other threads. This problem is more notable when you have several thread pools. Also, since there are some management threads to the pool, and one might want to know which is

[issue35029] Convert SyntaxWarning exception raised at code generation time to a SyntaxError

2018-10-21 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue8525] Display exceptions' subclasses in help()

2018-10-21 Thread Nick Coghlan
Nick Coghlan added the comment: I've merged the version that displays up to 4 builtin subclasses in a flat list when help() is called on a type. Thanks for the patch Sanyam, and for the comments and suggestions everyone else. While I'm closing out this feature request as implemented, if

[issue8525] Display exceptions' subclasses in help()

2018-10-21 Thread Nick Coghlan
Nick Coghlan added the comment: New changeset a323cdcb33c8c856e5668acfb2c67ab5198672c4 by Nick Coghlan (Sanyam Khurana) in branch 'master': bpo-8525: help() on a type now shows builtin subclasses (GH-5066) https://github.com/python/cpython/commit/a323cdcb33c8c856e5668acfb2c67ab5198672c4

[issue34936] tkinter.Spinbox.selection_element() raises TclError

2018-10-21 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue34936] tkinter.Spinbox.selection_element() raises TclError

2018-10-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 427b8c7f7dcdbff21de78b10d9ad05c825480618 by Serhiy Storchaka in branch '2.7': [2.7] bpo-34936: Fix TclError in tkinter.Spinbox.selection_element(). (GH-9760) (GH-9957) (GH-9968)

[issue35029] Convert SyntaxWarning exception raised at code generation time to a SyntaxError

2018-10-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset d31e7730cd5d74efbd7320751dacd51d09cc415d by Serhiy Storchaka in branch 'master': bpo-35029: Replace the SyntaxWarning exception with a SyntaxError. (GH-) https://github.com/python/cpython/commit/d31e7730cd5d74efbd7320751dacd51d09cc415d

[issue35036] logger failure in suspicious.py

2018-10-21 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- keywords: +patch pull_requests: +9363 stage: -> patch review ___ Python tracker ___ ___

[issue35036] logger failure in suspicious.py

2018-10-21 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- assignee: -> xtreak ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35036] logger failure in suspicious.py

2018-10-21 Thread Karthikeyan Singaravelan
New submission from Karthikeyan Singaravelan : There were some recent changes made in ee171a26c11 to fix Sphinx related deprecation warnings. During the change self.info() was changed to self.logger.info() . Logger expects a positional argument that contains the message thus causing failure.

[issue35035] Documentation for email.utils is named email.util.rst

2018-10-21 Thread Zhiming Wang
Change by Zhiming Wang : -- keywords: +patch pull_requests: +9362 stage: -> patch review ___ Python tracker ___ ___

[issue35035] Documentation for email.utils is named email.util.rst

2018-10-21 Thread Zhiming Wang
New submission from Zhiming Wang : Documentation for PSL module email.utils is named email.util.rst. See . This seems to violate the principle of least surprise. (I have a command line tool to open documentation for any PSL module, and I