[issue29396] Re-opening /dev/tty breaks readline

2017-09-07 Thread Silvio Ricardo Cordeiro

Silvio Ricardo Cordeiro added the comment:

So, if I understood correctly, the `readline` module only works for an 
unmodified `sys.stdin`, which is implemented in terms of C `FILE*` structures. 
Anything created by `open` will not be implemented in terms of C `FILE*`, and 
so all history and completion features of  `readline` will be (silently) 
disabled.

Is there any workaround to make `open` (or some other file-opening function) 
return a file object wrapping a C `FILE*`?

Maybe this behavior should be documented in the `readline` documentation? 
(https://docs.python.org/3/library/readline.html)

--

___
Python tracker 

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



[issue31378] Missing documentation for sqlite3.OperationalError

2017-09-07 Thread Leonardo Taglialegne

New submission from Leonardo Taglialegne:

sqlite3.OperationalError has no documentation whatsoever in docs.python.org

--
assignee: docs@python
components: Documentation
messages: 301575
nosy: Leonardo Taglialegne, docs@python
priority: normal
severity: normal
status: open
title: Missing documentation for sqlite3.OperationalError
type: enhancement
versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7

___
Python tracker 

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



[issue31377] remove *_INTERNED opcodes from marshal

2017-09-07 Thread INADA Naoki

INADA Naoki added the comment:

w_ref() depends on refcnt already.
I don't think removing *_INTERN opcode makes PYC reproducible.
https://github.com/python/cpython/blob/1f06a680de465be0c24a78ea3b610053955daa99/Python/marshal.c#L269-L271

I think "intern one string, then share it 10 times" is faster than
"share one string 10 times, then intern each of 10 references".

--
nosy: +inada.naoki

___
Python tracker 

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



[issue31378] Missing documentation for sqlite3.OperationalError

2017-09-07 Thread Berker Peksag

Berker Peksag added the comment:

Thank you for the report. I think we can add a simplified version of the 
OperationalError documentation in PEP 249:

Exception raised for errors that are related to the database's
operation and not necessarily under the control of the programmer,
e.g. an unexpected disconnect occurs, the data source name is not
found, a transaction could not be processed, a memory allocation
error occurred during processing, etc. It must be a subclass of
DatabaseError.

Reference: https://www.python.org/dev/peps/pep-0249/#operationalerror

--
nosy: +berker.peksag
stage:  -> needs patch
versions:  -Python 3.3, Python 3.4, Python 3.5

___
Python tracker 

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



[issue31379] run_profile_task in Makefile should add $(RUNSHARED)

2017-09-07 Thread Xiang Zhang

New submission from Xiang Zhang:

Build Python 2.7 with --enable-shared and pgo could highly possibly skip test 
procedure due to dynamic link fails. I suggest adding $(RUNSHARED) to bring 
convenience. Python 3 already gets it.

--
components: Build
keywords: easy
messages: 301578
nosy: xiang.zhang
priority: normal
severity: normal
stage: needs patch
status: open
title: run_profile_task in Makefile should add $(RUNSHARED)
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



[issue30793] Parsing error on f-string-expressions containing strings with backslash

2017-09-07 Thread Anselm Kiefner

Anselm Kiefner added the comment:

Hey Eric, just a heads up.

In the latest jupyter notebook, this is valid code:

f"{eval('bool(0)\
and True\
')}"

which returns
'False'

I don't know how far you want to go, but if someone REALLY wants to use 
backspace in f-strings just for the sake of it - however ugly it looks like - 
they already can.

--

___
Python tracker 

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



[issue31380] test_undecodable_filename() in Lib/test/test_httpservers.py broken on APFS

2017-09-07 Thread Jack Howarth

New submission from Jack Howarth:

The Python 3.x test suite produces a new regression on macOS 10.13 under the 
new APFS filesystem when executing the test_undecodable_filename() test from 
Lib/test/test_httpservers.py. The error appears as...

==
ERROR: test_undecodable_filename
(test.test_httpservers.SimpleHTTPServerTestCase)
--
Traceback (most recent call last):
  File "/Users/howarth/Python-3.6.2/Lib/test/support/__init__.py",
line 601, in wrapper
return func(*args, **kw)
  File "/Users/howarth/Python-3.6.2/Lib/test/test_httpservers.py",
line 380, in test_undecodable_filename
with open(os.path.join(self.tempdir, filename), 'wb') as f:
OSError: [Errno 92] Illegal byte sequence:
'/var/folders/7g/1x2rsy3j40n1pydq931hzlkmgn/T/tmpomp1r36b/@test_58317_tmp\udce7w\udcf0.txt'

--
Ran 59 tests in 3.207s

See 
https://developer.apple.com/library/content/documentation/FileManagement/Conceptual/APFS_Guide/FAQ/FAQ.html

"""
APFS accepts only valid UTF-8 encoded filenames for creation, and preserves 
both case and normalization of the filename on disk in all variants..

Some differences between how APFS and HFS+ handle filenames include the 
following:
...
• APFS doesn’t allow files to be created with filenames that contain 
unassigned codepoints in the Unicode 9.0 standard, whereas HFS+ does.

--
components: macOS
messages: 301580
nosy: howarthjw, ned.deily, ronaldoussoren
priority: normal
severity: normal
status: open
title: test_undecodable_filename() in Lib/test/test_httpservers.py broken on 
APFS
type: crash
versions: Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7

___
Python tracker 

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



[issue31381] Unable to read the project file "pythoncore.vcxproj".

2017-09-07 Thread Denis Osipov

New submission from Denis Osipov:

Can't load pythoncore.vcxproj in VS2017 after PR 3375 bpo-31358: Pull zlib out 
of the repository #3375.

During pcbuild.sln loading there is error message:

D:\repos\cpython\PCbuild\pythoncore.vcxproj : error  : Unable to read the 
project file "pythoncore.vcxproj".
D:\repos\cpython\PCbuild\pythoncore.vcxproj(70,37): Specified condition 
"$(IncludeExternals)" evaluates to "" instead of a boolean.

--
components: Windows
messages: 301581
nosy: denis-osipov, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Unable to read the project file "pythoncore.vcxproj".
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



[issue31307] ConfigParser.read silently fails if filenames argument is a byte string

2017-09-07 Thread Vincent Michel

Changes by Vincent Michel :


--
pull_requests: +3417

___
Python tracker 

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



[issue29627] configparser.ConfigParser.read() has undocumented/unexpected behaviour when given a bytestring path.

2017-09-07 Thread Vincent Michel

Changes by Vincent Michel :


--
pull_requests: +3418

___
Python tracker 

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



[issue21818] cookielib documentation references Cookie module, not cookielib.Cookie class

2017-09-07 Thread Berker Peksag

Changes by Berker Peksag :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.5, Python 3.6, Python 3.7

___
Python tracker 

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



[issue31382] CGI upload error when file ~< 10kb

2017-09-07 Thread Marc

New submission from Marc:

An error occurs when uploading a file ~<10kb:
A problem occurred in a Python script. Here is the sequence of function calls 
leading up to the error, in the order they occurred.
 /var/www/html/file-uploader/uploader.py in ()
 39 
 40 # A nested FieldStorage instance holds the file
=>   41 fileitem = form['file']
 42 
 43 # Test if the file was uploaded
fileitem undefined, form = FieldStorage(None, None, '')
 /usr/lib/python3.4/cgi.py in __getitem__(self=FieldStorage(None, None, ''), 
key='file')
591 """Dictionary style indexing."""
592 if self.list is None:
=>  593 raise TypeError("not indexable")
594 found = []
595 for item in self.list:
builtin TypeError = 

TypeError: not indexable
  args = ('not indexable',)
  with_traceback =  

but not when file is ~> 10kb

--
components: Extension Modules
messages: 301582
nosy: mschaming
priority: normal
severity: normal
status: open
title: CGI upload error when file ~< 10kb
versions: Python 3.4

___
Python tracker 

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



[issue31345] Backport docstring improvements to the C version of OrderedDict

2017-09-07 Thread Sourav Singh

Sourav Singh added the comment:

I am interested in working on the issue. Where do I need to make the fix?

--
nosy: +Sourav Singh

___
Python tracker 

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



[issue31381] Unable to read the project file "pythoncore.vcxproj".

2017-09-07 Thread Steve Dower

Steve Dower added the comment:

I already have a fix in a pending PR for this. Don't have the number handy, but 
will link it later today.

--
assignee:  -> steve.dower
stage:  -> patch review
type:  -> compile error

___
Python tracker 

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



[issue30403] PEP 547: Running extension modules using -m switch

2017-09-07 Thread Petr Viktorin

Petr Viktorin added the comment:

Again, what is the use case? That's a real question, I'm not saying it to 
dismiss your ideas or points of view. It would be very much easier to think 
about a concrete use case, rather than making a general system for the sake of 
how easy it is implementation-wise. (The implementation might be easier now, 
but it might change, and there's a cost to keeping the generality in mind when 
designing things on top of all this.)

Something like the slot you mention can always be added later if it's needed. 
Is it needed now?


Also, the PyModuleDef should never be modified (beyond the one-time 
initialization that sets ob_type -- that's a workaround for not being always 
able to declare the type statically).
It should be possible to make additional, independent module instances from a 
PyModuleDef.

--

___
Python tracker 

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



[issue27391] server_hostname should only be required when checking host names

2017-09-07 Thread Christian Heimes

Christian Heimes added the comment:

Jim, yes I agree. In a matter of fact, the ssl module also agrees with you and 
behaves like that for a while. I cannot reproduce the problem with either 2.7, 
3.5, or 3.6. I have attached an demo script.


check_hostname = True
* server_hostname='www.python.org' OK
* server_hostname='': Exception: check_hostname requires server_hostname
* no server_hostname: Exception: check_hostname requires server_hostname

check_hostname = False
* server_hostname='www.python.org' OK
* server_hostname='' OK
* no server_hostname OK

--
resolution:  -> works for me
status: open -> pending
versions: +Python 2.7 -Python 3.5
Added file: http://bugs.python.org/file47124/bpo27391.py

___
Python tracker 

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



[issue30403] PEP 547: Running extension modules using -m switch

2017-09-07 Thread Stefan Behnel

Stefan Behnel added the comment:

I was kinda guessing that modifying the slot list wasn't a good idea. ;)

My current use case is that I implement the "create" slot because it makes it 
very easy to intercept the spec and its configuration. It is not passed into 
"exec" as such, but I need it to initialise the module namespace with 
"__file__", "__path__", etc.

There is also still the idea of defining our own module type in Cython in order 
to have a place where we can keep C level module globals, and also to support 
module properties. PEP 549 will not be available in older Python versions, even 
if it gets accepted.

Having to choose between main-exec support and these two features seems wrong.

--

___
Python tracker 

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



[issue31379] run_profile_task in Makefile should add $(RUNSHARED)

2017-09-07 Thread Xiang Zhang

Changes by Xiang Zhang :


--
pull_requests: +3419

___
Python tracker 

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



[issue25292] ssl socket gets into broken state when client exits during handshake

2017-09-07 Thread Christian Heimes

Christian Heimes added the comment:

This looks like a problem in asyncio. When the client closes the writer, the 
TLS and TCP connections are shut down. The server's writer still accept data 
although it is not written to the underlying ssl object:

(Pdb) writer.transport._ssl_protocol._extra['ssl_object'].pending()
0
(Pdb) writer.transport._ssl_protocol._in_shutdown
True
(Pdb) len(writer.transport._ssl_protocol._write_backlog)
2

--
assignee: christian.heimes -> yselivanov
components:  -SSL
versions:  -Python 3.5

___
Python tracker 

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



[issue31381] Unable to read the project file "pythoncore.vcxproj".

2017-09-07 Thread Denis Osipov

Denis Osipov added the comment:

Thank you. Looking forward to it.

--

___
Python tracker 

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



[issue31383] Issue with _posixsubprocess when importing subprocess32

2017-09-07 Thread paullpaulson

New submission from paullpaulson:

I am trying to install subprocess32 with my python 2.7 installation via 
buildroot. It appeared to install correctly but when I import it on the 
embedded system I get an error:

>>> import subprocess32
/usr/lib/python2.7/site-packages/subprocess32.py:472: RuntimeWarning: The 
_posixsubprocess module is not being used. Child process reliability may suffer 
if your pro
gram uses threads.
  "program uses threads.", RuntimeWarning)
Following this path I tried to import _posixsubprocess

import _posixsubprocess
Traceback (most recent call last):
  File "", line 1, in 
ImportError: dynamic module does not define init function (init_posixsubprocess)
subprocess32 seems to have it's own version and it's not working in this case?

I can use subprocess32 otherwise, tested out basic functionality like 
subprocess32.Popen(["ls"]).communicate()

--
components: Cross-Build
messages: 301589
nosy: Alex.Willmer, gregory.p.smith, paulpaulson
priority: normal
severity: normal
status: open
title: Issue with _posixsubprocess when importing subprocess32
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



[issue30403] PEP 547: Running extension modules using -m switch

2017-09-07 Thread Petr Viktorin

Petr Viktorin added the comment:

Alright, that makes sense. Thanks for the feedback!
Please give us some time for an updated proposal/implementation. I'm going on 
vacation, so expect about a week.

--

___
Python tracker 

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



[issue31377] remove *_INTERNED opcodes from marshal

2017-09-07 Thread Benjamin Peterson

Benjamin Peterson added the comment:

On Thu, Sep 7, 2017, at 01:17, INADA Naoki wrote:
> 
> INADA Naoki added the comment:
> 
> w_ref() depends on refcnt already.
> I don't think removing *_INTERN opcode makes PYC reproducible.
> https://github.com/python/cpython/blob/1f06a680de465be0c24a78ea3b610053955daa99/Python/marshal.c#L269-L271

I know—we're going to have to do something about that, too. In practice,
though, the interning behavior seems to be a bigger reproducibility
problem.

> I think "intern one string, then share it 10 times" is faster than
> "share one string 10 times, then intern each of 10 references".

We end up interning each reference individually currently.

--

___
Python tracker 

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



[issue31377] remove *_INTERNED opcodes from marshal

2017-09-07 Thread INADA Naoki

INADA Naoki added the comment:

> We end up interning each reference individually currently.

But interning interned string is much faster. It only checks flag.
Interning normal string requires dict lookup.

--

___
Python tracker 

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



[issue31377] remove *_INTERNED opcodes from marshal

2017-09-07 Thread Benjamin Peterson

Benjamin Peterson added the comment:

On Thu, Sep 7, 2017, at 09:46, INADA Naoki wrote:
> 
> INADA Naoki added the comment:
> 
> > We end up interning each reference individually currently.
> 
> But interning interned string is much faster. It only checks flag.
> Interning normal string requires dict lookup.

We could makes sure the version in the internal marshal memo is interned
if appropriate.

--

___
Python tracker 

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



[issue31370] Remove support for threads-less builds

2017-09-07 Thread STINNER Victor

STINNER Victor added the comment:


New changeset a6a4dc816d68df04a7d592e0b6af8c7ecc4d4344 by Victor Stinner 
(Antoine Pitrou) in branch 'master':
bpo-31370: Remove support for threads-less builds (#3385)
https://github.com/python/cpython/commit/a6a4dc816d68df04a7d592e0b6af8c7ecc4d4344


--

___
Python tracker 

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



[issue31370] Remove support for threads-less builds

2017-09-07 Thread STINNER Victor

STINNER Victor added the comment:

PEP 11 was updated, the change was merged, this issue can now be closed. Thanks 
Antoine!

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



[issue31384] marshal: remove "current_filename" optimization

2017-09-07 Thread Benjamin Peterson

New submission from Benjamin Peterson:

marshal current saves the the last filename it saw in a code object during 
deserialization, and tries to reuse it across multiple code objects to save 
memory. This optimization is superseded by the more general ref mechanism.

--
components: Interpreter Core
messages: 301597
nosy: benjamin.peterson
priority: normal
severity: normal
status: open
title: marshal: remove "current_filename" optimization
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



[issue31384] marshal: remove "current_filename" optimization

2017-09-07 Thread Benjamin Peterson

Changes by Benjamin Peterson :


--
pull_requests: +3420

___
Python tracker 

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



[issue31384] marshal: remove "current_filename" optimization

2017-09-07 Thread Benjamin Peterson

Benjamin Peterson added the comment:


New changeset c988ae01fec2e0510d53728e01a5e4bb06761bda by Benjamin Peterson in 
branch 'master':
remove current_filename optimization from marshal (#3423) (closes bpo-31384)
https://github.com/python/cpython/commit/c988ae01fec2e0510d53728e01a5e4bb06761bda


--
resolution:  -> fixed
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



[issue30860] Consolidate stateful C globals under a single struct.

2017-09-07 Thread Nick Coghlan

Nick Coghlan added the comment:

Regarding the accidental exposure of _Py_CheckRecursionLimit, the main active 
usage of the stable ABI that we're aware of is Riverbank's C/C++ binding 
generator for PyQt: 
http://pyqt.sourceforge.net/Docs/sip4/directives.html#directive-%Module (see 
the use_limited_api option for the linked directive)

I checked with Phil Thomson (sip's maintainer), and the bindings sip generates 
don't use either of the public macros that access this nominally private value.

--

___
Python tracker 

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



[issue31383] Issue with _posixsubprocess when importing subprocess32

2017-09-07 Thread Gregory P. Smith

Gregory P. Smith added the comment:

The standard library in Python 2.7 does not have an associated extension 
module.  _posixsubprocess comes from subprocess32.

There isn't much point in using subprocess32 on POSIX systems without the 
_posixsubprocess extension module.

If that import is failing, something in your build for whatever your embedded 
system is, is not doing the right thing.

as this is subprocess32 only related and not python stdlib subprocess related 
in Python 3 I suggest using the 
https://github.com/google/python-subprocess32/issues tracker.  But I don't have 
enough information to offer much help.

"ImportError: dynamic module does not define init function 
(init_posixsubprocess)" is very suspicious given that it does: 
https://github.com/google/python-subprocess32/blob/master/_posixsubprocess.c#L879

--
assignee:  -> gregory.p.smith
resolution:  -> works for me
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



[issue29988] (async) with blocks and try/finally are not as KeyboardInterrupt-safe as one might like

2017-09-07 Thread Nick Coghlan

Nick Coghlan added the comment:

I think you're agreeing with me - we can make synchronous context managers 
meaningfully more signal safe (at least for CMs implemented in C, or 
precompiled with Cython), but for asynchronous context managers, the only 
meaningful defense available is to replace the default SIGINT handler with one 
that routes the signal to the event loop instead of trying to handle it in the 
interpreter's eval loop.

The latter approach does mean it will be more difficult to interrupt a runaway 
non-cooperative coroutine, but that's going to be a necessary trade-off in 
order to allow the event loop to reliably manage a graceful shutdown in the 
face of KeyboardInterrupt.

--

___
Python tracker 

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



[issue31373] demoting floating float values to unrepresentable types is undefined behavior

2017-09-07 Thread Benjamin Peterson

Benjamin Peterson added the comment:


New changeset a853a8ba7850381d49b284295dd6f0dc491dbe44 by Benjamin Peterson in 
branch 'master':
bpo-31373: fix undefined floating-point demotions (#3396)
https://github.com/python/cpython/commit/a853a8ba7850381d49b284295dd6f0dc491dbe44


--

___
Python tracker 

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



[issue31373] demoting floating float values to unrepresentable types is undefined behavior

2017-09-07 Thread Roundup Robot

Changes by Roundup Robot :


--
pull_requests: +3421

___
Python tracker 

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



[issue30793] Parsing error on f-string-expressions containing strings with backslash

2017-09-07 Thread Eric V. Smith

Eric V. Smith added the comment:

That code is an error in Python 3.6:

>>> f"{eval('bool(0)\
... and True\
... ')}"
  File "", line 3
SyntaxError: f-string expression part cannot include a backslash
>>> 

I'm not sure it's a good idea that jupyter accepts code that's not valid in 
Python itself.

--

___
Python tracker 

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



[issue30793] Parsing error on f-string-expressions containing strings with backslash

2017-09-07 Thread Anselm Kiefner

Anselm Kiefner added the comment:

Heh. I had a hunch it could be jupyter specific, but didn't test it. They had 
problems with f-strings before, it seems they over-fixed those ..
Maybe you want to check their implementation and see if it's any good for a 
general solution?
Otherwise I'd volunteer to submit a bug report for their code ;)

--

___
Python tracker 

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



[issue30096] Update examples in abc documentation to use abc.ABC

2017-09-07 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:


New changeset b0d0217c0e4c1512a06ef306928b2fd8f82d046e by Mariatta (Miss 
Islington (bot)) in branch '3.6':
[3.6] bpo-30096: Use ABC in abc reference examples (GH-1220) (GH-3408)
https://github.com/python/cpython/commit/b0d0217c0e4c1512a06ef306928b2fd8f82d046e


--
nosy: +Mariatta

___
Python tracker 

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



[issue30096] Update examples in abc documentation to use abc.ABC

2017-09-07 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:

Backported to 3.6 by Miss Islington.
Closing this issue.
Thanks.

--
resolution:  -> fixed
stage: backport needed -> 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



[issue31373] demoting floating float values to unrepresentable types is undefined behavior

2017-09-07 Thread Benjamin Peterson

Changes by Benjamin Peterson :


--
resolution:  -> fixed
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



[issue31373] demoting floating float values to unrepresentable types is undefined behavior

2017-09-07 Thread Benjamin Peterson

Benjamin Peterson added the comment:


New changeset b03623227ed1264e3cac4e6bb4878d96b91aa484 by Benjamin Peterson 
(Miss Islington (bot)) in branch '3.6':
[3.6] fixes bpo-31373: fix undefined floating-point demotions (GH-3396) (#3424)
https://github.com/python/cpython/commit/b03623227ed1264e3cac4e6bb4878d96b91aa484


--

___
Python tracker 

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



[issue29766] --with-lto still implied by --enable-optimizations in Python 2.7

2017-09-07 Thread Gregory P. Smith

Gregory P. Smith added the comment:


New changeset abea972d2881a1a04ec265f993bb9b56bbc7b224 by Gregory P. Smith 
(Hanno Schlichting) in branch '2.7':
[2.7] bpo-29766: Fix configure/.ac to match LTO/enable-optimizations behavior. 
(#2705)
https://github.com/python/cpython/commit/abea972d2881a1a04ec265f993bb9b56bbc7b224


--

___
Python tracker 

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



[issue29766] --with-lto still implied by --enable-optimizations in Python 2.7

2017-09-07 Thread Gregory P. Smith

Changes by Gregory P. Smith :


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

___
Python tracker 

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



[issue29988] (async) with blocks and try/finally are not as KeyboardInterrupt-safe as one might like

2017-09-07 Thread Nathaniel Smith

Nathaniel Smith added the comment:

FWIW trio's strategy for handling this is to install a clever signal handle 
that routes the signal to the event loop IF the signal arrives while the event 
loop is running, or while particularly sensitive code like trio.Lock.__aexit__ 
is running. The rest of the time it raises KeyboardInterrupt directly. So we 
actually can have signal safety and deal with runaway coroutines at the same 
time, and this patch does provide a meaningful reduction in race conditions for 
trio [1]. In principle there's nothing stopping asyncio or other coroutine 
runners from implementing a similar strategy.

[1] actually this is currently a lie, because this patch reveals another 
independent race condition: there's no way for my clever signal handler to tell 
that it's in a sensitive function like trio.Lock.__aexit__ if it runs on the 
very first bytecode of the function, before the function has had a chance to 
mark itself as sensitive. But *that's* fixable with something like bpo-12857.

--

___
Python tracker 

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



[issue29988] (async) with blocks and try/finally are not as KeyboardInterrupt-safe as one might like

2017-09-07 Thread Nathaniel Smith

Nathaniel Smith added the comment:

(tl;dr: this patch is more awesome than you realize, thanks for working on it 
:-))

--

___
Python tracker 

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



[issue29988] (async) with blocks and try/finally are not as KeyboardInterrupt-safe as one might like

2017-09-07 Thread Nick Coghlan

Nick Coghlan added the comment:

Attempting to clarify what Greg & I think the right answer will be for the 
async context management case: 
https://docs.python.org/3/library/asyncio-eventloop.html#unix-signals

In practice, that would look something like:

```
>>> loop = asyncio.get_event_loop()
>>> def sigint_handler():
... raise KeyboardInterrupt
... 
>>> loop.add_signal_handler(signal.SIGINT, sigint_handler)
>>> loop.run_forever()
Traceback (most recent call last):
...
KeyboardInterrupt
```

That way, dealing gracefully with KeyboardInterrupt is wholly under the event 
loop's control, rather than the event loop having to fight with the eval loop 
as to how Ctrl-C should be handled.

--

___
Python tracker 

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



[issue30389] distutils._msvccompiler cannot find VS 2017

2017-09-07 Thread Steve Dower

Steve Dower added the comment:


New changeset 05f01d85257d0f3409c7335aaf0bf6a6da7eecb7 by Steve Dower in branch 
'master':
bpo-30389 Adds detection of VS 2017 to distutils._msvccompiler (#1632)
https://github.com/python/cpython/commit/05f01d85257d0f3409c7335aaf0bf6a6da7eecb7


--

___
Python tracker 

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



[issue27629] Cannot create ssl.SSLSocket without existing socket

2017-09-07 Thread Christian Heimes

Christian Heimes added the comment:

How about I make the actual SSLSocket and SSLObject class customizable so you 
can override what is returned by wrap_socket() and wrap_bio()?

class MySSLSocket(ssl.SSLSocket):
pass

ctx = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER)
ctx.sslsocket_class = MySSLSocket
sock = ctx.wrap_socket(socket.socket(), server_side=True)
assert isinstance(sock, MySSLSocket)

--
versions: +Python 3.7 -Python 3.5, Python 3.6

___
Python tracker 

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



[issue31385] `import as` does not work when module has same same as parent module

2017-09-07 Thread David Hagen

New submission from David Hagen:

Consider the following Python project:

bugtest/
  __init__.py (Contents: from .foo import *)
  foo/
__init__.py (Contents: from .foo import *)
foo.py (Contents: )

Then in a Python session, the following line executes without error (as 
expected):

>>> import bugtest.foo.foo

However, the following line gives an error (not as expected):

>>> import bugtest.foo.foo as bar
Traceback (most recent call last):
  File "", line 1, in 
AttributeError: module 'bugtest.foo.foo' has no attribute 'foo'

Note that this behavior is dependent on the folder foo and the file foo.py 
having the same base name. But is not dependent on actually trying to import 
bugtest.foo.foo. Trying to import bugtest.foo.baz will also fail as long as 
bugtest.foo.foo exists.

It is also dependent on the __init__.py files importing something from their 
respective submodules.

--
messages: 301614
nosy: David Hagen
priority: normal
severity: normal
status: open
title: `import as` does not work when module has same same as parent module
type: behavior
versions: Python 3.5, Python 3.6

___
Python tracker 

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



[issue31386] Make return types of wrap_bio and wrap_socket customizable

2017-09-07 Thread Christian Heimes

New submission from Christian Heimes:

SSLSocket.wrap_bio() and SSLSocket.wrap_socket() hard-code SSLObject and 
SSLSocket as return types. In the light of future deprecation of 
ssl.wrap_socket() module function and direct instantiation of SSLSocket, it is 
desirable to make the return type of SSLSocket.wrap_bio() and 
SSLSocket.wrap_socket() customizable.

Also see #27629

--
assignee: christian.heimes
components: SSL
messages: 301615
nosy: christian.heimes
priority: normal
severity: normal
stage: patch review
status: open
title: Make return types of wrap_bio and wrap_socket customizable
type: enhancement
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



[issue31386] Make return types of wrap_bio and wrap_socket customizable

2017-09-07 Thread Christian Heimes

Changes by Christian Heimes :


--
superseder:  -> Cannot create ssl.SSLSocket without existing socket

___
Python tracker 

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



[issue30389] distutils._msvccompiler cannot find VS 2017

2017-09-07 Thread Steve Dower

Changes by Steve Dower :


--
pull_requests: +3422

___
Python tracker 

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



[issue31386] Make return types of wrap_bio and wrap_socket customizable

2017-09-07 Thread Christian Heimes

Changes by Christian Heimes :


--
pull_requests: +3423

___
Python tracker 

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



[issue27629] Cannot create ssl.SSLSocket without existing socket

2017-09-07 Thread Christian Heimes

Christian Heimes added the comment:

I have created #27629 to allow customization of SSLObject and SSLSocket. I'm 
closing this as "won't fix" because I rather want people to move away from 
ssl.wrap_socket() and manual instantiation of SSLSocket.

--
resolution:  -> wont fix
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



[issue15670] PEP 3121, 384 Refactoring applied to ssl module

2017-09-07 Thread Christian Heimes

Christian Heimes added the comment:

Is anybody interested to port Robin's patch to 3.7?

--
assignee: christian.heimes -> 
keywords: +easy (C)

___
Python tracker 

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



[issue30681] email.utils.parsedate_to_datetime() should return None when date cannot be parsed

2017-09-07 Thread Barry A. Warsaw

Barry A. Warsaw added the comment:

So, while we do have a conflict between consistency and utility, I think 
@r.david.murry 's last comment has convinced me that raising the exception is 
more helpful.  I think we should do that, fixing the documentation and giving 
up on the consistency issue.

--

___
Python tracker 

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



[issue31387] asyncio should make it easy to enable cooperative SIGINT handling

2017-09-07 Thread Nick Coghlan

New submission from Nick Coghlan:

Issue 29988 covers the fact that with the default SIGINT handler installed, a 
poorly timed Ctrl-C can lead to context managers failing to even start running 
their __(a)exit__ methods, let alone complete them.

For the asynchronous case, the problem is even worse, as the *event loop* may 
be interrupted at arbitrary points if the default SIGINT handler is left in 
place.

To handle this robustly, it's desirable to make it easy to switch event-driven 
programs over to cooperative Ctrl-C handling by installing an asyncio SIGINT 
handler while the event loop is running, rather than leaving the default SIGINT 
handler in place.

(Note: while installing a cooperative SIGINT handler will enable more robust 
event-loop managed resource cleanup, it will have the downside that Ctrl-C 
won't be able to interrupt a coroutine that has incorrectly blocked the main 
thread)

--
components: Library (Lib)
messages: 301619
nosy: giampaolo.rodola, gregory.p.smith, haypo, ncoghlan, njs, yselivanov
priority: normal
severity: normal
stage: needs patch
status: open
title: asyncio should make it easy to enable cooperative SIGINT handling
type: behavior
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



[issue29988] with statements are not ensuring that __exit__ is called if __enter__ succeeds

2017-09-07 Thread Nick Coghlan

Nick Coghlan added the comment:

I've retitled this issue to specifically cover the synchronous signal-safe 
context management case and filed issue 31387 to cover making it easy to switch 
asyncio over to cooperative SIGINT handling (rather than the default 
pre-emptive handling).

--
title: (async) with blocks and try/finally are not as KeyboardInterrupt-safe as 
one might like -> with statements are not ensuring that __exit__ is called if 
__enter__ succeeds

___
Python tracker 

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



[issue31270] Simplify documentation of itertools.zip_longest

2017-09-07 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
pull_requests: +3424

___
Python tracker 

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



[issue31385] `import as` does not work when module has same same as parent module

2017-09-07 Thread R. David Murray

R. David Murray added the comment:

It seems likely that this is related to the problems discussed (and hopefully 
solved) in issue 30024.

--
nosy: +r.david.murray

___
Python tracker 

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



[issue31388] Provide a way to defer SIGINT handling in the current thread

2017-09-07 Thread Nick Coghlan

New submission from Nick Coghlan:

As discussed in issue 29988, it's currently difficult to write completely 
robust cleanup code in Python, as the default SIGINT handler may lead to 
KeyboardInterrupt being raised as soon as *any* Python code starts executing in 
the main thread, even when that Python code is part of:

- a finally block
- an __exit__ method
- a __del__ method
- a weakref callback
- a trace hook
- a profile hook
- a pending call callback

Issue 29988 proposes a way to adjust with statements to ensure that __exit__ at 
least starts executing if __enter__ returned successfully, but that's only 
sufficient to ensure robust resource cleanup if the __exit__ method is 
implemented in C and never calls back in to any operation that starts executing 
Python code.

Currently, the "best" option for ensuring cleanup code isn't interrupted is to 
outright ignore SIGINT while the cleanup code is running:

old_handler = signal.getsignal(signal.SIGINT)
signal.signal(signal.SIGINT, signal.SIG_IGN)
try:
... # Cleanup code
finally:
signal.signal(signal.SIGINT, old_handler)

Fortunately, most folks aren't willing to do this, but it does suggest a 
potential pattern for temporarily *deferring* SIGINT handling: adding a 
"deferred" attribute to the entries in the array that tracks incoming signals, 
and providing some C level decorators and context managers for manipulating 
that state.

--
components: Interpreter Core
messages: 301622
nosy: gregory.p.smith, ncoghlan, njs
priority: normal
severity: normal
stage: needs patch
status: open
title: Provide a way to defer SIGINT handling in the current thread
type: enhancement
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



[issue31330] argparse.RawTextHelpFormatter does not maintain lines separated by more than one newline

2017-09-07 Thread R. David Murray

R. David Murray added the comment:


New changeset 397c467c49385023de36411194d381ac993bae1a by R. David Murray 
(Elena Oat) in branch 'master':
bpo-31330: Clarify that RawTextHelpFormatter collapses repeated newlines. 
(#3272)
https://github.com/python/cpython/commit/397c467c49385023de36411194d381ac993bae1a


--

___
Python tracker 

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



[issue31330] argparse.RawTextHelpFormatter does not maintain lines separated by more than one newline

2017-09-07 Thread Roundup Robot

Changes by Roundup Robot :


--
pull_requests: +3425

___
Python tracker 

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



[issue31330] argparse.RawTextHelpFormatter does not maintain lines separated by more than one newline

2017-09-07 Thread R. David Murray

R. David Murray added the comment:

Thanks, Elena.

--
resolution:  -> fixed
stage:  -> backport needed

___
Python tracker 

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



[issue31388] Provide a way to defer SIGINT handling in the current thread

2017-09-07 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I think SIGINT handling is the wrong level to do this.  Instead, it should be 
done at the ceval level, at the point where the "eval breaker" flag is examined 
for any interruption request to the normal sequential flow of execution.

--
nosy: +pitrou

___
Python tracker 

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



[issue28588] Memory leak in OpenSSL thread state

2017-09-07 Thread Christian Heimes

Christian Heimes added the comment:

It's rather painful to fix the issue. Since the memory leak only affects users 
that create and destroy a lot of threads and the bug has been addressed by 
OpenSSL 1.1.0, I won't fix it.

If users are running into the issue, they should rather update to more recent 
OpenSSL versions. The 1.1.0 series uses proper thread local storage.

--
resolution:  -> wont fix
stage: test needed -> resolved
status: open -> closed
versions:  -Python 3.5

___
Python tracker 

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



[issue31330] argparse.RawTextHelpFormatter does not maintain lines separated by more than one newline

2017-09-07 Thread Roundup Robot

Changes by Roundup Robot :


--
keywords: +patch
pull_requests: +3426
stage: backport needed -> patch review

___
Python tracker 

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



[issue31388] Provide a way to defer SIGINT handling in the current thread

2017-09-07 Thread Nick Coghlan

Nick Coghlan added the comment:

Yes, it could also be done as a temporary global block on all signal and 
pending call processing, not just on SIGINT specifically.

Either way, I'll also note that this can be a no-op in any thread other than 
the main thread, as those already delegate signal handling to the main thread.

--

___
Python tracker 

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



[issue23749] asyncio missing wrap_socket (starttls)

2017-09-07 Thread Christian Heimes

Christian Heimes added the comment:

I'm removing myself and drop the SSL component. It's really a feature request 
for asyncio.

--
assignee: christian.heimes -> yselivanov
components:  -SSL

___
Python tracker 

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



[issue23588] Errno conflicts in ssl.SSLError

2017-09-07 Thread Christian Heimes

Changes by Christian Heimes :


--
assignee: christian.heimes -> 

___
Python tracker 

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



[issue31294] ZeroMQSocketListener and ZeroMQSocketHandler examples in the Logging Cookbook not working

2017-09-07 Thread Christian Heimes

Christian Heimes added the comment:


New changeset 586c0502b5eb9a39cabe0bc2707a8ff63114265c by Christian Heimes 
(Pablo Galindo) in branch 'master':
bpo-31294: Fix ZeroMQSocketListener and ZeroMQSocketHandler examples (#3229)
https://github.com/python/cpython/commit/586c0502b5eb9a39cabe0bc2707a8ff63114265c


--
nosy: +christian.heimes

___
Python tracker 

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



[issue31294] ZeroMQSocketListener and ZeroMQSocketHandler examples in the Logging Cookbook not working

2017-09-07 Thread Roundup Robot

Changes by Roundup Robot :


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

___
Python tracker 

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



[issue29988] with statements are not ensuring that __exit__ is called if __enter__ succeeds

2017-09-07 Thread Nick Coghlan

Nick Coghlan added the comment:

I've also filed issue 31388 to cover providing APIs to defer signals and 
pending calls when running in the main thread.

--

___
Python tracker 

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



[issue31270] Simplify documentation of itertools.zip_longest

2017-09-07 Thread Raymond Hettinger

Changes by Raymond Hettinger :


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



[issue31387] asyncio should make it easy to enable cooperative SIGINT handling

2017-09-07 Thread Nathaniel Smith

Nathaniel Smith added the comment:

Some prior discussion on the old asyncio tracker:
https://github.com/python/asyncio/pull/305#issuecomment-168714572
https://github.com/python/asyncio/issues/341

--

___
Python tracker 

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



[issue31075] Collections - ChainMap - Documentation example wrong order line

2017-09-07 Thread Raymond Hettinger

Changes by Raymond Hettinger :


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



[issue30389] distutils._msvccompiler cannot find VS 2017

2017-09-07 Thread Steve Dower

Steve Dower added the comment:


New changeset 76006f285a7e146484d9296597d1d0ace778f992 by Steve Dower in branch 
'3.6':
[3.6] bpo-30389 Adds detection of VS 2017 to distutils._msvccompiler GH-1632 
(#3425)
https://github.com/python/cpython/commit/76006f285a7e146484d9296597d1d0ace778f992


--

___
Python tracker 

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



[issue31356] Add context manager to temporarily disable GC

2017-09-07 Thread Nick Coghlan

Nick Coghlan added the comment:

+1 from me for the general idea. As far as where to put it goes, I think the 
`gc` module would be the most appropriate home.

--
assignee: ncoghlan -> 
components: +Library (Lib)
stage:  -> needs patch

___
Python tracker 

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



[issue31385] `import as` does not work when module has same same as parent module

2017-09-07 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

In 3.7 the error is different:

>>> import bugtest.foo.foo as bar
Traceback (most recent call last):
  File "", line 1, in 
ImportError: cannot import name 'foo' from 'bugtest.foo.foo' 
(/home/serhiy/py/cpython/bugtest/foo/foo.py)

The statement "from .foo import *" in bugtest/__init__.py imports name foo from 
the module bugtest.foo and rewrites the attribute foo.

>>> import bugtest
>>> bugtest.foo


This behavior is the same in all supported Python versions.

--
nosy: +brett.cannon, eric.snow, ncoghlan, serhiy.storchaka

___
Python tracker 

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



[issue31270] Simplify documentation of itertools.zip_longest

2017-09-07 Thread Raymond Hettinger

Raymond Hettinger added the comment:


New changeset 3147b0422cbeb98065666ccf95ab6845ac800fd4 by Raymond Hettinger in 
branch 'master':
bpo-31270: Modification of Pr 3200 (#3427)
https://github.com/python/cpython/commit/3147b0422cbeb98065666ccf95ab6845ac800fd4


--

___
Python tracker 

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



[issue31356] Add context manager to temporarily disable GC

2017-09-07 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Note that threads can break this. Even without calling gc.enable() explicitly, 
"with gc_disabled()" in different thread can enable GC inside other "with 
gc_disabled()" block.

--
nosy: +pitrou, serhiy.storchaka

___
Python tracker 

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



[issue31252] Operator.itemgetter documentation should include dictionary keys example

2017-09-07 Thread Raymond Hettinger

Changes by Raymond Hettinger :


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

___
Python tracker 

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



[issue28958] Python should return comperhansive error when SSLContext cannot be created

2017-09-07 Thread Christian Heimes

Changes by Christian Heimes :


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

___
Python tracker 

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



[issue28958] Python should return comperhansive error when SSLContext cannot be created

2017-09-07 Thread Christian Heimes

Changes by Christian Heimes :


--
pull_requests: +3430

___
Python tracker 

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



[issue28958] Python should return comperhansive error when SSLContext cannot be created

2017-09-07 Thread Christian Heimes

Christian Heimes added the comment:


New changeset 17c9ac927b97472dd080174fde709d9234848195 by Christian Heimes in 
branch 'master':
bpo-28958: Improve SSLContext error reporting. (#3414)
https://github.com/python/cpython/commit/17c9ac927b97472dd080174fde709d9234848195


--

___
Python tracker 

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



[issue31330] argparse.RawTextHelpFormatter does not maintain lines separated by more than one newline

2017-09-07 Thread R. David Murray

R. David Murray added the comment:


New changeset 82cae7c5be4175e2173e4d342825b5315a9d612a by R. David Murray (Miss 
Islington (bot)) in branch '2.7':
[2.7] bpo-31330: Clarify that RawTextHelpFormatter collapses repeated newlines. 
(GH-3272) (GH-3428)
https://github.com/python/cpython/commit/82cae7c5be4175e2173e4d342825b5315a9d612a


--

___
Python tracker 

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



[issue27340] bytes-like objects with socket.sendall(), SSL, and http.client

2017-09-07 Thread Christian Heimes

Changes by Christian Heimes :


--
keywords: +patch
pull_requests: +3431
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



[issue27340] bytes-like objects with socket.sendall(), SSL, and http.client

2017-09-07 Thread Christian Heimes

Christian Heimes added the comment:


New changeset 888bbdc192ec4db888a294ef758cf5510442dc9a by Christian Heimes in 
branch 'master':
bpo-27340: Use memoryview in SSLSocket.sendall() (#3384)
https://github.com/python/cpython/commit/888bbdc192ec4db888a294ef758cf5510442dc9a


--
nosy: +christian.heimes

___
Python tracker 

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



[issue31330] argparse.RawTextHelpFormatter does not maintain lines separated by more than one newline

2017-09-07 Thread R. David Murray

R. David Murray added the comment:


New changeset e89b35dd2b87e85978b91e3e2dbdea1fc76d6be4 by R. David Murray (Miss 
Islington (bot)) in branch '3.6':
[3.6] bpo-31330: Clarify that RawTextHelpFormatter collapses repeated newlines. 
(GH-3272) (GH-3429)
https://github.com/python/cpython/commit/e89b35dd2b87e85978b91e3e2dbdea1fc76d6be4


--

___
Python tracker 

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



[issue31294] ZeroMQSocketListener and ZeroMQSocketHandler examples in the Logging Cookbook not working

2017-09-07 Thread Christian Heimes

Christian Heimes added the comment:


New changeset 27ce5a1b1931b670da234c30d24bfbbc93fa24d7 by Christian Heimes 
(Miss Islington (bot)) in branch '3.6':
[3.6] bpo-31294: Fix ZeroMQSocketListener and ZeroMQSocketHandler examples 
(GH-3229) (#3430)
https://github.com/python/cpython/commit/27ce5a1b1931b670da234c30d24bfbbc93fa24d7


--

___
Python tracker 

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



[issue31385] `import as` does not work when module has same same as parent module

2017-09-07 Thread Nick Coghlan

Nick Coghlan added the comment:

As Serhiy notes, this isn't a bug in the import name resolution, it's a 
consequence of the wildcard import in bugtest's __init__.py replacing its own 
"bug.foo" submodule attribute with a reference to "bug.foo.foo".

If the star imports can't be avoided, then a potential workaround is to restore 
"bugtest.foo" from sys.modules:

foo = sys.modules[__name__ + ".foo"]

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



[issue31389] Give pdb.set_trace() an optional `header` keyword argument

2017-09-07 Thread Barry A. Warsaw

New submission from Barry A. Warsaw:

IPython has a neat little feature where the function that enters the debugger 
takes an optional `header` argument.  If given, it is a string that's printed 
to the console just before the debugger is entered.

https://github.com/ipython/ipython/blob/master/IPython/terminal/embed.py#L177
https://mail.python.org/pipermail/python-dev/2017-September/149256.html

I kind of realized this would be nice to have in pdb, and the code is easy so 
here's the tracking issue.

--
assignee: barry
components: Library (Lib)
messages: 301643
nosy: barry
priority: normal
severity: normal
status: open
title: Give pdb.set_trace() an optional `header` keyword argument
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



[issue31356] Add context manager to temporarily disable GC

2017-09-07 Thread Nick Coghlan

Nick Coghlan added the comment:

Yes, this will be in the same category as the standard stream redirection 
context managers - multi-threaded applications either won't be able to use it, 
or else will need to manage access to it somehow.

--

___
Python tracker 

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



[issue22635] subprocess.getstatusoutput changed behavior in 3.4 (maybe 3.3.4?)

2017-09-07 Thread Gregory P. Smith

Changes by Gregory P. Smith :


--
pull_requests: +3432

___
Python tracker 

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



[issue29505] Submit the re, json, & csv modules to oss-fuzz testing

2017-09-07 Thread Devin Jeanpierre

Changes by Devin Jeanpierre :


--
keywords: +patch
pull_requests: +3434
stage: test needed -> patch review

___
Python tracker 

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



[issue28958] Python should return comperhansive error when SSLContext cannot be created

2017-09-07 Thread Roundup Robot

Changes by Roundup Robot :


--
pull_requests: +3433

___
Python tracker 

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



[issue31356] Add context manager to temporarily disable GC

2017-09-07 Thread Gregory P. Smith

Gregory P. Smith added the comment:

I believe Raymond is aware of the thread issue.  We discussed it.

If gc.disable() would return the previous state of the gc instead of None and 
an API to enable based on a passed in bool, both of which are written in C and 
executed with the GIL (or merely another lock protecting changing the gc state 
rather than the GIL) held and this Python would works with multiple threads all 
fighting to control the gc state:

@contextmanager
def gc_disabled():
  previous_enable_state = gc.disable()
  yield
  gc.set_enable(previous_enable_state)

But we don't need to modify gc.disable's return value or add a set_enable() if 
gc_disabled() itself is not implemented in Python.  That's up to the 
implementer.

--

___
Python tracker 

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



[issue31389] Give pdb.set_trace() an optional `header` keyword argument

2017-09-07 Thread Barry A. Warsaw

Barry A. Warsaw added the comment:

And specifically `header` is chosen to match IPython.  Why be different?

--

___
Python tracker 

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



[issue31389] Give pdb.set_trace() an optional `header` keyword argument

2017-09-07 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


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

___
Python tracker 

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



[issue22635] subprocess.getstatusoutput changed behavior in 3.4 (maybe 3.3.4?)

2017-09-07 Thread Roundup Robot

Changes by Roundup Robot :


--
pull_requests: +3436

___
Python tracker 

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



  1   2   >