[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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)
https://github.com/python/cpython/commit/427b8c7f7dcdbff21de78b10d9ad05c825480618


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 anyone's 
interested in pursuing the more sophisticated showtree/getclasstree approach 
that would better show position in the class hierarchy (both parents *and* 
children), feel free to file a new enhancement issue that refers back to this 
one.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 which. It was very helpful for me while 
debugging some memory issues in my project, this is where the idea came from.

The names themselves were my idea, but I welcome any change to them.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 64 bit (AMD64)]

MinGW uses this compile time setup, i.e. 15 bit digits:
PyLong_BASE  0x8000
PyLong_MASK  7FFF
PyLong_SHIFT  15
sizeof(digit)  2
sizeof(sdigit)  2

Whereas CPython reports the following, indicating that it was in fact built 
with 30 bit digits:
sys.getsize(1, 2**14, 2**15, 2**29, 2**30, 2**63, 2**64)  (28, 28, 28, 28, 32, 
36, 36)

I'm not sure if this also applies to Py2.7, but I don't think the PyLong 
implementations differ in this regard.

The compile time PyLong digit size is not remembered by the CPython 
installation and instead determined on the fly by the extension compiler. It 
seems that the MSVC build of the stock CPython packages differs from what MinGW 
decides here. This renders MinGW unusable for code that uses "longintrepr.h", 
which Cython does by default in order to accelerate its unpacking of PyLong 
values.

Is there a reason why CPython cannot store its compile time value for the 
PYLONG_BITS_IN_DIGIT setting somewhere?

--
components: Extension Modules, Windows
messages: 328197
nosy: paul.moore, scoder, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: PYLONG_BITS_IN_DIGIT differs between MinGW and MSVC
type: compile error
versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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, whereas "sizeof(void*)" resolves to 8.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 this next weekend, so it would be great to 
get ideas and reviews in during the week.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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?





[1] 
https://github.com/python/cpython/blob/b2e2025941f6a4fdb716bd141d31acf720353d21/Objects/longobject.c#L5578-L5595

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.

--
nosy: +serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 configuration as 
the CPython build.

> Misconfiguration

I searched some more, and it looks like this was already reported almost ten 
years ago in issue4709.

The work-around there is to pass -DMS_WIN64, which apparently is not defined by 
MinGW but required by the CPython headers.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.

--
versions: +Python 3.6, Python 3.7, Python 3.8
Added file: https://bugs.python.org/file47886/leak_demo2.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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)
https://github.com/python/cpython/commit/2c2044e789875ea736ec42e216fdbe61816fbe28


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: +miss-islington

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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)
https://github.com/python/cpython/commit/c3f52a59ce8406d9e59253ad4621e4749abdaeef


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 ¯\_(ツ)_/¯  :)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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


--
nosy: +mdk

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 such attribute.

Is it a issue with the documentation that has not been updated?

I'm using Python 3.6.3 on Linux.

--
assignee: docs@python
components: Documentation
messages: 328217
nosy: Delgan, docs@python
priority: normal
severity: normal
status: open
title: AttributeError: 'frame' object has no attribute 'f_restricted'
type: enhancement
versions: Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 attribute. In almost all case users want to log to a file anz way. 
It's easier to implement and makes locking simpler, too.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 branch, but I feel that reverting this 
change only on 2.7 would just cause even more confusion.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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

https://docs.python.org/3.6/whatsnew/3.6.html#notable-changes-in-python-3-6-7

--
nosy: +ned.deily

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 solution would be to call `asyncio.ensure_future` on the result of the 
coroutine if detected.

--
components: asyncio
files: test-case.py
messages: 328228
nosy: Liran Nuna, asvetlov, yselivanov
priority: normal
severity: normal
status: open
title: functools.lru_cache does not work with coroutines
versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8
Added file: https://bugs.python.org/file47887/test-case.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 succeed:

urllib.parse.quote("/", safe=[])

--
messages: 328229
nosy: william.ayd
priority: normal
severity: normal
status: open
title: urllib.parse.quote safe Parameter Not Optional
versions: Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: https://docs.python.org/3/library/functions.html#open

The documentation says that, "mode is an optional string that specifies the 
mode in which the file is opened. It defaults to 'r' "

This doesn't mean you can just go off and do `open("file.txt", None)`

--
nosy: +ammar2
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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=[])

Though this isn't:

urllib.parse.quote("/", safe=['/'])

Even though the following two calls are fine (though with different return 
values as expected):

urllib.parse.quote("/", safe='')
urllib.parse.quote("/", safe='/')

It might go against the spirit of duck typing but I find it very nuanced that 
empty iterables are allowed but if non-empty it must be a string. Would it not 
make more sense to raise if a non-String type is passed?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 part of this it does

'/' < 128

and fails.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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:

https://github.com/python/cpython/blob/121eb1694cab14df857ba6abe9839654cada15cf/Lib/urllib/parse.py#L791

Seems like it would be easier to enforce that rather than trying to accept any 
arbitrary iterable.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35040] functools.lru_cache does not work with coroutines

2018-10-21 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

A coroutine detection is a relatively slow check.
I don't think we need to do it in `functools.lru_cache`.

There is a specialized asyncio compatible version: 
https://github.com/aio-libs/async_lru
Please use it.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2018-10-21 Thread Tal Einat


Tal Einat  added the comment:

I'm sorry to have caused this mess, it was bad judgement on my part.

Adding mention in What's is a good idea, Ned, I'll do that.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com