[issue33262] Deprecate shlex.split(None) to read from stdin.

2018-04-11 Thread Christian Heimes

New submission from Christian Heimes :

The shlex module implements simple tokenize for a shell-like mini language. The 
shlex.split() function splits a string into subcomponents just like a typical 
Unix shell. However function has a surprising feature. When None is passed into 
shlex.split().

Note: Since the split() function instantiates a shlex instance, passing None 
for s will read the string to split from standard input. 

https://docs.python.org/3/library/shlex.html#shlex.split


This is both surprising, unnecessary and potentially dangerous. Reading from 
sys.stdin is a blocking operation. In case an application doesn't account for 
None, shlex.split(value) could lead to a blocked server application. I suggest 
to deprecate and eventually remove this mis-feature.

Credits: David R. MacIver reported the bug on Twitter: 
https://twitter.com/DRMacIver/status/984001867985367040

--
messages: 315189
nosy: christian.heimes
priority: normal
severity: normal
stage: needs patch
status: open
title: Deprecate shlex.split(None) to read from stdin.
type: behavior
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



[issue33257] Race conditions in Tkinter with non-threaded Tcl

2018-04-11 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
nosy: +serhiy.storchaka
versions: +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



[issue33260] Update token.py etc for ASYNC and AWAIT

2018-04-11 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
keywords: +patch
pull_requests: +6143
stage:  -> patch review

___
Python tracker 

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



[issue33261] inspect.isgeneratorfunction fails on hand-created methods

2018-04-11 Thread Jeroen Demeyer

New submission from Jeroen Demeyer :

The inspect functions isgeneratorfunction, iscoroutinefunction, 
isasyncgenfunction can fail on methods that do not have a __code__ attribute:

>>> from types import MethodType
>>> class Callable:
... def __call__(self, *args):
... return args
>>> m = MethodType(Callable(), 42)
>>> m()
(42,)
>>> import inspect
>>> inspect.iscoroutinefunction(m)
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib64/python3.6/inspect.py", line 186, in iscoroutinefunction
object.__code__.co_flags & CO_COROUTINE)
AttributeError: 'Callable' object has no attribute '__code__'

This was discovered while working on PEP 575, but it is really an independent 
issue that should be fixed anyway.

--
components: Library (Lib)
messages: 315187
nosy: jdemeyer
priority: normal
severity: normal
status: open
title: inspect.isgeneratorfunction fails on hand-created methods
type: behavior
versions: 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



[issue33261] inspect.isgeneratorfunction fails on hand-created methods

2018-04-11 Thread Jeroen Demeyer

Change by Jeroen Demeyer :


--
keywords: +patch
pull_requests: +6144
stage:  -> patch review

___
Python tracker 

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



[issue11122] bdist_rpm should use rpmbuild, not rpm

2018-04-11 Thread Charalampos Stratakis

Charalampos Stratakis  added the comment:

I could make a PR out of the patch but I wonder if anyone is actually using 
this functionality. Wearing my Fedora's python maintainer hat, we have a lot of 
tooling around rpm that handles those things, so I don't think there is a valid 
usecase for Fedora at least. Is it useful somehow for other rpm based distros 
or is the resulting rpm's functional enough for some testing at least?

--
nosy: +cstratak

___
Python tracker 

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



[issue20784] 'collections.abc' is no longer defined when collections is imported

2018-04-11 Thread Paweł

Paweł  added the comment:

I had similar issue and it helped when as a workaround I use
'pip install .' as opposed to 'python setup.py develop' in my project.
I hope this will give you a hint.

--
components: +Library (Lib)
nosy: +pawciobiel
versions: +Python 2.7

___
Python tracker 

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



[issue33260] Update token.py etc for ASYNC and AWAIT

2018-04-11 Thread Serhiy Storchaka

New submission from Serhiy Storchaka :

After making 'async' and 'await' proper keywords (issue30406), token.py was not 
regenerated. The proposed patch updates token.py, tokenize.py and the 
documentation.

--
components: Library (Lib)
messages: 315184
nosy: serhiy.storchaka
priority: normal
severity: normal
status: open
title: Update token.py etc for ASYNC and AWAIT
type: behavior
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



[issue33260] Update token.py etc for ASYNC and AWAIT

2018-04-11 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

ASYNC and AWAIT are kept in the lib2to3 grammar.

--

___
Python tracker 

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



[issue33240] shutil.rmtree fails when the inner floder is opened in Explorer on Windows

2018-04-11 Thread Giampaolo Rodola'

Giampaolo Rodola'  added the comment:

> For convenience, a handler that retries unlink() and rmdir() could be 
> distributed with shutil. For ease of use, it could be enabled by default on 
> Windows.

+1 on that. I bumped into this many times over the years as occasional and 
hardly reproducible test failures when cleaning up test files/dirs. 
The tricky part is how to distinguish a legitimate "directory is not empty" 
error though.

--

___
Python tracker 

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



[issue33252] Clarify ResourceWarning documentation

2018-04-11 Thread Nick Coghlan

Nick Coghlan  added the comment:

+1 from me for further ResourceWarning docs improvements - my focus when 
working on PEP 565 was the actual change in how DeprecationWarning was being 
handled, and the other warnings doc improvements were just a necessary 
prerequisite for being able to convey that clearly.

The backport to 3.6 may or may not be worthwhile, depending on how much work it 
proves to be in practice (while those will still be the default online docs for 
the next couple of months, the 3.7 branch will take their place once 3.7.0 is 
officially released).

We wouldn't backport docs changes to 3.4 or 3.5, as both of those branches are 
already in security-fix-only mode.

--

___
Python tracker 

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



[issue31087] asyncio.create_subprocess_* do not honor `encoding`

2018-04-11 Thread Adam

Adam  added the comment:

It occurs both on Python 3.6 and 3.7 RC, so maybe it should be fixed in the 3.7 
release.

--
nosy: +adampl
type:  -> behavior
versions: +Python 3.7
Added file: https://bugs.python.org/file47531/asyncio_encoding_test.py

___
Python tracker 

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



[issue25433] whitespace in strip()/lstrip()/rstrip()

2018-04-11 Thread Oliver Urs Lenz

Oliver Urs Lenz  added the comment:

Slightly tangential, but it would be great if the documentation of lstrip() and 
rstrip() could include an equivalent definition in terms of re.sub(), e.g.:

lstrip(foo) == re.sub(r'(?u)\A\s*', '', foo)
rstrip(foo) == re.sub(r'(?u)\s*\Z', '', foo)

(Or whatever else is correct.)

--
nosy: +oulenz

___
Python tracker 

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



[issue33260] Update token.py etc for ASYNC and AWAIT

2018-04-11 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset d08972fdb92cad6b813d22205752c97ea18df060 by Serhiy Storchaka in 
branch 'master':
bpo-33260: Regenerate token.py after removing ASYNC and AWAIT. (GH-6447)
https://github.com/python/cpython/commit/d08972fdb92cad6b813d22205752c97ea18df060


--

___
Python tracker 

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



[issue33260] Update token.py etc for ASYNC and AWAIT

2018-04-11 Thread miss-islington

Change by miss-islington :


--
pull_requests: +6145

___
Python tracker 

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



[issue11122] bdist_rpm should use rpmbuild, not rpm

2018-04-11 Thread Stanislav P

Stanislav P  added the comment:

i am using this on redhat enterprise  and mac. both running python 3.5
both running latest rpm. if you can make a pr it would great.

--

___
Python tracker 

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



[issue11122] bdist_rpm should use rpmbuild, not rpm

2018-04-11 Thread Charalampos Stratakis

Charalampos Stratakis  added the comment:

The bug exists indeed but I would like to know what is the actual use case here.

--

___
Python tracker 

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



[issue33263] Asyncio server enters an invalid state after a request with SO_LINGER

2018-04-11 Thread Vlad Starostin

New submission from Vlad Starostin :

Long story short, if you have a TCP asyncio-server (implementing 
asyncio.Protocol) that sends something to socket in connection_made callback, 
it will leak fds and won't be able to handle some consequent requests, if you 
will send to it RST right after TCP-handshake.

In my case, these requests are sent by keepalived demon (it makes TCP-checks 
that way), but they can be easily hand-crafted.


Example server:

import asyncio

class EchoServerClientProtocol(asyncio.Protocol):
def connection_made(self, transport):
self.transport = transport
self.transport.write(b'Say something')

def data_received(self, data):
self.transport.write(data)
self.transport.close()

loop = asyncio.get_event_loop()
coro = loop.create_server(EchoServerClientProtocol, '127.0.0.1', )
server = loop.run_until_complete(coro)
loop.run_forever()


Example client:

import socket
import struct
import time

# first request
sock = socket.socket()
l_onoff = 1
l_linger = 0
sock.setsockopt(socket.SOL_SOCKET, socket.SO_LINGER, struct.pack('ii', l_onoff, 
l_linger))
sock.connect(('127.0.0.1', 8022))
sock.close()

time.sleep(1)

# second request
sock = socket.socket()
sock.connect(('127.0.0.1', ))
print('Got', sock.recv(1024))
sock.sendall(b'Hi there')
print('Got', sock.recv(1024))  # <-- Will hang here
sock.close()


Why is this happening?
1. First request
  1.1. _SelectorSocketTransport.__init__ schedules connection_made and 
loop.add_reader.
  1.2. connection_made tries to send data to the socket, it fails, 
_SelectorTransport._fatal_error is called, then _SelectorTransport._force_close 
is called.
  1.3. _SelectorTransport._force_close removes the reader from the loop (there 
is none, it's ok), and schedules closing the socket in 
_SelectorTransport._call_connection_lost.
  1.4. loop.add_reader is called (scheduled on step 1), it calls epoll_ctl, no 
error is returned because the socket isn't closed yet.
  1.5. the socket is closed by _SelectorTransport._call_connection_lost 
(scheduled on step 3). The corresponding entry in _SelectorMapping remains and 
isn't cleaned up.

2. Second request
  2.1. FD from the first request is reused by the OS
  2.2. BaseSelectorEventLoop._add_reader sees that the FD is already in 
BaseSelectorEventLoop._selector, so it calls _selector.modify
  2.3 _BaseSelectorImpl.modify sees that the events mask is the same, so it 
uses a shortcut, changing only the callback, but without calling epoll_ctl. The 
socket won't be polled.

I think the source of the error is in step 1.4, we shouldn't add the reader if 
we are already closing the transport. I've made a simple PR fixing this, but 
maybe there are other options here.

--
components: asyncio
messages: 315196
nosy: asvetlov, drtyrsa, giampaolo.rodola, yselivanov
priority: normal
severity: normal
status: open
title: Asyncio server enters an invalid state after a request with SO_LINGER
type: behavior
versions: 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



[issue1634034] Show "expected" token on syntax error

2018-04-11 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Similar enhancement has been implemented in PyPy just now.

https://morepypy.blogspot.de/2018/04/improving-syntaxerror-in-pypy.html

--
versions: +Python 3.8 -Python 3.4

___
Python tracker 

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



[issue33260] Update token.py etc for ASYNC and AWAIT

2018-04-11 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



[issue1634034] Show "expected" token on syntax error

2018-04-11 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
pull_requests: +6147
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



[issue33260] Update token.py etc for ASYNC and AWAIT

2018-04-11 Thread miss-islington

miss-islington  added the comment:


New changeset 4dc3c8ff14572032e63d9938a12813392bcbe982 by Miss Islington (bot) 
in branch '3.7':
bpo-33260: Regenerate token.py after removing ASYNC and AWAIT. (GH-6447)
https://github.com/python/cpython/commit/4dc3c8ff14572032e63d9938a12813392bcbe982


--
nosy: +miss-islington

___
Python tracker 

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



[issue33263] Asyncio server enters an invalid state after a request with SO_LINGER

2018-04-11 Thread Vlad Starostin

Change by Vlad Starostin :


--
keywords: +patch
pull_requests: +6146
stage:  -> patch review

___
Python tracker 

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



[issue33065] IDLE debugger: problem importing user created module

2018-04-11 Thread om364@

om364@  added the comment:

Traceback (most recent call last):
  File "...\PositionalList.py", line 1, in 
from _DoublyLinkedBase import _DoublyLinkedBase
  File "", line 968, in _find_and_load
  File "", line 148, in __enter__
  File "", line 174, in _get_module_lock
  File "", line 59, in __init__
  File "", line 59, in __init__
  File "...\Python\Python36\lib\bdb.py", line 48, in trace_dispatch
return self.dispatch_line(frame)
  File "...\Python\Python36\lib\bdb.py", line 66, in dispatch_line
self.user_line(frame)
  File "...\Python\Python36\lib\idlelib\debugger.py", line 24, in user_line
self.gui.interaction(message, frame)
AttributeError: '_ModuleLock' object has no attribute 'name'

The file works correctly in PowerShell, but in IDLE debbuger there is a error.

--
nosy: +om364@
type: behavior -> crash
Added file: https://bugs.python.org/file47532/PositionalList.py

___
Python tracker 

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



[issue33264] Remove to-be-deprecated urllib.request.urlretrieve function reference from HOWTO

2018-04-11 Thread Andrés Delfino

New submission from Andrés Delfino :

Documentation says urllib.request.urlretrieve "might become deprecated at some 
point in the future".

IMHO, it's better to provide examples that do not make users rely on API that 
has this label.

I propose the example in the pull request to accomplish exactly the same task 
while not relying on urllib.request.urlretrieve.

--
assignee: docs@python
components: Documentation
messages: 315204
nosy: adelfino, docs@python
priority: normal
severity: normal
status: open
title: Remove to-be-deprecated urllib.request.urlretrieve function reference 
from HOWTO
type: enhancement
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



[issue33264] Remove to-be-deprecated urllib.request.urlretrieve function reference from HOWTO

2018-04-11 Thread Andrés Delfino

Change by Andrés Delfino :


--
keywords: +patch
pull_requests: +6148
stage:  -> patch review

___
Python tracker 

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



[issue31087] asyncio.create_subprocess_* do not honor `encoding`

2018-04-11 Thread Nathaniel Smith

Nathaniel Smith  added the comment:

@adampl: The first step is for someone (possibly you :-)) to write a patch and 
submit it as a PR against the Python master branch. Then once the actual change 
is figured out, we can have the discussion about which releases to backport it 
to.

--

___
Python tracker 

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



[issue32270] subprocess closes redirected fds even if they are in pass_fds

2018-04-11 Thread Alexey Izbyshev

Alexey Izbyshev  added the comment:

An alternative fix is here: 
https://github.com/izbyshev/cpython/commit/b89b52f28490b69142d5c061604b3a3989cec66c

Feel free to use the test if you don't like the approach :)

--

___
Python tracker 

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



[issue11122] bdist_rpm should use rpmbuild, not rpm

2018-04-11 Thread Stanislav P

Stanislav P  added the comment:

the use case is being able to publish python package as rpm using setup.py on 
mac.

--

___
Python tracker 

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



[issue13585] Add contextlib.ExitStack

2018-04-11 Thread Jeroen Demeyer

Jeroen Demeyer  added the comment:

Why this?

_exit_wrapper.__self__ = cm

It seems that you are trying to create something which is exactly like a method 
except that it's not a method. Is there any reason to not use an actual method? 
It would actually simplify the code.

I ask because assigning __self__ might break after PEP 575.

--
nosy: +jdemeyer

___
Python tracker 

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



[issue33264] Remove to-be-deprecated urllib.request.urlretrieve function reference from HOWTO

2018-04-11 Thread Ned Deily

Change by Ned Deily :


--
nosy: +orsenthil

___
Python tracker 

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



[issue33264] Remove to-be-deprecated urllib.request.urlretrieve function reference from HOWTO

2018-04-11 Thread Senthil Kumaran

Senthil Kumaran  added the comment:

Andrés,  your pull request looks good to me. Please go ahead and sign the CLA 
and I can merge this to cpython HEAD. 

Thank you for your contribution.

--

___
Python tracker 

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



[issue33217] x in enum.Flag member is True when x is not a Flag

2018-04-11 Thread Ethan Furman

Ethan Furman  added the comment:


New changeset 3715176557cf87925c8f89b98939c7daf9bf48e2 by Ethan Furman in 
branch '3.7':
[3.7] bpo-33217: deprecate non-Enum lookups in Enums (GH-6392)
https://github.com/python/cpython/commit/3715176557cf87925c8f89b98939c7daf9bf48e2


--

___
Python tracker 

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



[issue33262] Deprecate shlex.split(None) to read from stdin.

2018-04-11 Thread Eric V. Smith

Eric V. Smith  added the comment:

I agree that it should be deprecated. That's crazy behavior.

I'd also recommend that shlex.shlex with instream=None be deprecated, but maybe 
that's too radical. It seems way too easy to accidentally pass in None.

--
nosy: +eric.smith

___
Python tracker 

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



[issue33264] Remove to-be-deprecated urllib.request.urlretrieve function reference from HOWTO

2018-04-11 Thread Andrés Delfino

Andrés Delfino  added the comment:

Hi Senthil! I signed the CLA several days ago. Got the "Python Contributor 
Agreement Form between Python Software Foundation and Andrés Delfino is Signed 
and Filed!" mail on April 1st (perhaps I chose a bad date to fill the request 
;) )

--

___
Python tracker 

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



[issue33065] IDLE debugger: problem importing user created module

2018-04-11 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

We use 'crash' for, on Window, a process stopping either with no explanation or 
a 'Your process has stopped box' from Windows.

In any case, PositionalList.py will not run without _DoublyLinkedBase.py, which 
you did not upload.

The traceback has
  File "...\Python\Python36\lib\bdb.py", line 48, in trace_dispatch
return self.dispatch_line(frame)

Since sometime last summer, that code line is line 51, indicating that you are 
using an old release of 3.6, probably 3.6.2 or earlier.  The current bugfix 
release is 3.6.5.  If possible, upgrade to 3.6.5 and retest.

The traceback does not make much sense to me either.  Neither of the IDLE 
methods userline and interaction obviously access a .name attribute of 
anything.  The '_ModuleLock' object is created by importlib._bootstrap.  
Searching all issues for '_ModuleLock' got 11 hits.  None are obviously about 
import and tracing.

To determine whether the problem has anything to do with IDLE, single-step 
debugging should be repeated with pdb, which is Python's text debugger, and 
also based on bdb.

Brett, can you tell anything from the multiple importlib._bootstrap lines in 
the traceback?

--
nosy: +brett.cannon
type: crash -> behavior

___
Python tracker 

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



[issue33264] Remove to-be-deprecated urllib.request.urlretrieve function reference from HOWTO

2018-04-11 Thread Andrés Delfino

Andrés Delfino  added the comment:

The agreement can be found at: 
https://secure.na1.echosign.com/public/viewAgreement?tsid=CBFCIBAA3AAABLblqZhC0bOfZxqQ_bUGhwUqnYiqqxAj3N7_dOts1qHsH9YdsbakL5qJ6FbSU9NHkecXglBLZ29gXbHeNdUErGzW7QkUs;

--

___
Python tracker 

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



[issue33082] multiprocessing docs bury very important 'callback=' args

2018-04-11 Thread Chad

Change by Chad :


--
pull_requests: +6150

___
Python tracker 

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



[issue13585] Add contextlib.ExitStack

2018-04-11 Thread Jeroen Demeyer

Jeroen Demeyer  added the comment:

Follow-up: https://bugs.python.org/issue33265

--

___
Python tracker 

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



[issue33265] contextlib.ExitStack abuses __self__

2018-04-11 Thread Jeroen Demeyer

New submission from Jeroen Demeyer :

In contextlib, there is code which roughly looks like

def _exit_wrapper(exc_type, exc, tb):
return cm_exit(cm, exc_type, exc, tb)
_exit_wrapper.__self__ = cm

This creates a new function _exit_wrapper from a given function cm_exit by 
prepending the __self__ attribute to *args. Now this is exactly what a method 
does too.

It would be better to use an actual method for this: it's cleaner, faster and 
it doesn't abuse a double-underscore attribute. The latter will actually break 
with PEP 575, as __self__ will become a special name  instead of an arbitrary 
attribute.

--
components: Library (Lib)
messages: 315212
nosy: jdemeyer
priority: normal
severity: normal
status: open
title: contextlib.ExitStack abuses __self__

___
Python tracker 

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



[issue33265] contextlib.ExitStack abuses __self__

2018-04-11 Thread Jeroen Demeyer

Change by Jeroen Demeyer :


--
keywords: +patch
pull_requests: +6151
stage:  -> patch review

___
Python tracker 

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