[issue17942] IDLE Debugger: Improve GUI

2017-05-22 Thread Louie Lu

Louie Lu added the comment:

Mark, do you mind to rebase your patch to the latest version?

--
nosy: +louielu

___
Python tracker 

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



[issue30426] why not use the same style func name. eg: int.to_bytes (with underline or not) and array.tobytes().

2017-05-22 Thread jf

New submission from jf:

I note that, some functions have different style names, some have underline, 
and some not. why do so??

eg:
int.to_bytes()  and array.tobytes()
int.from_byte() and array.frombytes()
ZipInfo.from_file() and array.fromfile()
...

--
components: Library (Lib)
messages: 294127
nosy: zaazbb
priority: normal
severity: normal
status: open
title: why not use the same style func name. eg: int.to_bytes (with underline 
or not) and array.tobytes().
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



[issue30426] why not use the same style func name. eg: int.to_bytes (with underline) and array.tobytes(without underline).

2017-05-22 Thread jf

Changes by jf :


--
title: why not use the same style func name. eg: int.to_bytes (with underline 
or not) and array.tobytes(). -> why not use the same style func name. eg: 
int.to_bytes (with underline) and array.tobytes(without underline).

___
Python tracker 

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



[issue17942] IDLE Debugger: Improve GUI

2017-05-22 Thread Louie Lu

Louie Lu added the comment:

Rebase markroseman patch to latest version, I own no credit on this patch.

Just want to check the effect about the patch.

--
Added file: http://bugs.python.org/file46884/0001-WIP.patch

___
Python tracker 

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



[issue17942] IDLE Debugger: Improve GUI

2017-05-22 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Mark, Python now uses git and pull requests.  Can you, and do you wish to, 
rebase and convert to a pull request, any of your patches we wish to 
investigate further, yourself, or should we go ahead and do so?  Silence for a 
week will be taken as the latter.  The main difference is being the author of 
the pull request, versus 'merely' being credited in the commit message, as 
before.

--

___
Python tracker 

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



[issue30427] isinstance checks in os.path.normcase redundant with os.fspath

2017-05-22 Thread Wolfgang Maier

New submission from Wolfgang Maier:

os.path.normcase as defined in both posixpath and ntpath is now calling 
os.fspath on its argument first. With that I think the following 
isinstance(str, bytes) checks have become redundant since AFAIU os.fspath is 
guaranteed to return either str or bytes instances.

--
components: Library (Lib)
messages: 294130
nosy: wolma
priority: normal
severity: normal
status: open
title: isinstance checks in os.path.normcase redundant with os.fspath
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



[issue30427] isinstance checks in os.path.normcase redundant with os.fspath

2017-05-22 Thread Wolfgang Maier

Changes by Wolfgang Maier :


--
pull_requests: +1803

___
Python tracker 

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



[issue30427] isinstance checks in os.path.normcase redundant with os.fspath

2017-05-22 Thread Wolfgang Maier

Wolfgang Maier added the comment:

Just created a PR for this, which eliminates the redundancy. This also changes 
the error message (making it less specific), but not the type of a raised 
exception.
If you think that the error message deserves to be preserved that could, of 
course, be done too.

--
type:  -> performance

___
Python tracker 

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



[issue30413] Add fnmatch.filterfalse function

2017-05-22 Thread Wolfgang Maier

Wolfgang Maier added the comment:

> Good catch! It seems to me that they are redundant. Please open a new issue 
> for this.

done: issue 30427

--

___
Python tracker 

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



[issue30413] Add fnmatch.filterfalse function

2017-05-22 Thread Wolfgang Maier

Wolfgang Maier added the comment:

Yet another thing I just realized (sorry for being so annoying):

With os.normcase calling os.fspath in 3.6+ it is not really a NOP anymore even 
on posix. As a consequence, you can now do some weird things with fnmatch: in 
all cases, and only in these, where the module *does* call normcase you can 
pass in Path-like objects as the names.
This works with fnmatch.fnmatch on all platforms, never for fnmatchcase, and 
platform-dependently (on Windows, but not on posix platforms) for 
filter/filterfalse.
It's mostly that last case that worries me because it makes it easy to 
accidentally write code that is not platform-independent.

Also note that you can also pass a Path-like object as pat everywhere except in 
fnmatchcase.

--

___
Python tracker 

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



[issue29828] Allow registering after-fork initializers in multiprocessing

2017-05-22 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> BTW, why can't you use `pthread_atfork` in numpy?

I suppose Numpy could use that, but it's much more involved than registering a 
Python-level callback.  Also it would only work because Numpy actually 
implements its random generator in C.

--

___
Python tracker 

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



[issue29619] st_ino (unsigned long long) is casted to long long in posixmodule.c:_pystat_fromstructstat

2017-05-22 Thread Xavier de Gaye

Xavier de Gaye added the comment:


New changeset 50e86033de85294d87b7e942701d456342abde8e by xdegaye in branch 
'master':
bpo-29619: Do not use HAVE_LARGEFILE_SUPPORT for type conversions (GH-1666).
https://github.com/python/cpython/commit/50e86033de85294d87b7e942701d456342abde8e


--

___
Python tracker 

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



[issue29619] st_ino (unsigned long long) is casted to long long in posixmodule.c:_pystat_fromstructstat

2017-05-22 Thread Xavier de Gaye

Changes by Xavier de Gaye :


--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue30385] Segfault on OSX with 3.6.1

2017-05-22 Thread Gunnar Aastrand Grimnes

Gunnar Aastrand Grimnes added the comment:

Adding env no_proxy='*' does indeed fix it! 

Thanks a lot! 

I guess it's pretty hard to fix. Or even to detect, so that one could log a 
warning before dying :(

--

___
Python tracker 

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



[issue30427] isinstance checks in os.path.normcase redundant with os.fspath

2017-05-22 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Does calling os.fspath() needed in normcase() at all? Is normcase() even called 
with arguments which are not just str/bytes?

--
nosy: +brett.cannon, serhiy.storchaka
stage:  -> patch review

___
Python tracker 

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



[issue30428] mailbox.MMDF wrongly adds From_ header to file

2017-05-22 Thread Ralph Corderoy

New submission from Ralph Corderoy:

Class mailbox.MMDF supports the MMDF-mail-spool file format.  This is a file 
with zero or more records, each starts and ends with a line of four ASCII SOHs. 
 Within those two lines is an email in RFC 5532 format, i.e. a headers section 
followed by an optional body.  There is no "From_" header before the headers 
section as used by mbox format.

https://docs.python.org/3/library/mailbox.html#mmdf references 
http://www.tin.org/bin/man.cgi?section=5&topic=mmdf that explains this clearly 
and gives an example spool file;  there is no "From_" header.

mailbox.MMDF documents it produces a From_ header and does so.  This is wrong.  
It's wrong in Python 2 too.

>>> import mailbox as mb
>>> f = mb.MMDF('mail.spool')
>>> f.add('Subject: Python Bug.\nFrom: b...@hunter.com\n\nEnds.\n')
0
>>> f.close()
>>> print(repr(open('mail.spool').read()))
'\x01\x01\x01\x01\nFrom MAILER-DAEMON Mon May 22 10:14:02 2017\nSubject: 
Python Bug.\nFrom: b...@hunter.com\n\nEnds.\n\n\x01\x01\x01\x01\n'
>>>

Other MMDF-handling software other than tin(1), e.g. 
http://www.nongnu.org/nmh/, neither produces a From_ header for MMDF, nor 
handles one being present.

--
components: Library (Lib)
messages: 294138
nosy: ralph.corderoy
priority: normal
severity: normal
status: open
title: mailbox.MMDF wrongly adds From_ header to file
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



[issue18123] fnmatchicase for case insensitive file search

2017-05-22 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
status: open -> pending

___
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-22 Thread Cheryl Sabella

Changes by Cheryl Sabella :


--
pull_requests: +1804

___
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-22 Thread Cheryl Sabella

Cheryl Sabella added the comment:

I've made a pull request for 4, 5, and 6.  I didn't remove the tk constants as 
it seemed you'd like to do all the files in one project for that.

Also, in query.Query, I noticed that all the widgets were created first and 
then they were all added to the grid last.  I didn't move any existing lines 
for this, but can do that if it's preferred.  It also seemed like helper 
functions might make it more readable (create_py_section, create_idle_section), 
but maybe that's too much churn compared to what this will end up looking like.

--

___
Python tracker 

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



[issue30429] bdb: Add watchpoint function

2017-05-22 Thread Louie Lu

New submission from Louie Lu:

Trying to add watchpoint function to bdb and pdb.

It's goal is to do as gdb for three different watch: watch, rwatch and a watch.

watch: when expr is written by program and value has changed, it will break
rwatch: when expr is read by program, it will break
awatch: when expr is read or write by program, it will break

--
components: Library (Lib)
messages: 294140
nosy: louielu
priority: normal
severity: normal
status: open
title: bdb: Add watchpoint function
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



[issue16500] Add an 'atfork' module

2017-05-22 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
pull_requests: +1805

___
Python tracker 

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



[issue16500] Add an 'atfork' module

2017-05-22 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I've posted https://github.com/python/cpython/pull/1715 which adds a single 
`os.register_at_fork` function to allow registering at-fork handlers.  Comments 
welcome.

--
stage:  -> patch review
versions: +Python 3.7 -Python 3.5

___
Python tracker 

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



[issue16500] Allow registering at-fork handlers

2017-05-22 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
title: Add an 'atfork' module -> Allow registering at-fork handlers

___
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-22 Thread Thomas Kluyver

Changes by Thomas Kluyver :


--
pull_requests: +1806

___
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-22 Thread Thomas Kluyver

Thomas Kluyver added the comment:

This was just reported in IPython as well 
(https://github.com/ipython/ipython/issues/10578 ).

I've prepared a pull request based on Nick's proposal:
https://github.com/python/cpython/pull/1717

--
nosy: +takluyver

___
Python tracker 

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



[issue30430] Cannot write to a tun interface file

2017-05-22 Thread Rémy Léone

New submission from Rémy Léone:

I cannot write certain bytes object to a tun interface file. I've added a 
working and unworking example in the attached file.
I'm running on Ubuntu16.04 with Python 3.5.2

--
components: IO
files: simple_incorrect.py
messages: 294143
nosy: Rémy Léone
priority: normal
severity: normal
status: open
title: Cannot write to a tun interface file
versions: Python 3.5
Added file: http://bugs.python.org/file46885/simple_incorrect.py

___
Python tracker 

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



[issue30426] why not use the same style func name. eg: int.to_bytes (with underline) and array.tobytes(without underline).

2017-05-22 Thread Eric V. Smith

Eric V. Smith added the comment:

There's no particular reason, we just weren't careful about enforcing a 
consistent style, especially on older code.

But whatever the reason, it's now too late to change this.

--
nosy: +eric.smith
resolution:  -> wont fix
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



[issue16500] Allow registering at-fork handlers

2017-05-22 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

`atexit.register()` has different signature and allows to pass arbitrary 
positional and keyword arguments to the registered function. This is 
incompatible with the "when" argument. If we want to support registering 
arguments with the function, we need either three registering functions or make 
the "when" parameter the first and positional-only.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue16500] Allow registering at-fork handlers

2017-05-22 Thread Antoine Pitrou

Antoine Pitrou added the comment:

API-wise, I went for the minimal route. This avoids any discussion of adding a 
separate module for a tiny functionality that is only going to be used by a 
couple of libraries (and probably no application code).

Comparisons with atexit are not really relevant, IMO, since the use cases are 
very different.

As for passing explicit arguments to the callable, people can use a lambda or 
functools.partial.  I don't want to complicate the C implementation with 
matters that are not really important.

--

___
Python tracker 

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



[issue16500] Allow registering at-fork handlers

2017-05-22 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I agree that with lambdas and functools.partial the support of arguments is not 
needed. Unless someone has good reasons for supporting explicit passing of 
arguments I'm fine with your design.

If the user code manually calls the fork() and (now deprecated) 
PyOS_AfterFork(), it runs "child" functions, but not "before" and "parent" 
functions. Is it worth to emit a runtime warning if the "before" or "parent" 
lists are not empty? Or even immediately exit a child with error?

--

___
Python tracker 

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



[issue16500] Allow registering at-fork handlers

2017-05-22 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I don't think exiting would be a good idea at all.  I'm not sure about emitting 
a warning: the problem is that the people seeing the warning (plain users) 
can't do anything about it; worse, they probably will not even understand what 
it is about, and will get confused.

The package maintainer should see a deprecation warning when compiling code 
using PyOS_AfterFork() (thanks to the Py_DEPRECATED attribute).

Of course, I'll also update the docs to add a deprecation once the design is 
settled.

--

___
Python tracker 

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



[issue16500] Allow registering at-fork handlers

2017-05-22 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

PyOS_AfterFork() is used by one code, but the "before" and "parent" handlers 
are registered by the other code (likely the code of other library). The author 
of the program that uses both libraries (the one that uses PyOS_AfterFork() and 
the one that registers handlers) can notice the warning and report the bug in 
the first library. I think silently skipping registered handlers would be worse.

Let allow the user to control the behavior by setting the warnings filter. If 
the corresponding warnings are ignored, nothing happen, if they are errors, the 
child is exited, otherwise the warning message is output on stderr as for other 
warnings.

--

___
Python tracker 

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



[issue30003] Fix handling escape characters in HZ codec

2017-05-22 Thread Xiang Zhang

Xiang Zhang added the comment:


New changeset 89a5e03244370f41ce9bed5cea38e0dd620edb73 by Xiang Zhang in branch 
'master':
bpo-30003: Fix handling escape characters in HZ codec (#1556)
https://github.com/python/cpython/commit/89a5e03244370f41ce9bed5cea38e0dd620edb73


--

___
Python tracker 

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



[issue30003] Fix handling escape characters in HZ codec

2017-05-22 Thread Xiang Zhang

Changes by Xiang Zhang :


--
pull_requests: +1807

___
Python tracker 

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



[issue30003] Fix handling escape characters in HZ codec

2017-05-22 Thread Xiang Zhang

Changes by Xiang Zhang :


--
pull_requests: +1808

___
Python tracker 

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



[issue30430] Cannot write to a tun interface file

2017-05-22 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Would you care to post the detailed error and traceback here?  Not everyone 
wants to set up a TUN interface to try to reproduce :-)

--
nosy: +pitrou

___
Python tracker 

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



[issue30430] Cannot write to a tun interface file

2017-05-22 Thread Rémy Léone

Rémy Léone added the comment:

Traceback (most recent call last):
  File "simple_incorrect.py", line 31, in 
tun.write(incorrect_frame)
OSError: [Errno 22] Invalid argument

--

___
Python tracker 

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



[issue30431] input function truncates prompt by NULL byte

2017-05-22 Thread Костя Чолак

New submission from Костя Чолак:

input('some\x00 text')
will prompt for `some` instead of `some text`

--
components: IO
messages: 294153
nosy: Костя Чолак
priority: normal
severity: normal
status: open
title: input function truncates prompt by NULL byte
type: behavior
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



[issue30003] Fix handling escape characters in HZ codec

2017-05-22 Thread Xiang Zhang

Changes by Xiang Zhang :


--
pull_requests: +1809

___
Python tracker 

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



[issue30430] Cannot write to a tun interface file

2017-05-22 Thread Rémy Léone

Rémy Léone added the comment:

The question I'm the most interested about is why depending on what the bytes 
object contains I get a different result. In one case the bytes are written 
fine to the TUN interface file descriptor and in the other case I get an 
Errno22. My assumption is that the bytes to write are completely opaque for 
Python.

My current workaround is mainly to start the bytes I want to send to my tun 
interface with a non-0 byte.
Something strange that I have also noticed using strace python 
simple_incorrect.py is that I get EINVAL errors in the second case while I 
didn't change the mode with which I open the tun.

--

___
Python tracker 

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



[issue30430] Cannot write to a tun interface file

2017-05-22 Thread Antoine Pitrou

Antoine Pitrou added the comment:

So basically the write() system call seems to be returning EINVAL.  Can I 
suggest the following steps:

1. try to reproduce using os.open() and os.write() instead of open() and 
write() (just to make sure something doesn't get in the way)

2. if it still fails, try to reproduce using an equivalent C snippet

If 2 fails as well, then this is a system issue and not a Python issue.  
Otherwise, we'll have to find out how Python differs from C.

--

___
Python tracker 

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



[issue30430] Cannot write to a tun interface file

2017-05-22 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I know nothing about TUN but you may simply be hitting this code path:
https://github.com/spotify/linux/blob/master/drivers/net/tun.c#L601-L614

Since:
>>> ('e'.encode()[0] & 0xf0) in (0x40, 0x60)
True
>>> ('é'.encode()[0] & 0xf0) in (0x40, 0x60)
False

writing 'é'.encode() will hit the EINVAL-returning path.  The bottom line is 
that TUN devices don't seem to support free-form data, but expect a certain 
format.

--
nosy: +neologix

___
Python tracker 

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



[issue30429] bdb and pdb: Add watchpoint function

2017-05-22 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
title: bdb: Add watchpoint function -> bdb and pdb: Add watchpoint function

___
Python tracker 

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



[issue30429] bdb and pdb: Add watchpoint function

2017-05-22 Thread Louie Lu

Changes by Louie Lu :


--
type:  -> enhancement

___
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-22 Thread Raymond Hettinger

Raymond Hettinger added the comment:

> (I reopen the issue since it got a long new comment.)

Andrew specifically said, "I don't propose re-opening it".

FWIW, the zen of python also says, "practicality beats purity".  For most 
users, most of the time, the peephole optimizer is a net win and it encourages 
us to write clearer code like "x & (2 ** 32 - 1)" rather than "x & 4294967295".

--

___
Python tracker 

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



[issue30430] Cannot write to a tun interface file

2017-05-22 Thread Rémy Léone

Rémy Léone added the comment:

I've tackle the 1. by replacing write/open with os.write/os.open. I still get :
$ python3 simple_incorrect.py
b'\xc3\xa9'
Traceback (most recent call last):
  File "simple_incorrect.py", line 32, in 
os.write(tun, incorrect_frame)
OSError: [Errno 22] Invalid argument

I'm going to study more in depth the point you raised about tun.c

--
Added file: http://bugs.python.org/file46886/simple_incorrect.py

___
Python tracker 

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



[issue16500] Allow registering at-fork handlers

2017-05-22 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> If the corresponding warnings are ignored, nothing happen, if they are 
> errors, the child is exited,

Right now PyOS_AfterFork() doesn't return an error code.  It is not obvious how 
the caller would react: simply print the error? raise a fatal error? Something 
else?

The only third-party use of PyOS_AfterFork() I found is in uwsgi (and I'm not 
sure they're using it correctly, since I don't know if the parent process is 
using Python at all...).

--

___
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-22 Thread Cooper Lees

Changes by Cooper Lees :


--
nosy: +cooperlees

___
Python tracker 

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



[issue24658] open().write() fails on 2 GB+ data (OS X)

2017-05-22 Thread Stéphane Wirtel

Stéphane Wirtel added the comment:

1. in the case of Windows, maybe we could open a new issue because this fix is 
only for MacOS

2. the issue was only for the files and not the sockets

what do you suggest ?

--

___
Python tracker 

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



[issue30003] Fix handling escape characters in HZ codec

2017-05-22 Thread Xiang Zhang

Xiang Zhang added the comment:


New changeset 65440f8278351e16350be716dff61f5f786f7060 by Xiang Zhang in branch 
'3.5':
bpo-30003: Fix handling escape characters in HZ codec (#1556) (#1718)
https://github.com/python/cpython/commit/65440f8278351e16350be716dff61f5f786f7060


--

___
Python tracker 

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



[issue30003] Fix handling escape characters in HZ codec

2017-05-22 Thread Xiang Zhang

Xiang Zhang added the comment:


New changeset 54af41d42eebbe4c6afe6b34ebb0fb550de1e7ba by Xiang Zhang in branch 
'3.6':
bpo-30003: Fix handling escape characters in HZ codec (#1556) (#1719)
https://github.com/python/cpython/commit/54af41d42eebbe4c6afe6b34ebb0fb550de1e7ba


--

___
Python tracker 

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



[issue30003] Fix handling escape characters in HZ codec

2017-05-22 Thread Xiang Zhang

Changes by Xiang Zhang :


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



[issue30003] Fix handling escape characters in HZ codec

2017-05-22 Thread Xiang Zhang

Xiang Zhang added the comment:


New changeset 6e1b832a6c0c8f32962a196ab631ccc17471d32b by Xiang Zhang in branch 
'2.7':
bpo-30003: Fix handling escape characters in HZ codec (#1720) (#1556)
https://github.com/python/cpython/commit/6e1b832a6c0c8f32962a196ab631ccc17471d32b


--

___
Python tracker 

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



[issue30317] test_timeout() of test_multiprocessing_spawn.WithManagerTestBarrier fails randomly on x86 Windows7 3.x buildbot

2017-05-22 Thread Davin Potts

Changes by Davin Potts :


--
pull_requests: +1810

___
Python tracker 

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



[issue19764] subprocess: use PROC_THREAD_ATTRIBUTE_HANDLE_LIST with STARTUPINFOEX on Windows Vista

2017-05-22 Thread Segev Finer

Segev Finer added the comment:

GitHub PR bit rotting away... :P

Just a friendly reminder :)

--

___
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-22 Thread Gregory P. Smith

Gregory P. Smith added the comment:

You cannot safely use Python's os.fork() in a process that has threads.  
Because of POSIX.

The CPython interpreter is by definition not async signal safe so no Python 
code may safely be executed after the fork() system call if the process 
contained _any_ threads at fork() system call time.

The only reliable recommendation: *Never use os.fork()* (if your process _might 
ever_ contain any threads now or in the future started by your or any of your 
dependencies).

The closest thing to a fix to this is a bunch of band-aids to setup atfork 
functions to clear the state of known locks in the forked child. -- But even 
that can't guarantee things because that can't know about all locks.

The C standard library can contain locks.  malloc() for example.  Any C/C++ 
extension modules can contain locks of their own.  The problem isn't solvable 
within CPython.  Adding a clear of pystate.c's head_mutex after forking makes 
sense.  That may even get you further.  But you will encounter other problems 
of the same nature in the future.

related: https://bugs.python.org/issue6721 and 
https://bugs.python.org/issue16500

--
nosy: +gregory.p.smith
resolution:  -> not a bug
stage:  -> needs patch
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



[issue30317] test_timeout() of test_multiprocessing_spawn.WithManagerTestBarrier fails randomly on x86 Windows7 3.x buildbot

2017-05-22 Thread Davin Potts

Davin Potts added the comment:

To better accommodate very slow buildbots, a parameter is added in PR-1722 to 
scale up the timeout durations where they are necessary on a per-machine basis.

Relevant tests have a timeout set to some default number of seconds times a 
multiplier value.

The multiplier value can be controlled by the environment variable 
'CONF_TIMEOUT_MULTIPLIER' which defaults to a multiplier of 1.0 if not set.  On 
buildbots, this environment variable can be set by defining a parameter by that 
name in the buildbot configuration file for a machine.  Otherwise, this 
environment variable can be set in the usual way before running tests on 
non-buildbot machines.

--
nosy: +davin, zach.ware
stage:  -> patch review

___
Python tracker 

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



[issue30339] test_multiprocessing_main_handling: "RuntimeError: Timed out waiting for results" on x86 Windows7 3.x

2017-05-22 Thread Davin Potts

Davin Potts added the comment:

Patch on issue30317 also addresses this issue in a more flexible way.

--
dependencies: +test_timeout() of 
test_multiprocessing_spawn.WithManagerTestBarrier fails randomly on x86 
Windows7 3.x buildbot
nosy: +davin

___
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-22 Thread Yury Selivanov

Yury Selivanov added the comment:

> Since the limit is arbitrary anyway, sys.getrecursionlimit() seems like a 
> reasonable choice. 

The recursion limit can be changed for whatever purposes and I'm not sure that 
it's a good idea that it will affect unwrap behaviour in such cases.

I'd suggest to pick a sufficiently large number like 500 and go with it.

--

___
Python tracker 

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



[issue23894] lib2to3 doesn't recognize rb'...' and f'...' in Python 3.6

2017-05-22 Thread Łukasz Langa

Changes by Łukasz Langa :


--
pull_requests: +1811

___
Python tracker 

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



[issue30432] FileInput doesn't accept PathLike objects for file names

2017-05-22 Thread Roy Williams

New submission from Roy Williams:

```
from fileinput import FileInput
from pathlib import Path

p = Path('.')
FileInput(p)
```

Results in:

Traceback (most recent call last):
  File "", line 1, in 
  File 
"/usr/local/Cellar/python3/3.6.0/Frameworks/Python.framework/Versions/3.6/lib/python3.6/fileinput.py",
 line 198, in __init__
files = tuple(files)
TypeError: 'PosixPath' object is not iterable

--
components: IO
messages: 294169
nosy: Roy Williams
priority: normal
severity: normal
status: open
title: FileInput doesn't accept PathLike objects for file names
versions: 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



[issue30433] Devguide lacks instructions for building docs

2017-05-22 Thread Caleb Hattingh

New submission from Caleb Hattingh:

The official devguide at https://github.com/python/devguide does not include 
instructions on exactly how to build the docs!  If, after cloning, you simply 
type `make`, you get some helpful output:

$ make
Please use `make ' where  is one of
  html   to make standalone HTML files
  dirhtmlto make HTML files named index.html in directories
  singlehtml to make a single large HTML file
  pickle to make pickle files
  json   to make JSON files
  htmlhelp   to make HTML files and a HTML help project
  qthelp to make HTML files and a qthelp project
  devhelpto make HTML files and a Devhelp project
  epub   to make an epub
  latex  to make LaTeX files, you can set PAPER=a4 or PAPER=letter
  latexpdf   to make LaTeX files and run them through pdflatex
  text   to make text files
  manto make manual pages
  changesto make an overview of all changed/added/deprecated items
  linkcheck  to check all external links for integrity
  doctestto run all doctests embedded in the documentation (if enabled)
  check  to run a check for frequent markup errors

However, in order to build, say, HTML, you need to have sphinx installed in 
your environment.  I would like to add a `requirements.txt` file that will 
specify which dependencies must be installed (into a virtualenv, probably), in 
order to successfully build the documentation.  In the GitHub PR, I have also 
added a BUILDING.rst that explains how to install the dependencies for building 
the documentation.

--
assignee: docs@python
components: Documentation
messages: 294170
nosy: cjrh, docs@python
priority: normal
pull_requests: 1812
severity: normal
status: open
title: Devguide lacks instructions for building docs
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



[issue30433] Devguide lacks instructions for building docs

2017-05-22 Thread Stéphane Wirtel

Stéphane Wirtel added the comment:

Hello,

Are you sure about the PR ?

--
nosy: +matrixise

___
Python tracker 

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



[issue30431] input function truncates prompt by NULL byte

2017-05-22 Thread Kushal Das

Changes by Kushal Das :


--
nosy: +kushal.das

___
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-22 Thread Thomas Kluyver

Thomas Kluyver added the comment:

I could go either way on that. It's not hard to imagine it as a recursive 
algorithm, and using the recursion limit provides a simple configuration escape 
hatch if someone has a desperate need for something wrapped 3000 times for some 
strange reason. But it may also be somewhat surprising if someone sets a really 
high recursion limit and suddenly it behaves oddly.

I've made the PR with getrecursionlimit() for now, but I'm happy to change it 
if people prefer it the other way.

--

___
Python tracker 

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



[issue30433] Devguide lacks instructions for building docs

2017-05-22 Thread Caleb Hattingh

Changes by Caleb Hattingh :


--
pull_requests:  -1812

___
Python tracker 

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



[issue30433] Devguide lacks instructions for building docs

2017-05-22 Thread Caleb Hattingh

Caleb Hattingh added the comment:

Oops, sorry!  The PR was wrong because it auto-assumes the main cpython repo, 
but my PR is in the devguide repo. This is the URL for the PR:

https://github.com/python/devguide/pull/206

--

___
Python tracker 

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



[issue11410] Use GCC visibility attrs in PyAPI_*

2017-05-22 Thread Thomas Wouters

Changes by Thomas Wouters :


--
resolution:  -> out of date
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



[issue17411] Build failures with non-NDEBUG, non-Py_DEBUG builds.

2017-05-22 Thread Thomas Wouters

Changes by Thomas Wouters :


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



[issue17411] Build failures with non-NDEBUG, non-Py_DEBUG builds.

2017-05-22 Thread Thomas Wouters

Changes by Thomas Wouters :


--
resolution:  -> out of date

___
Python tracker 

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



[issue11470] Flag inappropriate uses of callable class attributes

2017-05-22 Thread Thomas Wouters

Changes by Thomas Wouters :


--
resolution:  -> out of date
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



[issue20210] Provide configure options to enable/disable Python modules and extensions

2017-05-22 Thread Thomas Wouters

Thomas Wouters added the comment:

This feature would also be nice to have for Python at Google: we want builds to 
be as reproducible as possible, avoid third-party libraries even when they are 
available on the build system, and avoid certain extension modules in any form. 
We currently delete them after building, but suppressing their builds makes 
much more sense.

--
nosy: +twouters

___
Python tracker 

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



[issue17942] IDLE Debugger: Improve GUI

2017-05-22 Thread Mark Roseman

Mark Roseman added the comment:

Please go ahead with any of the patches I submitted earlier, credit is 
absolutely not an issue.

--

___
Python tracker 

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



[issue30431] input function truncates prompt by NULL byte

2017-05-22 Thread Kushal Das

Kushal Das added the comment:

I am picking this up.

--
assignee:  -> kushal.das

___
Python tracker 

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



[issue30392] default webbrowser fails on macOS Sierra 10.12.5

2017-05-22 Thread Alan Pierce

Changes by Alan Pierce :


--
nosy: +alangpierce

___
Python tracker 

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



[issue30392] default webbrowser fails on macOS Sierra 10.12.5

2017-05-22 Thread Dariusz Smigiel

Dariusz Smigiel added the comment:

The same applies for latest build: 
Python 3.7.0a0 (heads/master:128641d17e, May 22 2017, 09:40:08)
[GCC 4.2.1 Compatible Apple LLVM 8.1.0 (clang-802.0.42)] on darwin

I can try to work on that.

--
nosy: +dasm
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



[issue30434] multiprocessing AuthenticationError "digest sent was rejected"

2017-05-22 Thread Soon Jeffrey

New submission from Soon Jeffrey:

This is codes I run:

class TopicManager(SyncManager):
pass

Server side:
m = TopicManager(address=('', 5), authkey='12345')
s = m.get_server()
s.serve_forever()

client side:
m = TopicManager(address=('eng-g9-018', 5), authkey='12345')
m.connect()

When I use Python2.7.5, m.connect() can connect to server.
But when I use Python2.7.13, m.connect() throws out AuthenticationError "digest 
sent was rejected"

Searched and multiprocessing.current_process().authkey = "12345" doesn't   help.

--
messages: 294178
nosy: Soon Jeffrey
priority: normal
severity: normal
status: open
title: multiprocessing AuthenticationError "digest sent was rejected"
type: behavior
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



[issue30431] input function truncates prompt by NULL byte

2017-05-22 Thread Eryk Sun

Eryk Sun added the comment:

PyOS_Readline uses a null-terminated prompt string. So input() needs to raise a 
ValueError if the prompt contains null characters, e.g. if PyBytes_GET_SIZE(po) 
!= strlen(promptstr).

--
nosy: +eryksun

___
Python tracker 

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



[issue30372] Status of __builtins__ is not totally clear

2017-05-22 Thread Naomi Ceder

Changes by Naomi Ceder :


--
pull_requests: +1813

___
Python tracker 

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



[issue9883] minidom: AttributeError: DocumentFragment instance has no attribute 'writexml'

2017-05-22 Thread Alex Perry

Changes by Alex Perry :


--
pull_requests: +1814

___
Python tracker 

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



[issue30372] Status of __builtins__ is not totally clear

2017-05-22 Thread Naomi Ceder

Naomi Ceder added the comment:

Created a PR on this... it seems that making the Implementation Detail warning 
come first and deleting the limited execution sentence achieves what's needed 
here.

--
nosy: +NaomiCeder

___
Python tracker 

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



[issue30416] constant folding opens compiler to quadratic time hashing

2017-05-22 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Proposed patch makes const folding more safe by checking arguments before doing 
expensive calculation that can create large object (multiplication, power and 
left shift). It fixes examples in this issue, issue21074, issue30293. The limit 
for repetition is increase from 20 to 256. There are no limits for 
addition/concatenation and like, since it is hard to create really large 
objects with these operations.

--
keywords: +patch
stage:  -> patch review
type:  -> behavior
versions:  -Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6
Added file: http://bugs.python.org/file46887/safe-const-folding.diff

___
Python tracker 

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



[issue30372] Status of __builtins__ is not totally clear

2017-05-22 Thread Mariatta Wijaya

Changes by Mariatta Wijaya :


--
stage: needs patch -> patch review
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



[issue30372] Status of __builtins__ is not totally clear

2017-05-22 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:


New changeset 43c8a9e39bb2d4f25ed7ae17a55f34e375d1868b by Mariatta (Naomi 
Ceder) in branch 'master':
bpo-30372: Clarify that '__builtins__' is a CPython Implementation detail 
(GH-1725)
https://github.com/python/cpython/commit/43c8a9e39bb2d4f25ed7ae17a55f34e375d1868b


--
nosy: +Mariatta

___
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-22 Thread Andrew Dalke

Andrew Dalke added the comment:

I do not think quoting the Zen of Python helps anything. As I wrote, "it gives 
different answers depending on where one draws the line." This includes 
"practicality beats purity".

>From my viewpoint, the peephole optimizer isn't going to change because the 
>core developers prioritize the purity of not adding special cases over the 
>practicality of supporting reasonable real-world code. Or the purity of the 
>long-awaited AST optimizer over the practicality of changing the existing, 
>fragile peephole optimizer.

I also appreciate the viewpoint that the practicality of a maintainable 
peephole optimizer beats the impossible purity of trying to support all use 
cases gracefully. My line, of course, only wants it to handle my use case, 
which is the issue reported here.

My goal from this is not to re-open the topic. It is to provide a 
counter-balance to opinions expressed here that place all blame onto the 
programmer whose 'folly' lead to 'arcane' and 'insane' code. (The 'insane' is 
used at http://bugs.python.org/issue30293#msg293172 as "Burdening the optimizer 
with insanity checks just slows down the compilation of normal, sane code.")

The use case pulled from my project, which is very near to the original report 
by INADA Naoki, seems entirely sane and not at all arcane. How else might one 
test 64-bit addressing than by constructing values which are over 4GB in 
length? Indeed, Python itself has similar test code. Quoting 
Lib/test/test_zlib.py:


# Issue #10276 - check that inputs >=4GB are handled correctly.
class ChecksumBigBufferTestCase(unittest.TestCase):

@bigmemtest(size=_4G + 4, memuse=1, dry_run=False)
def test_big_buffer(self, size):
data = b"nyan" * (_1G + 1)
self.assertEqual(zlib.crc32(data), 1044521549)
self.assertEqual(zlib.adler32(data), 2256789997)


Is the difference between happiness and "folly" really the difference between 
writing "_1G" and "2**30"? If so, how are people supposed to learn the true 
path? Is that not exactly the definition of 'arcane'?

The Code of Conduct which governs comments here requests that we be considerate 
and respective. Terms like 'folly' and 'arcane', at least for what I think is 
an entirely reasonable use case, seems to run counter to that spirit.

--

___
Python tracker 

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



[issue30432] FileInput doesn't accept PathLike objects for file names

2017-05-22 Thread Alex Perry

Alex Perry added the comment:

You seem to be skipping a step, this is nothing to do with FileInput:

>>> [n for n in Path('.')]
Traceback (most recent call last):
  File "", line 1, in 
TypeError: 'PosixPath' object is not iterable

>>> [n for n in Path('.').iterdir()]
[PosixPath('build'), PosixPath('install-sh'), ...]

Are you proposing a feature that the Path instance should be implicitly 
iterable for the directory contents?

--
nosy: +arp11

___
Python tracker 

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



[issue30372] Status of __builtins__ is not totally clear

2017-05-22 Thread Mariatta Wijaya

Changes by Mariatta Wijaya :


--
pull_requests: +1817

___
Python tracker 

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



[issue30392] default webbrowser fails on macOS Sierra 10.12.5

2017-05-22 Thread Dariusz Smigiel

Dariusz Smigiel added the comment:

Rudi, Andrew I missed your replaces.
This, indeed, looks like osascript bug. I don't think it's backward 
incompatible change, especially between 10.12.4 and 10.12.5 which would 
completely broke default behavior.

--

___
Python tracker 

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



[issue30401] Remove the .bzrignore file

2017-05-22 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:

Thanks Stéphane!

--
nosy: +Mariatta
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



[issue30372] Status of __builtins__ is not totally clear

2017-05-22 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:


New changeset 3d3b189f8ef321ccfb144a46d50892939d6004aa by Mariatta in branch 
'3.6':
[3.6] bpo-30372: Clarify that '__builtins__' is a CPython Implementation detail 
(GH-1725) (GH-1727)
https://github.com/python/cpython/commit/3d3b189f8ef321ccfb144a46d50892939d6004aa


--

___
Python tracker 

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



[issue30372] Status of __builtins__ is not totally clear

2017-05-22 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:

PR merged, and I backport it to 3.6

Thanks everyone :)

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



[issue30434] multiprocessing AuthenticationError "digest sent was rejected"

2017-05-22 Thread Alex Perry

Alex Perry added the comment:

The docstring for the class points out that the `multiprocessing.Manager()` 
function creates started instances of the SyncManager class. You should 
probably follow that advice, it calls start() for you.

--
nosy: +arp11

___
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-22 Thread R. David Murray

R. David Murray added the comment:

It would be a white-box test, which I don't like, but it might be worth it to 
write a test that would check that .sock is None, indicating that 
close was called.  You really can't check for no warning because when the 
warning gets generated is effectively asynchronous.

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



[issue30274] Make importlib.abc.ExtensionFileLoader.__init__() documentation match code

2017-05-22 Thread Sayan Chowdhury

Sayan Chowdhury added the comment:

I am starting to work on this issue.

--
nosy: +sayanchowdhury

___
Python tracker 

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



[issue24899] Add an os.path <=> pathlib equivalence table in pathlib docs

2017-05-22 Thread Jamiel Almeida

Jamiel Almeida added the comment:

I'm picking this up.

--
nosy: +slashfoo
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



[issue30392] default webbrowser fails on macOS Sierra 10.12.5

2017-05-22 Thread Ned Deily

Ned Deily added the comment:

We should check whether the osascript regression is fixed in the most recent 
10.12.6 Developer Preview and, if not, open a RADAR (Apple bug report).

--

___
Python tracker 

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



[issue24658] open().write() fails on 2 GB+ data (OS X)

2017-05-22 Thread STINNER Victor

STINNER Victor added the comment:

I don't say that something is broken. Just that it would be nice if someone
could test socket methods.

On Windows, the bug was obvious: the function takes a C int...

--

___
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-22 Thread Eric Snow

Changes by Eric Snow :


--
pull_requests: +1818

___
Python tracker 

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



[issue23894] lib2to3 doesn't recognize rb'...' and f'...' in Python 3.6

2017-05-22 Thread Łukasz Langa

Łukasz Langa added the comment:


New changeset 0c4aca54dcf0c54f299c78aa71fe8f48ff04f9d9 by Łukasz Langa in 
branch 'master':
Make rb'' strings work in lib2to3 (#1724)
https://github.com/python/cpython/commit/0c4aca54dcf0c54f299c78aa71fe8f48ff04f9d9


--

___
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-22 Thread Eric Snow

Changes by Eric Snow :


--
pull_requests: +1819

___
Python tracker 

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



  1   2   >