[issue22257] PEP 432: Redesign the interpreter startup sequence

2017-05-23 Thread Eric Snow

Eric Snow added the comment:


New changeset c7ec9985bbdbb2b073f2c37febd18268817da29a by Eric Snow in branch 
'master':
bpo-22257: Private C-API for main interpreter initialization (PEP 432). (#1729)
https://github.com/python/cpython/commit/c7ec9985bbdbb2b073f2c37febd18268817da29a


--

___
Python tracker 

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



[issue30444] Add ability to change "-- more --" text in pager module

2017-05-23 Thread Gautam krishna.R

Gautam krishna.R added the comment:

While i was working on one of my personal project i thought of using pager 
module for piping the output in the terminal, please see the issue:
https://github.com/gautamkrishnar/socli/issues/46

Adding ability to modify "-- more --" (statically specified text will allow us 
to change its value to something like "- Press enter to see more..." or any 
other value...

--

___
Python tracker 

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



[issue30395] deadlocked child process after forking on pystate.c's head_mutex

2017-05-23 Thread Gregory P. Smith

Gregory P. Smith added the comment:

Would PyThread_free_lock (effectively sem_destroy()) work without (additional) 
problems?

--

___
Python tracker 

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



[issue30451] parse windows path error in webbrowser.get() and lead to webbrowser.Error: could not locate runnable browser

2017-05-23 Thread chainly

New submission from chainly:

a bug when platform is not posix, lead to
webbrowser.Error: could not locate runnable browser
see below:
import shlex
shlex.split(r'C:\a\chrome.exe', comments=False, posix=True)
['C:achrome.exe']
shlex.split(r'C:\a\chrome.exe', comments=False, posix=False)
['C:\a\chrome.exe']

--
components: Library (Lib)
messages: 294325
nosy: chainly
priority: normal
pull_requests: 1865
severity: normal
status: open
title: parse windows path error in webbrowser.get() and lead to 
webbrowser.Error: could not locate runnable browser

___
Python tracker 

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



[issue24896] It is undocumented that re.UNICODE and re.LOCALE affect re.IGNORECASE

2017-05-23 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Actually the locale affects case-insensitively matching if use the re.LOCAL 
flag. The set of characters matched by b'[A-Z]' is locale-depending. For 
example in Turkish locale it can include the letters 'İ' and 'ı'. Only 8-bit 
locales are supported, not UTF-8 locales.

In Unicode case-insensitive mode the expression '[A-Z]' matches not only Latin 
uppercase and lowercacase letters A-Z and a-z, but also characters 'İ', 'ı', 
'ſ', and 'K'.

--

___
Python tracker 

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



[issue30438] tarfile would fail to extract tarballs with files under R/O directories

2017-05-23 Thread Catherine Devlin

Catherine Devlin added the comment:

I apologize, I retract my earlier comment - I believe both Yaroslav and I were 
confused about the nature of the problem.  I think it's not related to 
permissions at all, but to adding a file to the tarfile twice.

To see this, use `tarfilero.py` as provided by Yaroslav, but comment out the 
`tar.add('sample/rodir/file')` line (line 16) and run it - everything works 
normally, and the `rodir/file` is present.

It appears that adding the directory to the tarfile also adds the file within 
the directory, and adding the file individually creates a second reference to 
the file.  When expanding, `tarfile` attempts to create the file twice, and the 
second attempt fails because a file by that name already exists.

I still think this is a bug - perhaps re-adding a file already present in a 
tarfile should throw an error, or silently do nothing without adding a second 
reference to the file, or at least the error message when trying to expand a 
file into a path that is blocked by a file already present should give a more 
informative error.  I will look for existing tickets along those lines.

--

___
Python tracker 

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



[issue30438] tarfile would fail to extract tarballs with files under R/O directories

2017-05-23 Thread Catherine Devlin

Changes by Catherine Devlin :


Removed file: http://bugs.python.org/file46890/issue_30438_test.patch

___
Python tracker 

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



[issue30394] smtplib leaves open sockets around if SMTPConnectError is raised in __init__

2017-05-23 Thread Xiang Zhang

Xiang Zhang added the comment:


New changeset 9e98cd0383d9e7f06c0537038a32459bf5efa97a by Xiang Zhang (Joel 
Hillacre) in branch 'master':
bpo-30394: Fix a socket leak in smtplib.SMTP.__init__() (#1700)
https://github.com/python/cpython/commit/9e98cd0383d9e7f06c0537038a32459bf5efa97a


--

___
Python tracker 

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



[issue30407] ipaddress ver. 1.0.14 IPv4Network off by 1

2017-05-23 Thread Xiang Zhang

Xiang Zhang added the comment:

"192.168.0.0" is the network address of "192.168.0.0/23" while "192.168.1.0" 
not. :-)

--

___
Python tracker 

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



[issue30448] test_subprocess creates a core dump on FreeBSD

2017-05-23 Thread STINNER Victor

STINNER Victor added the comment:

I'm surprised that we only detect hard crashes only indirectly through the
creation of core dump files... Some tests might be enhanced to raise an
exception at least if the process was killed by a signal, maybe also if the
exit code is non-zero (depending on the test).

We had a similar but different issue in test_io which created a core dump
on a deliberate crash.

--

___
Python tracker 

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



[issue22257] PEP 432: Redesign the interpreter startup sequence

2017-05-23 Thread Eric Snow

Eric Snow added the comment:


New changeset 1abcf6700b4da6207fe859de40c6c1bada6b4fec by Eric Snow in branch 
'master':
bpo-22257: Private C-API for core runtime initialization (PEP 432). (#1772)
https://github.com/python/cpython/commit/1abcf6700b4da6207fe859de40c6c1bada6b4fec


--

___
Python tracker 

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



[issue30448] test_subprocess creates a core dump on FreeBSD

2017-05-23 Thread Eric Snow

Eric Snow added the comment:

That looks similar to other failures due to an issue fixed in a later PR.  It 
shouldn't be an issue any longer.  I'll double check in the morning.

--

___
Python tracker 

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



[issue30447] test_capi.test_subinterps() fails on ARMv7 Ubuntu 3.x

2017-05-23 Thread STINNER Victor

STINNER Victor added the comment:

Ok thanks of taking care of my little buildbot babies.

--

___
Python tracker 

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



[issue30395] deadlocked child process after forking on pystate.c's head_mutex

2017-05-23 Thread STINNER Victor

STINNER Victor added the comment:

+ head_mutex = NULL;

Shouldn't we free memory here?

--

___
Python tracker 

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



[issue29102] Add an id field to PyInterpreterState.

2017-05-23 Thread STINNER Victor

STINNER Victor added the comment:

Does someone know the PRxxx constant for int64_t?

--

___
Python tracker 

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



[issue30150] raw debug allocators to not return malloc alignment

2017-05-23 Thread STINNER Victor

STINNER Victor added the comment:

Maybe we can use Py_MAX (sizeof (size_t), 8) for SST? If I recall correctly, 
pymalloc uses 8 bytes for the alignement.

Somewhere I read that malloc uses sizeof (double), the largest C type.

Well, what do you suggest Julian? Do you want to write a PR?

--

___
Python tracker 

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



[issue30447] test_capi.test_subinterps() fails on ARMv7 Ubuntu 3.x

2017-05-23 Thread Eric Snow

Eric Snow added the comment:

Yeah, I some extra checks (involving pointers) to that test and some platforms 
don't work as expected.  I'll take a look in the morning.

--

___
Python tracker 

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



[issue29102] Add an id field to PyInterpreterState.

2017-05-23 Thread Eric Snow

Eric Snow added the comment:

Thanks for pointing this out, Serhiy.  I'll take a look in the morning.

--

___
Python tracker 

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



[issue28707] add 'directory' option to the http.server module

2017-05-23 Thread STINNER Victor

STINNER Victor added the comment:

Stéphane Wirtel added the comment:

and of course, sorry for this big delay.

I am not sure why you are saying that. Nobody was actively awaiting on this
feature, we all have busy scedules. It's ok ;-)

--

___
Python tracker 

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



[issue30449] Improve __slots__ datamodel documentation

2017-05-23 Thread Aaron Hall

Aaron Hall added the comment:

I've been working on this section quite a lot, trying to improve the flow of 
content (which in the prior revision is a bit of a mish-mash of information in 
the "Notes on using __slots__ section") - I intend to move some of that 
information into the exposition/introduction.

I have also been reviewing my changes and actively working on it with a 
volunteer at the PyCon sprints, Joshua Goldin. Will submit a pull request soon, 
tonight or tomorrow morning.

--

___
Python tracker 

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



[issue28087] macOS 12 poll syscall returns prematurely

2017-05-23 Thread Ennis Massey

Ennis Massey added the comment:

Well, the tests worked on macOS 10.12.6 beta, although my school network broke 
the urllib tests
Many Thanks,
Ennis Massey
ennisbarad...@gmail.com

--

___
Python tracker 

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



[issue29335] subprocess module does not check WIFSTOPPED on SIGCHLD

2017-05-23 Thread Gregory P. Smith

Gregory P. Smith added the comment:

Fixed applied to subprocess32 in 
https://github.com/google/python-subprocess32/commit/0f1958e982bf44db569470def7281bcafa2a8b0e

--
stage: commit 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



[issue30450] Pull Windows dependencies from GitHub rather than svn.python.org

2017-05-23 Thread Zachary Ware

Changes by Zachary Ware :


--
pull_requests: +1864

___
Python tracker 

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



[issue30450] Pull Windows dependencies from GitHub rather than svn.python.org

2017-05-23 Thread Zachary Ware

New submission from Zachary Ware:

Once we've migrated away from svn.python.org for Windows build dependencies, 
there should be no reason to continue running svn.python.org.

--
components: Build, Extension Modules, Windows
messages: 294307
nosy: paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
stage: patch review
status: open
title: Pull Windows dependencies from GitHub rather than svn.python.org
type: resource usage
versions: Python 2.7, 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



[issue30440] document peephole optimizer effects

2017-05-23 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Thanks Emily.  

This should be probably be a FAQ entry (cpython/Doc/faq) because the peephole 
optimizer is a CPython implementation detail, because we don't normally 
document internal details such as which opcodes are generated or big-oh 
runtimes etc, because isn't really a good place for this elsewhere, and because 
the low level details are frequently changing.

Ideally, the FAQ entry should be brief and focus on the two user visible 
effects. 1) The jump-to-jump optimization can cause a coverage analysis tool to 
mark as uncovered a line that is logically executed but is bypassed because it 
has no effect.  2) Constant folding transfers run-time costs to compile-time 
costs -- this may matter when the expression is expensive to compute or if it 
results in the creation of a large object.

Follow the documentation advice given in the dev guide:
* https://docs.python.org/devguide/documenting.html#affirmative-tone
* https://docs.python.org/devguide/documenting.html#economy-of-expression
* https://docs.python.org/devguide/documenting.html#audience

The key part of the first link is to keep it upbeat, focusing on what the tool 
does, the related costs and benefits, and giving recommendations on how to 
control it.  We don't want the docs to read as a litany of warnings and 
suggestions of danger.

In particular, I recommend discussing the OP's compute_largest_known_prime() 
example and explaining:
1) the intended calculation is expensive in terms of both space and time 
2) the constant folding step of code generation does this computation at 
compile-time
3) since this computation is slow, it noticeably slows down the compilation 
(appears to hang at compile-time rather than at run-time as it normally would)
4) since this computation creates a large object, the pyc file will be large
5) due to pre-computation, the run-time call will be fast
6) if that effect is not desired, it is easily turned-off by storing part of 
the expression in a variable:
>>> def compute_largest_known_prime():
... exp = 74207281
... return 2 ** exp - 1

The key part of the second link is to be brief and terse.  It would be easy to 
write an entire blog post or chapter in a book about constant folding, but that 
wouldn't be efficient with the reader's time or really help them out in a 
meaningful way.

The key part of the third link is address what you think is helpful to new 
readers of the FAQ who don't already understand the issue.  We don't make doc 
entries to appease or vindicate someone.  The docs aren't a vehicle for 
expressing opposition to design decision; instead, it is a place to explain 
what the tools do and how to use them.

Try not to over-specify the implementation.  Note that constant folding takes 
place but don't guarantee specific transformations.  These are all subject to 
change, have changed over time (including backports), and changing even now.

--
assignee: docs@python -> emilyemorehouse

___
Python tracker 

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



[issue30449] Improve __slots__ datamodel documentation

2017-05-23 Thread Aaron Hall

New submission from Aaron Hall:

The __slots__ documentation in the datamodel needs improvement.

For example:

> When inheriting from a class without __slots__, the __dict__ attribute of 
> that class will always be accessible, so a __slots__ definition in the 
> subclass is meaningless.

The __slots__ definition for such a subclass is not meaningless: other slots 
declared will still be used, and the __dict__ will not be instantiated unless 
it is looked for (although this may be an implementation detail).

> The action of a __slots__ declaration is limited to the class where it is 
> defined. As a result, subclasses will have a __dict__ unless they also define 
> __slots__ (which must only contain names of any additional slots).

That's not quite right either. The action of a __slots__ declaration is not 
entirely limited to the class where it is defined. They can have implications 
for multiple inheritance, and child classes will have access to those slots.

I have some changes I'd like to make to the entire section on __slots__, and 
I'll be providing a pull request soon.

--
assignee: docs@python
components: Documentation
messages: 294305
nosy: Aaron Hall, docs@python
priority: normal
severity: normal
status: open
title: Improve __slots__ datamodel documentation
versions: Python 2.7, 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



[issue28087] macOS 12 poll syscall returns prematurely

2017-05-23 Thread Ennis Massey

Ennis Massey added the comment:

Actually, having managed to get macOS to update, it seems to be odd, as it 
correctly delays. Not sure what’s going on there, or whether it’s my setup. 
I’ll look into it some more. I’m also thinking of writing/finding a set of 
tests for core POSIX stuff like this, so we can avoid Apple screwing stuff up 
like they have.
Many Thanks,
Ennis Massey
ennisbarad...@gmail.com

--

___
Python tracker 

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



[issue24896] It is undocumented that re.UNICODE and re.LOCALE affect re.IGNORECASE

2017-05-23 Thread Brian Ward

Changes by Brian Ward :


--
pull_requests: +1863

___
Python tracker 

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



[issue24896] It is undocumented that re.UNICODE and re.LOCALE affect re.IGNORECASE

2017-05-23 Thread Roundup Robot

Changes by Roundup Robot :


--
pull_requests: +1862

___
Python tracker 

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



[issue30448] test_subprocess creates a core dump on FreeBSD

2017-05-23 Thread STINNER Victor

New submission from STINNER Victor:

Eric Snow: do you think that it could be related to your recent subinterpreter 
changes please?

http://buildbot.python.org/all/builders/AMD64%20FreeBSD%20CURRENT%20Debug%203.x/builds/311/steps/test/logs/stdio

0:08:26 load avg: 3.35 [253/405] test_subprocess failed (env changed) (98 sec) 
-- running: test_io (30 sec)

Warning -- files was modified by test_subprocess
  Before: []
  After:  ['python.core']

--
components: Tests
messages: 294303
nosy: eric.snow, haypo
priority: normal
severity: normal
status: open
title: test_subprocess creates a core dump on FreeBSD
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



[issue30447] test_capi.test_subinterps() fails on ARMv7 Ubuntu 3.x

2017-05-23 Thread STINNER Victor

New submission from STINNER Victor:

http://buildbot.python.org/all/builders/ARMv7%20Ubuntu%203.x/builds/786/steps/test/logs/stdio

==
FAIL: test_subinterps (test.test_capi.EmbeddingTests)
--
Traceback (most recent call last):
  File 
"/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/test/test_capi.py",
 line 471, in test_subinterps
self.assertNotEqual(interp.interp, main.interp)
AssertionError: '0x0' == '0x0'

--
components: Tests
messages: 294302
nosy: eric.snow, haypo
priority: normal
severity: normal
status: open
title: test_capi.test_subinterps() fails on ARMv7 Ubuntu 3.x
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



[issue30437] SSL_shutdown can return meaningless SSL_ERROR_SYSCALL

2017-05-23 Thread Nathaniel Smith

Nathaniel Smith added the comment:

Debian testing, x86-64, with:

Python 3.5.3rc1 (default, Jan  3 2017, 04:40:57) 
[GCC 6.3.0 20161229] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import ssl
>>> ssl.OPENSSL_VERSION
'OpenSSL 1.1.0e  16 Feb 2017'

--

___
Python tracker 

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



[issue29340] SSL destructor segfaults in python3.6 threads when an unverified-cert connection is closed

2017-05-23 Thread Christian Heimes

Christian Heimes added the comment:

It's a bug in OpenSSL. There isn't much we can do about it. I'm closing the 
issue as 3rd party issue.

--
resolution:  -> third party
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



[issue30437] SSL_shutdown can return meaningless SSL_ERROR_SYSCALL

2017-05-23 Thread Christian Heimes

Christian Heimes added the comment:

Which OS and OpenSSL version are you on?

--

___
Python tracker 

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



[issue30290] IDLE: add tests for help_about.py

2017-05-23 Thread Terry J. Reedy

Terry J. Reedy added the comment:

At first glance, 1714 looks great.  I hope to merge it tomorrow.

On the issues you raised:
1. I want to leave existing constants alone for now.
2. There are two 'create widgets' styles: create, place, create, place, ...; 
and create, create, ..., place, place, ... .  Both have their logic, both are 
used in IDLE.  The first makes sure that everything created gets placed.  The 
second makes it easier to arrange things in relation to each other and to 
rearrange.  I naively started with the first, but it seems that most experts 
advocate the second.
3.  If the dialog were left alone, three helper functions could be a sensible 
refactoring.

However, a alternate design could have links with standard blue tagging instead 
of buttons.  For example, the current About Firefox box has these 8 links: 
'What's new', 'Mozilla', 'a global community', 'Make a donation', 'get 
involved', 'Licensing Information, 'End-User Rights', and 'Privacy Policy'.  
This would make code much shorter and the result would not have the issues 
above.

--

___
Python tracker 

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



[issue30446] Embedded 3.6.1 distribution cannot find _socket module

2017-05-23 Thread Thomas Stevenson

New submission from Thomas Stevenson:

Trying to import the socket module using the embedded distribution for 3.6.1, I 
get the error: : No module named '_socket'

Running with the standard interpreter works:

Python 3.6.1 (v3.6.1:69c0db5, Mar 21 2017, 17:54:52) [MSC v.1900 32 bit (Intel)]
 on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from socket import *
>>>

via an embedded C++ call, however, : No module 
named '_socket' is the error returned.

--
components: Windows
messages: 294297
nosy: paul.moore, steve.dower, tim.golden, tomje...@me.com, zach.ware
priority: normal
severity: normal
status: open
title: Embedded 3.6.1 distribution cannot find _socket module
type: behavior
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



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

2017-05-23 Thread Nathaniel Smith

Nathaniel Smith added the comment:

Right, fixing this bug alone can't make programs control-C safe in general. But 
there exist techniques to make __enter__/__exit__ methods safe WRT control-C, 
and if we fix this bug *and* apply those techniques then you can get some 
meaningful guarantees.

For example, threading.Lock's __enter__ and __exit__ methods are written in C, 
so they are guaranteed to happen atomically WRT to control-C. Right now, it's 
possible for a 'with lock: ...' to raise KeyboardInterrupt with the lock still 
held, which is surprising and not what we would like. If this bug were fixed, 
then it would be guaranteed that the lock was always released.

(And I originally discovered this while implementing control-C handling in 
trio, which is pure-Python but also has a way to protect 
__(a)enter__/__(a)exit__ methods against control-C. ...though that won't be 
100% reliable until bpo-12857 or similar is fixed. See 
https://vorpus.org/blog/control-c-handling-in-python-and-trio/ for exhaustive 
details.)

--

___
Python tracker 

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



[issue12857] Expose called function on frame object

2017-05-23 Thread Nathaniel Smith

Nathaniel Smith added the comment:

I'd also like to make use of this in trio, as a way to get safer and less 
complicated control-C handling without having to implement things in C. 
(Exhaustive discussion: 
https://vorpus.org/blog/control-c-handling-in-python-and-trio/)

@Nick: I understand your proposal is to add a field on the frame that for 
regular function calls points to the function object, and for 
generator/coroutines points to the generator/coroutine object. Is that right? 
Two possible concerns there: (a) this creates a reference cycle, because 
generator/coroutine objects own a reference to the frame object, (b) AFAICT you 
also currently can't get from a generator/coroutine object back to the function 
object, so this would break some (all?) of the use cases for this. I guess the 
solution to (a) is to make it a weak reference, and for (b) either keep f_func 
as always pointing to the function and make f_generator a separate field, or 
else make it f_origin and also add gi_func/co_func fields to 
generator/coroutine objects. (Which might be useful in any case.)

Also, I'm not quite following the proposed use case. When a generator/coroutine 
is resumed, then send() steps through the whole yield stack and reconstructs 
the frame stack so it matches the generator/coroutine stack. (throw() currently 
doesn't do this, but that's a bug that breaks profilers/debuggers/etc - 
bpo-29590 - so we should fix it anyway, and I think Yury is planning to do that 
soon.) So if you get a frame from sys._getframe() or similar, then the stack is 
correct. And if a coroutine/generator isn't running, then the only way to get 
to the frame is by starting with the coroutine/generator object, so we don't 
really need a way to get back.

Tracebacks are a different case again because they continue to hold frame 
references after the stack is unwound, but generally the traceback already has 
the correct stack because the exception propagates up the coroutine/generator 
stack, and also aren't the {gi,co}_frame references cleared as the exception 
propagates anyway?

--
nosy: +njs

___
Python tracker 

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



[issue29334] ssl.SSLObject method getpeercert() is buggy, do_handshake() is strange

2017-05-23 Thread Christian Heimes

Changes by Christian Heimes :


--
pull_requests: +1861

___
Python tracker 

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



[issue30444] Add ability to change "-- more --" text in pager module

2017-05-23 Thread Steven D'Aprano

Steven D'Aprano added the comment:

Can you please explain why you need to change the --more-- text in the pager?

I haven't been able to find any way to change the "--more--" prompt in the 
shell commands `less` and `more`, and remember that the pager will under some 
circumstances use one of those.

--
nosy: +steven.daprano
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



[issue29334] ssl.SSLObject method getpeercert() is buggy, do_handshake() is strange

2017-05-23 Thread Christian Heimes

Changes by Christian Heimes :


--
pull_requests: +1860

___
Python tracker 

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



[issue9146] Segfault in hashlib in OpenSSL FIPS mode using non-FIPS-compliant hashes, if "ssl" imported before "hashlib"

2017-05-23 Thread Gregory P. Smith

Changes by Gregory P. Smith :


--
pull_requests: +1859

___
Python tracker 

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



[issue28707] add 'directory' option to the http.server module

2017-05-23 Thread Stéphane Wirtel

Stéphane Wirtel added the comment:

and of course, sorry for this big delay.

--

___
Python tracker 

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



[issue28707] add 'directory' option to the http.server module

2017-05-23 Thread Stéphane Wirtel

Stéphane Wirtel added the comment:

Victor,

I have added the documentation, but for the unit test, there is already a test 
with the SimpleHTTPRequestHandler class where they specify the cwd attribute, 
because the code of mdk does not change the behavior, I think it's not needed 
to write a test.

now, if you think we need a test for this specific case (in fact we only 
override the constructor of the class and specify the directory parameter), I 
can write a test, but check the code before.

Thank you.

--

___
Python tracker 

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



[issue29334] ssl.SSLObject method getpeercert() is buggy, do_handshake() is strange

2017-05-23 Thread Christian Heimes

Christian Heimes added the comment:


New changeset 66dc33b6822be93f85d84d24d3f9159ff568fbbb by Christian Heimes in 
branch 'master':
bpo-29334: Fix ssl.getpeercert for auto-handshake (#1769)
https://github.com/python/cpython/commit/66dc33b6822be93f85d84d24d3f9159ff568fbbb


--

___
Python tracker 

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



[issue30444] Add ability to change "-- more --" text in pager module

2017-05-23 Thread Gautam krishna.R

Changes by Gautam krishna.R :


--
pull_requests: +1857

___
Python tracker 

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



[issue28707] add 'directory' option to the http.server module

2017-05-23 Thread Stéphane Wirtel

Changes by Stéphane Wirtel :


--
pull_requests: +1856

___
Python tracker 

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



[issue30445] test_traceback fails in coverage run

2017-05-23 Thread Zachary Ware

Changes by Zachary Ware :


--
nosy: +zach.ware
stage:  -> patch review
title: test_traceback fails when run early -> test_traceback fails in coverage 
run

___
Python tracker 

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



[issue30445] test_traceback fails when run early

2017-05-23 Thread Maria Mckinley

Changes by Maria Mckinley :


--
pull_requests: +1855

___
Python tracker 

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



[issue30445] test_traceback fails when run early

2017-05-23 Thread Maria Mckinley

Changes by Maria Mckinley :


--
components: Tests
nosy: maria
priority: normal
severity: normal
status: open
title: test_traceback fails when run early
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



[issue30444] Add ability to change "-- more --" text in pager module

2017-05-23 Thread Gautam krishna.R

New submission from Gautam krishna.R:

Need ability to change the text

--
components: +Library (Lib)
title: Add ability to change "-- more -- -> Add ability to change "-- more --" 
text in pager module
type:  -> enhancement

___
Python tracker 

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



[issue30444] Add ability to change "-- more --

2017-05-23 Thread Gautam krishna.R

Changes by Gautam krishna.R :


--
nosy: Gautam krishna.R
priority: normal
severity: normal
status: open
title: Add ability to change "-- more --

___
Python tracker 

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



[issue28567] Bus error / segmentation fault on macOS debug build when using ctypes OpenGL

2017-05-23 Thread Ned Deily

Ned Deily added the comment:

Sorry that this issue has languished for so long.  Unfortunately, since it is 
so easy to cause segfaults when using ctypes and there are so many variables in 
play here and that there haven't been other similar reports, it is highly 
unlikely that anyone is going to spend time trying to reproduce and then 
analyze this issue further.  If you are still seeing problems and can further 
isolate or simplify the test case, feel feee to re-open this issue.  If you 
haven't already, you might also want to check with the project providing the 
OpenGL bindings.  Good luck!

--
resolution:  -> third party
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



[issue25612] nested try..excepts don't work correctly for generators

2017-05-23 Thread Roundup Robot

Changes by Roundup Robot :


--
pull_requests: +1854

___
Python tracker 

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



[issue22257] PEP 432: Redesign the interpreter startup sequence

2017-05-23 Thread Eric Snow

Changes by Eric Snow :


--
pull_requests: +1853

___
Python tracker 

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



[issue22257] PEP 432: Redesign the interpreter startup sequence

2017-05-23 Thread Eric Snow

Eric Snow added the comment:

reverting the change to that test:  https://github.com/python/cpython/pull/1770

--

___
Python tracker 

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



[issue22257] PEP 432: Redesign the interpreter startup sequence

2017-05-23 Thread Eric Snow

Changes by Eric Snow :


--
pull_requests: +1852

___
Python tracker 

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



[issue13897] Move fields relevant to sys.exc_info out of frame into generator/threadstate

2017-05-23 Thread Mark Shannon

Mark Shannon added the comment:

This issue is rather old, so I will create a new GitHub PR for the code change. 
This issue can be closed.

Note that https://bugs.python.org/issue25612 is a manifestation of the problem 
that this was intended to solve.

--
nosy: +Mark Shannon

___
Python tracker 

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



[issue30443] datetime.datetime.__add__ does not respect fold.

2017-05-23 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

The current behavior is intentional.  Please see PEP 495 for details.

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



[issue24896] It is undocumented that re.UNICODE and re.LOCALE affect re.IGNORECASE

2017-05-23 Thread Brian Ward

Changes by Brian Ward :


--
nosy: +Brian Ward

___
Python tracker 

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



[issue30443] datetime.datetime.__add__ does not respect fold.

2017-05-23 Thread Michael R. Shannon

New submission from Michael R. Shannon:

datetime.datetime.__add__ is currently implemented by converting the date into 
a datetime.timedelta object (using toordinal) before adding it to the other 
(timedelta) object and reconstructing with datetime.combine.  With this method, 
fold will always be set to 0.

There are two cases that will produce an incorrect result (assuming positive 
timedelta for examples).

1. fold=0 and the timedelta is large enough to push the time into or past a 
fold.  Either fold will be 0 and not 1 as it should or the time will be too far 
ahead by the size of the fold.

2. fold=1 and the timedelta is small enough to leave the time in the fold but 
fold will be set to 0.  This results in the time being too far behind by the 
size of the fold.

A possible fix is to convert to UTC before adding the timedelta and call 
self._tzinfo.fromutc() on the result.

--
components: Library (Lib)
messages: 294285
nosy: belopolsky, mrshannon
priority: normal
severity: normal
status: open
title: datetime.datetime.__add__ does not respect fold.
type: behavior
versions: 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



[issue30394] smtplib leaves open sockets around if SMTPConnectError is raised in __init__

2017-05-23 Thread R. David Murray

R. David Murray added the comment:

Duh.  (Smacks self on forehead).

Nevermind.

I'll approve the patch as is, since I can't see any good way to test it.

(I suppose that we could factor the __init__ method contents out into something 
we could test, but I'm not going to push for that kind of refactoring for this 
simple change.  It probably comes down to connect being called in init being a 
design bug :)

--

___
Python tracker 

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



[issue30273] The coverage job is broken: distutils build_ext fails on None

2017-05-23 Thread STINNER Victor

STINNER Victor added the comment:

Can someone please check if the job pass on all branches? If yes, please
close the issue.

--

___
Python tracker 

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



[issue25532] infinite loop when running inspect.unwrap over unittest.mock.call

2017-05-23 Thread Yury Selivanov

Yury Selivanov added the comment:

> I'd be fine with replacing the sys.getrecursionlimit() call with a module 
> level constant like "_UNWRAP_LIMIT = 500".

TBH I'm OK either way.

`sys.getrecursionlimit()` is 1000 (at least on my machine), which might be a 
bit too much for this specific use-case.

It's also unlikely that someone will set recursion limit to less than 100 (or 
too many things would break), so we are probably safe here.

So I'm +0.5 on using _UNWRAP_LIMIT; if you feel the same way too we should do 
that, otherwise let's leave it as is.

--

___
Python tracker 

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



[issue30436] importlib.find_spec raises AttributeError/ModuleNotFoundError when parent is not a package/module

2017-05-23 Thread tkhyn

tkhyn added the comment:

Ok, thanks for the reply. Actually the thing that bothered me was the 
AttributeError exception. I would probably not have opened a ticket should 
find_spec have raised a ModuleNotFoundError (in line with import_module).

Would you consider catching the AttributeError (which means detecting if 
parent_name relates to a package) to raise a ModuleNotFoundError instead more 
appropriate?

--

___
Python tracker 

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



[issue29334] ssl.SSLObject method getpeercert() is buggy, do_handshake() is strange

2017-05-23 Thread Christian Heimes

Changes by Christian Heimes :


--
pull_requests: +1851

___
Python tracker 

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



[issue30436] importlib.find_spec raises AttributeError/ModuleNotFoundError when parent is not a package/module

2017-05-23 Thread Brett Cannon

Brett Cannon added the comment:

The key thing to think about is do you think find_spec("parent.module") is 
working with a single thing called "parent.module" or is it working with two 
separate things of "parent" and "module" which happens to be contained on 
"parent"? If you take the former view then you get the current semantics, but 
if you view it as the latter then you get the semantics you're suggesting, 
tkhyn.

My inclination is for the former semantics (i.e. think of it as a really long 
name for a specific module where it turns out the name is broken). If you look 
at it as find_spec(".submodule", package="parent") this also visually supports 
the idea that parent modules shouldn't trigger a None return. Finally, this 
would break any code that expects the current semantics.

So thanks for the bug report, but I'm going to close this as "not a bug".

--
nosy: +brett.cannon, eric.snow, ncoghlan
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed
type:  -> behavior

___
Python tracker 

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



[issue22257] PEP 432: Redesign the interpreter startup sequence

2017-05-23 Thread Eric Snow

Eric Snow added the comment:


New changeset e0918ecf93a458d4e005650f816d64654e73fc2a by Eric Snow in branch 
'master':
bpo-22257: Fix CLI by using int instead of char (compares to EOF). (#1765)
https://github.com/python/cpython/commit/e0918ecf93a458d4e005650f816d64654e73fc2a


--

___
Python tracker 

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



[issue30438] tarfile would fail to extract tarballs with files under R/O directories

2017-05-23 Thread Catherine Devlin

Catherine Devlin added the comment:

I confirmed the error, and that doing the corresponding tar/untar cycle with 
the command-line `tar` utility succeeds.

issue_30438_test.patch adds a unittest version of Yaroslav's demo file to 
test_tarfile.py.  (It's irrelevant if the PR is merged.)

This doesn't actually include a fix.  Issue should remain open.

--
keywords: +patch
nosy: +Catherine.Devlin
pull_requests: +1850
Added file: http://bugs.python.org/file46890/issue_30438_test.patch

___
Python tracker 

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



[issue28087] macOS 12 poll syscall returns prematurely

2017-05-23 Thread STINNER Victor

STINNER Victor added the comment:

Ned Deily added the comment:
> Unfortunately, with the tests reenabled, they still fail with the most recent 
> release of macOS 10.12 (10.12,5)

Oh. In that case, I will update my patch to blacklist macOS versions
with the bug (remove select.poll() depending on macOS version).

--

___
Python tracker 

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



[issue28401] Don't support the PEP384 stable ABI in pydebug builds

2017-05-23 Thread Stefano Rivera

Stefano Rivera added the comment:

> whether this would confuse users since they will simply get an ImportError 
> instead of some other error and thus will they be able to realize why there's 
> a problem?

It's the same behaviour we have for any other module on the import path, that 
doesn't have the right tag. I suppose abi3 is a bit of a special case there, 
because it's expected to be widely supported...

Also, there is a related problem: Because abi3 is in the supported extension 
list, setup.py build will build an abi3 extension (which isn't actually abi3), 
under a pydebug interpreter.

--

___
Python tracker 

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



[issue22257] PEP 432: Redesign the interpreter startup sequence

2017-05-23 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

This change should be reverted. Lib/test/coding20731.py intentionally should 
have the CRLF lines separator.

--

___
Python tracker 

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



[issue30442] Skip test_xml_etree under coverage

2017-05-23 Thread Kushal Das

Changes by Kushal Das :


--
pull_requests: +1848

___
Python tracker 

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



[issue28401] Don't support the PEP384 stable ABI in pydebug builds

2017-05-23 Thread Brett Cannon

Brett Cannon added the comment:

So limited ABI modules can't be imported by a Py_DEBUG build. Stefano's patch 
just skips over them. That seems reasonable, but one question I do have is 
whether this would confuse users since they will simply get an ImportError 
instead of some other error and thus will they be able to realize why there's a 
problem?

--
components: +Interpreter Core -Library (Lib)
nosy: +brett.cannon, eric.snow, ncoghlan
stage:  -> commit review

___
Python tracker 

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



[issue28401] Don't support the PEP384 stable ABI in pydebug builds

2017-05-23 Thread Roundup Robot

Changes by Roundup Robot :


--
pull_requests: +1847

___
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-05-23 Thread Mark Shannon

Mark Shannon added the comment:

This is either a "won't fix" or an "impossible to fix" depending on your point 
of view.

PATIENT:
 It hurts whenever I press ctrl-C
DOCTOR:
 Then don't press ctrl-C

The problem is that ctrl-C can provoke an interrupt at any point in the 
program, and thus break presumed invariants.
try-finally has the same problem.

>From the observable side effects it is indistinguishable whether an interrupt 
>occurs after the last instruction in an __enter__ function or after the first 
>(side-effect-less) instruction after the __enter__.
Likewise the last pre-__exit__ and first in-__exit__ instructions are 
effectively the same from the point of view from observable side-effects, but 
are different from the point of view of the handling of exceptions.

--
nosy: +Mark Shannon

___
Python tracker 

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



[issue30442] Skip test_xml_etree under coverage

2017-05-23 Thread Kushal Das

New submission from Kushal Das:

test test_xml_etree failed -- Traceback (most recent call last):
  File "/home/travis/build/python/cpython/Lib/test/test_xml_etree.py", line 
1553, in test_bug_xmltoolkit63
self.assertEqual(sys.getrefcount(None), count)
AssertionError: 522146 != 522143

Under coverage (in our travis CI) test_xml_etree fails for refcount. Brett 
suggests to skip this test in case running under coverage.

--
assignee: kushal.das
messages: 294271
nosy: kushal.das
priority: normal
severity: normal
status: open
title: Skip test_xml_etree under coverage
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



[issue30273] The coverage job is broken: distutils build_ext fails on None

2017-05-23 Thread Brett Cannon

Brett Cannon added the comment:

Can this be closed?

--
nosy: +brett.cannon

___
Python tracker 

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



[issue28087] macOS 12 poll syscall returns prematurely

2017-05-23 Thread Ned Deily

Ned Deily added the comment:

Unfortunately, with the tests reenabled, they still fail with the most recent 
release of macOS 10.12 (10.12,5) so perhaps the curl issue was a different 
problem?

--

___
Python tracker 

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



[issue30376] Curses documentation refers to incorrect type

2017-05-23 Thread Kushal Das

Kushal Das added the comment:

Thanks for filing the bug, fixed now. Thank you Berker for the quick patch.

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



[issue30435] Documentation either unclear or incorrect on comparisons between bytes and strings in Python 3

2017-05-23 Thread Brian Ward

Brian Ward added the comment:

The "should" recommendation seems like the right direction, but feels like it 
needs an explanation (in case someone's trying to run some 2.7 code and is 
wondering why their comparisons don't work anymore). Unfortunately, it's a 
little complicated to pile into a section like this. Putting it somewhere else 
(that includes a reference to -b) might work.

A somewhat related aside is that I've sometimes thought that there ought to be 
something a little more extensive regarding converting bytes to strings, as 
it's the kind of thing that can lead you down this road anyway.

--
nosy: +Brian Ward

___
Python tracker 

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



[issue30440] document peephole optimizer effects

2017-05-23 Thread Emily Morehouse

Emily Morehouse added the comment:

Raymond, I'm willing to take over this issue with your guidance if you're open 
to it.

--
nosy: +emilyemorehouse, rhettinger

___
Python tracker 

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



[issue22257] PEP 432: Redesign the interpreter startup sequence

2017-05-23 Thread Eric Snow

Changes by Eric Snow :


--
pull_requests: +1846
status: pending -> open

___
Python tracker 

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



[issue30376] Curses documentation refers to incorrect type

2017-05-23 Thread Kushal Das

Kushal Das added the comment:


New changeset 9bcf81da1436468c3c5e500ae36678a2ad675e32 by Kushal Das in branch 
'3.6':
[3.6] bpo-30376: Update outdated WindowObject references (GH-1630) (#1746)
https://github.com/python/cpython/commit/9bcf81da1436468c3c5e500ae36678a2ad675e32


--

___
Python tracker 

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



[issue30441] os.environ raises RuntimeError: dictionary changed size during iteration

2017-05-23 Thread Danilo Shiga

Changes by Danilo Shiga :


--
nosy: +Danilo Shiga

___
Python tracker 

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



[issue30376] Curses documentation refers to incorrect type

2017-05-23 Thread Kushal Das

Kushal Das added the comment:


New changeset 8af0a214be7c0c921ba5ce5c11043dd5b5da9211 by Kushal Das in branch 
'3.5':
[3.5] bpo-30376: Update outdated WindowObject references (GH-1630) (#1747)
https://github.com/python/cpython/commit/8af0a214be7c0c921ba5ce5c11043dd5b5da9211


--

___
Python tracker 

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



[issue30394] smtplib leaves open sockets around if SMTPConnectError is raised in __init__

2017-05-23 Thread Joel Hillacre

Joel Hillacre added the comment:

r.david.murray,

How would a test would have a reference to  after an exception in the 
smtplib.SMTP.__init__()?

--

___
Python tracker 

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



[issue30405] build.bat: register binaries for py launcher

2017-05-23 Thread Steve Dower

Steve Dower added the comment:

> Steve, I gather you don't think it's a problem to use arbitrarily named tags 
> on the command line. The launcher shouldn't look for an "h" tag for `py -h`

Sure, we can reserve some tags - the -x/y syntax would let you refer to a 
conflicting one. But other than PythonCore\x.y for (x, y) <= (3, 4), there 
shouldn't be any need for version or binary checks. Those were needed because 
we didn't write correct tags, but as of Python 3.5 we write good tags and PEP 
514 essentially requires it.

--

___
Python tracker 

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



[issue30441] os.environ raises RuntimeError: dictionary changed size during iteration

2017-05-23 Thread Osvaldo Santana Neto

Osvaldo Santana Neto added the comment:

I agree with Jelle about the fix's implementation. But I disagree of suggestion 
to implement lock at the application side.

I disagree because some external libraries may want to access os.environ in a 
concurrent fashion without lock acquiring. That's the case reported in my 
previous comment: urllib/requests.py 
(https://github.com/python/cpython/blob/master/Lib/urllib/request.py#L2468) 
iterates over os.environ with no lock control.

How could I handle this issue in this case? Would it be a good idea  implement 
the lock mechanism in current os._Environ 
(https://github.com/python/cpython/blob/master/Lib/os.py#L666) mapping class?

--

___
Python tracker 

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



[issue22257] PEP 432: Redesign the interpreter startup sequence

2017-05-23 Thread Eric Snow

Eric Snow added the comment:

The change in Lib/test/coding20731.py was the result of running 
PCbuild/fix_encoding.py.

--
status: open -> pending

___
Python tracker 

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



[issue21074] Too aggressive constant folding

2017-05-23 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> "I apologize if you were offended", which I will take as being sincere, 
> happens to also be one of the most common examples of an insincere apology. 
> Bowing out when there is a reference to the CoC gives undue power to others, 
> and hinders the ability to apply its spirit to all but the most egregious 
> situations.

I'm not interested in reading this kind of rhetorics, sorry.

--

___
Python tracker 

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



[issue21074] Too aggressive constant folding

2017-05-23 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy:  -pitrou

___
Python tracker 

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



[issue21074] Too aggressive constant folding

2017-05-23 Thread Andrew Dalke

Andrew Dalke added the comment:

Again, I do not propose any changes to the existing optimizer. I do not need 
anything changed for my code to work.

My goal is to counter-balance comments which suggest that perfectly normal code 
is somehow folly and arcane. These caused me some bewilderment and self-doubt 
as I tried to establish that my test suite was not, in fact, poorly written. 
Others with the same issue should not face the same confusion. 

I especially do not want to see the years of experience with the current 
optimizer used to justify repeating the same decisions in some future AST-based 
optimizer. http://bugs.python.org/issue2506#msg64764 gives an example of how 
the lack of complaints over several years is used to argue against changing 
compiler behavior.

Terms like "folly" and "arcane" also suggest an outright rejection of 
considering to support in the future what seems like totally reasonable code. 

I realize now that there is a more immediately actionable item. I have just 
added #30440 as a request to document these effects. I have removed my name 
from its nosy list in hopes of reducing Raymond Hettinger's concerns about 
comfort and safety, and thus perhaps increase the likelihood that this will be 
documented.

"I apologize if you were offended", which I will take as being sincere, happens 
to also be one of the most common examples of an insincere apology. Bowing out 
when there is a reference to the CoC gives undue power to others, and hinders 
the ability to apply its spirit to all but the most egregious situations.

Even if I accept the idea that "sane" and "insane" have technical meanings, 
that does not exempt their use from questions about being considerate and 
respective. Django and others replaced their use of the technical terms 
"master" and "slave", following a trend which is at least 13 years old; see 
http://edition.cnn.com/2003/TECH/ptech/11/26/master.term.reut/ . Note that I am 
not proposing to avoid using the terms "sane" and "insane", only asserting that 
there is no clean exception for words which also have a technical sense or 
meaning, even when used for that technical sense.

--

___
Python tracker 

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



[issue30441] os.environ raises RuntimeError: dictionary changed size during iteration

2017-05-23 Thread Jelle Zijlstra

Jelle Zijlstra added the comment:

Even with the patch, I don't think it's safe to modify os.environ while it's 
being accessed concurrently in another thread. The other thread's modification 
could arrive while the dict() call in your patch is running (in CPython the GIL 
might protect you, but that's an implementation detail).

I think the real solution is that your application uses a lock or some other 
concurrency mechanism to protect access to os.environ.

--
nosy: +Jelle Zijlstra

___
Python tracker 

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



[issue30395] deadlocked child process after forking on pystate.c's head_mutex

2017-05-23 Thread Louis Brandy

Louis Brandy added the comment:

Thanks to everyone jumping in.

I need no convincing that mixing forks and threads isn't just a problem but a 
problem factory. Given that the rest of this code seems to try to avoid similar 
deadlocks with similar mutexes, I figured we'd want to include this mutex to 
make a best-effort at being safe here. That made it worth reporting. To be 
sure, I still believe that the application code that led us here needs deeper 
fixes to address the fork/thread problems.

--

___
Python tracker 

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



[issue25532] infinite loop when running inspect.unwrap over unittest.mock.call

2017-05-23 Thread Nick Coghlan

Nick Coghlan added the comment:

Ah, sorry - I merged the PR before seeing the discussion about the limit over 
here.

I'd be fine with replacing the sys.getrecursionlimit() call with a module level 
constant like "_UNWRAP_LIMIT = 500".

If someone desperately needed a higher limit for some reason, they could still 
poke around and change that from outside the module, even if doing so wasn't 
officially supported.

That wouldn't need a new NEWS entry, since it would just be an amendment to the 
existing patch.

--

___
Python tracker 

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



[issue30407] ipaddress ver. 1.0.14 IPv4Network off by 1

2017-05-23 Thread kelly hirai

kelly hirai added the comment:

i thought it was inconsistent that
192.168.1.0 was included, but 192.168.0.0 was not.

--

___
Python tracker 

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



[issue25430] speed up ipaddress __contain__ method

2017-05-23 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Hi Aleksandr,

well, sorry for the detail.  We now use GitHub for patch submission, would you 
like to submit a PR at https://github.com/python/cpython/ (see devguide at 
https://cpython-devguide.readthedocs.io/ for more information).

If you don't want to do so, that's fine, too. A core developer may take care of 
it for you.

--
nosy: +pitrou

___
Python tracker 

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



[issue25430] speed up ipaddress __contain__ method

2017-05-23 Thread Antoine Pitrou

Antoine Pitrou added the comment:

s/sorry for the detail/sorry for the delay/

--

___
Python tracker 

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



[issue29335] subprocess module does not check WIFSTOPPED on SIGCHLD

2017-05-23 Thread Gregory P. Smith

Gregory P. Smith added the comment:


New changeset 56bc3b768c3cc3817031b56d5e7a279aa1296bc9 by Gregory P. Smith in 
branch 'master':
bpo-29335 - apply suggested test_subprocess simplifications from haypo and 
Zach: (#1757)
https://github.com/python/cpython/commit/56bc3b768c3cc3817031b56d5e7a279aa1296bc9


--

___
Python tracker 

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



  1   2   >