[issue30415] Improve fnmatch testing

2017-05-20 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
pull_requests: +1787

___
Python tracker 

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



[issue19495] context manager for measuring duration of blocks of code

2017-05-20 Thread Guido van Rossum

Changes by Guido van Rossum :


--
nosy:  -gvanrossum

___
Python tracker 

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



[issue30415] Improve fnmatch testing

2017-05-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:


New changeset 817554715b5578b0bac5c35e6ec9a1abd8649e53 by Serhiy Storchaka in 
branch 'master':
bpo-30415: Add new tests for the fnmatch module. (#1684)
https://github.com/python/cpython/commit/817554715b5578b0bac5c35e6ec9a1abd8649e53


--

___
Python tracker 

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



[issue30420] Clarify kwarg handing for subprocess convenience APIs

2017-05-20 Thread Martin Panter

Martin Panter added the comment:

For the curious, Nick added the “frequently used arguments” in Issue 13237. 
Before that the signatures were like 
:

subprocess.call(*popenargs, **kwargs)

--
nosy: +martin.panter

___
Python tracker 

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



[issue29976] urllib.parse clarify what ' ' in schemes mean

2017-05-20 Thread Senthil Kumaran

Changes by Senthil Kumaran :


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



[issue29976] urllib.parse clarify what ' ' in schemes mean

2017-05-20 Thread Senthil Kumaran

Changes by Senthil Kumaran :


--
pull_requests: +1786

___
Python tracker 

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



[issue29976] urllib.parse clarify what ' ' in schemes mean

2017-05-20 Thread Senthil Kumaran

Changes by Senthil Kumaran :


--
pull_requests: +1785

___
Python tracker 

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



[issue30359] Annotating a function as returning an (async) context manager?

2017-05-20 Thread Jelle Zijlstra

Changes by Jelle Zijlstra :


--
nosy: +Jelle Zijlstra

___
Python tracker 

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



[issue29710] Incorrect representation caveat on bitwise operation docs

2017-05-20 Thread Sanyam Khurana

Changes by Sanyam Khurana :


--
pull_requests: +1784

___
Python tracker 

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



[issue30418] test_communicate_epipe() of test_subprocess fails randomly on AMD64 Windows7 SP1 3.x

2017-05-20 Thread Eryk Sun

Eryk Sun added the comment:

Addressing the underlying problem would require rewriting _Py_read and 
_Py_write_impl to directly call ReadFile and WriteFile instead of the CRT read 
and write functions. Barring that, on Windows _stdin_write would have to always 
ignore EINVAL.

--

___
Python tracker 

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



[issue25720] Fix curses module compilation with ncurses6

2017-05-20 Thread Masayuki Yamamoto

Masayuki Yamamoto added the comment:

Hi, I finished various things and tackle the issue again, I opened PR 1689 at 
last.

Changes from previous patch:
* If ncurses doesn't have both is_pad function and _flags field of WINDOW, 
NCURSES_OPAQUE is defined as zero to make WINDOW to non-opaque type before 
including ncurses.h.
* The conditional compile on function definition are kept, it replaces 
WINDOW_HAS_FLAGS with py_is_pad macro itself.
* Unindent the blocks that places after section of the conditional compile on 
function definition.

--

___
Python tracker 

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



[issue12978] Figure out extended attributes on BSDs

2017-05-20 Thread Roundup Robot

Changes by Roundup Robot :


--
pull_requests: +1783

___
Python tracker 

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



[issue25720] Fix curses module compilation with ncurses6

2017-05-20 Thread Masayuki Yamamoto

Changes by Masayuki Yamamoto :


--
pull_requests: +1782

___
Python tracker 

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



[issue30420] Clarify kwarg handing for subprocess convenience APIs

2017-05-20 Thread Alex Gaynor

Changes by Alex Gaynor :


--
pull_requests: +1781

___
Python tracker 

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



[issue30420] Clarify kwarg handing for subprocess convenience APIs

2017-05-20 Thread Nick Coghlan

New submission from Nick Coghlan:

As per the discussion in https://github.com/python/cpython/pull/1685, the 
current nominal signatures of the convenience APIs in subprocess is confusing, 
as they don't make it clear that all Popen keyword arguments are supported, 
with only the most common ones being listed in the signature.

Proposed fixes:

* add `cwd` to the list of frequently used arguments, and list it in the 
nominal signatures for `run()`, `call()`, `check_call()`, and `check_output()`
* append `**popenargs` to the nominal signatures of `run()`, `call()`, and 
`check_call()`
* append `**runargs` to the nominal signature of `check_output()`
* amend the prose descriptions for these functions accordingly

Background:

The status quo is that while this behaviour is documented, it's documented 
solely as text in the bodies of the API definitions, using paragraphs like the 
following:

`run()`: """The arguments shown above are merely the most common ones, 
described below in Frequently Used Arguments (hence the use of keyword-only 
notation in the abbreviated signature). The full function signature is largely 
the same as that of the Popen constructor - apart from timeout, input and 
check, all the arguments to this function are passed through to that 
interface."""

`call()`, `check_call()`: """The arguments shown above are merely the most 
common ones. The full function signature is largely the same as that of the 
Popen constructor - this function passes all supplied arguments other than 
timeout directly through to that interface."""

`check_output()`: """The arguments shown above are merely the most common ones. 
The full function signature is largely the same as that of run() - most 
arguments are passed directly through to that interface."""

While it's technically anecdotal, we still have pretty decent evidence that 
this isn't adequate as:

- I worked on the original patch splitting out the "Frequently Used Arguments" 
section, and initially missed not only that the run() docs had retained that 
paragraph, but also missed the revised paragraphs in the relocated docs for the 
older API
- as mentioned in the linked PR, Paul Kehrer had missed that `check_call()` and 
`check_output()` both supported the Popen `cwd` parameter

The working theory behind adding the appropriately named `**kwargs` parameters 
to the end of the nominal signatures is that it will give readers a clearer 
indication that we're *not* explicitly listing all the parameters, and a hint 
as to which API to go look at to find out more about the unlisted ones.

--
assignee: docs@python
components: Documentation
messages: 294070
nosy: docs@python, ncoghlan
priority: normal
severity: normal
stage: needs patch
status: open
title: Clarify kwarg handing for subprocess convenience APIs
type: enhancement
versions: Python 3.5, Python 3.6, Python 3.7

___
Python tracker 

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



[issue30418] test_communicate_epipe() of test_subprocess fails randomly on AMD64 Windows7 SP1 3.x

2017-05-20 Thread STINNER Victor

STINNER Victor added the comment:

Would you like to work on a PR Eryk? It seems like you understand the bug
better than me ;-)

--

___
Python tracker 

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



[issue30409] locale.getpreferredencoding doesn't return result

2017-05-20 Thread STINNER Victor

STINNER Victor added the comment:

Sean McCully: Thank you very much for both your bug report and for your pull 
request! You got your name into Python ;-)

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



[issue30418] test_communicate_epipe() of test_subprocess fails randomly on AMD64 Windows7 SP1 3.x

2017-05-20 Thread Eryk Sun

Eryk Sun added the comment:

> but the error is only ignored when the child process is still alive.

This should instead be the error is only ignored when child process is *no 
longer* alive.

--

___
Python tracker 

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



[issue30418] test_communicate_epipe() of test_subprocess fails randomly on AMD64 Windows7 SP1 3.x

2017-05-20 Thread Eryk Sun

Eryk Sun added the comment:

Seeing EINVAL here while the child process is alive could mean the read end of 
the pipe was closed. For example:

>>> import time, subprocess
>>> cmd = 'python -c "import os, time; os.close(0); time.sleep(15)"'
>>> p = subprocess.Popen(cmd, stdin=subprocess.PIPE, bufsize=0)
>>> time.sleep(5); p.communicate(b'spam')
Traceback (most recent call last):
  File "", line 1, in 
  File "C:\Program Files\Python36\lib\subprocess.py", line 821, in 
communicate
self._stdin_write(input)
  File "C:\Program Files\Python36\lib\subprocess.py", line 776, in 
_stdin_write
self.stdin.write(input)
OSError: [Errno 22] Invalid argument

If buffered, the error would instead occur at self.stdin.close(). Both cases 
are currently checked, but the error is only ignored when the child process is 
still alive.

The underlying Windows error is ERROR_NO_DATA. If we could know that for 
certain, then we could ignore it as a BrokenPipeError. Currently all we have to 
go on from _Py_write is the CRT's EINVAL errno value. In contrast, when 
creating an OSError from the Windows last error value, winerror_to_errno() maps 
ERROR_NO_DATA as EPIPE.

--
nosy: +eryksun

___
Python tracker 

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



[issue30409] locale.getpreferredencoding doesn't return result

2017-05-20 Thread STINNER Victor

STINNER Victor added the comment:


New changeset cef8b1741c03a09ea7371947dc65f632c61ef8ad by Victor Stinner (Sean 
McCully) in branch '2.7':
bpo-30409: locale.getpreferredencoding doesn't return result (#1672)
https://github.com/python/cpython/commit/cef8b1741c03a09ea7371947dc65f632c61ef8ad


--

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

Cheryl Sabella added the comment:

Terry,

Is there interest in changing the 'from tkinter import *'?

--

___
Python tracker 

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



[issue30410] Documentation for sys.stdout encoding does not reflect the new Windows behavior in Python 3.6+

2017-05-20 Thread Eryk Sun

Eryk Sun added the comment:

I discussed character devices mostly because of the NUL device. It could be 
surprising that Python dies on an encoding error when output is redirected to 
NUL:

C:\>chcp 1252
Active code page: 1252

C:\>python -c "print('\u20ac')" > nul
C:\>chcp 437
Active code page: 437

C:\>python -c "print('\u20ac')" > nul
Traceback (most recent call last):
  File "", line 1, in 
  File "C:\Program Files\Python36\lib\encodings\cp437.py", line 19, in 
encode
return codecs.charmap_encode(input,self.errors,encoding_map)[0]
UnicodeEncodeError: 'charmap' codec can't encode character '\u20ac' in 
position 0:
character maps to 

Unix has a similar problem:

$ LANG=C python3 -c 'print("\u20ac")' > /dev/null
Traceback (most recent call last):
  File "", line 1, in 
UnicodeEncodeError: 'ascii' codec can't encode character '\u20ac' in 
position 0:
ordinal not in range(128)

Except /dev/null isn't a TTY. Also, it's rare nowadays for the locale encoding 
in Unix systems to be something other than UTF-8.

It would be useful if we special-cased NUL like we do for the Windows console, 
but just to make it use the backslashreplace error handler. Unfortunately I 
don't know how to do that without calling NtQueryObject, for which 
ObjectNameInformation (1) can't be used because it's undocumented [1]. 
GetFinalPathNameByHandle also can't be used because it requires file-system 
devices. As a crude workaround, we could lump together all non-console 
character devices (i.e. isatty() but not a console). That will affect serial 
devices, too, but I can't think of a good reason someone would redirect stdout 
or stderr to a COM port.

[1]: https://msdn.microsoft.com/en-us/library/ff550964

--

___
Python tracker 

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



[issue30302] Improve .__repr__ implementation for datetime.timedelta

2017-05-20 Thread Martin Panter

Martin Panter added the comment:

I think the benefit of the repr being easier to understand outweighs the pain 
of breaking the old format. If the change is a problem, that might be mitigated 
by adding an entry to the “Porting to Python 3.7” documentation.

I don’t think my option of factoring the minus sign out to the front of the 
timedelta constructor was mentioned on Python-dev. The advantage is that it 
doesn’t mention problematic negative attribute values, and if you negate a 
timedelta, you still get the right attribute values:

>>> d
-datetime.timedelta(seconds=60)
>>> -d
datetime.timedelta(seconds=60)
>>> (-d).seconds
60

--

___
Python tracker 

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



[issue30410] Documentation for sys.stdout encoding does not reflect the new Windows behavior in Python 3.6+

2017-05-20 Thread Steve Dower

Steve Dower added the comment:

Looks great, though I wonder whether the rest of the paragraph after "Character 
devices such as NUL" would be more confusing than it's worth?

Can you create a PR? (And having links to the environment variable docs would 
be great.)

--

___
Python tracker 

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



[issue30362] Launcher add list and list with paths options

2017-05-20 Thread Steve Dower

Steve Dower added the comment:

I agree with printing discovered interpreters in help text - not a fan of the 
-0 option.

IDEs should probably go directly to the registry to discover Python 
installations (or use pep514tools), since the launcher will only launch a 
subset of them (i.e. per-user overrides per-machine, non-PythonCore are 
excluded). Relying on py.exe being available (it's optional), being in a 
certain location (there are multiple possibilities), and having parseable 
output (which is a *big* implicit guarantee) doesn't make me comfortable.

--

___
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-20 Thread Steve Dower

Steve Dower added the comment:

I am most interested in making py.exe follow PEP 514 and look up tags. Given 
this, we could register builds as "PythonCore\Dev" and then use "py.exe -dev" 
to run the most recent build. At worst, we only have one lingering registration 
(and a positive - it would be available to any tools that follow PEP 514 to 
locate Python installs).

Alternatively, it could go to "PythonDev\..." and we have another way to look 
it up.

The default tags used to register Python deliberately match the py.exe launcher 
(e.g. "3.6" and "3.6-32", though it now also supports "3.6-64" to prevent 
fallback to the 32-bit interpreter). This should make it *nearly* a non-issue 
to change the launcher to look up Tags rather than versions. Probably needs a 
prototype to see just how bad it would be - I haven't had time to do it.

--

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

Cheryl Sabella added the comment:

This looks like fun!   :-)   I'll let you know if I have any questions.

--

___
Python tracker 

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



[issue30409] locale.getpreferredencoding doesn't return result

2017-05-20 Thread Cheryl Sabella

Changes by Cheryl Sabella :


--
pull_requests: +1780

___
Python tracker 

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



[issue30419] Bdb: Update doc page

2017-05-20 Thread Cheryl Sabella

New submission from Cheryl Sabella:

Update bdb docs to reflect issues found in #30211.

--
assignee: docs@python
components: Documentation
messages: 294057
nosy: csabella, docs@python, terry.reedy
priority: normal
severity: normal
status: open
title: Bdb: Update doc page
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



[issue30418] test_communicate_epipe() of test_subprocess fails randomly on AMD64 Windows7 SP1 3.x

2017-05-20 Thread STINNER Victor

Changes by STINNER Victor :


--
components: +Tests

___
Python tracker 

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



[issue30418] test_communicate_epipe() of test_subprocess fails randomly on AMD64 Windows7 SP1 3.x

2017-05-20 Thread STINNER Victor

New submission from STINNER Victor:

Hum, the following failing looks like bpo-19612, but it seems like the code 
took the "raise" path instead of the "pass" fails.

try:
self.stdin.write(input)   < HERE
except BrokenPipeError:
pass  # communicate() must ignore broken pipe errors.
except OSError as e:
if e.errno == errno.EINVAL and self.poll() is not None:
# Issue #19612: On Windows, stdin.write() fails with EINVAL
# if the process already exited before the write
pass
else:
raise

On AMD64 Windows7 SP1 3.x:

http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/452/steps/test/logs/stdio

...
test_communicate (test.test_subprocess.ProcessTestCase) ... ok
test_communicate_eintr (test.test_subprocess.ProcessTestCase) ... skipped 
'Requires signal.SIGUSR1'
test_communicate_epipe (test.test_subprocess.ProcessTestCase) ... ERROR
C:\buildbot.python.org\3.x.kloth-win64\build\lib\subprocess.py:763: 
ResourceWarning: subprocess 1780 is still running
  ResourceWarning, source=self)
test_communicate_epipe_only_stdin (test.test_subprocess.ProcessTestCase) ... ok
test_communicate_errors (test.test_subprocess.ProcessTestCase) ... ok
test_communicate_pipe_buf (test.test_subprocess.ProcessTestCase) ... ok
...
==
ERROR: test_communicate_epipe (test.test_subprocess.ProcessTestCase)
--
Traceback (most recent call last):
  File 
"C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\test_subprocess.py", 
line 1219, in test_communicate_epipe
p.communicate(b"x" * 2**20)
  File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\subprocess.py", line 
838, in communicate
stdout, stderr = self._communicate(input, endtime, timeout)
  File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\subprocess.py", line 
1072, in _communicate
self._stdin_write(input)
  File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\subprocess.py", line 
778, in _stdin_write
self.stdin.write(input)
OSError: [Errno 22] Invalid argument

--
Ran 261 tests in 43.540s

FAILED (errors=1, skipped=150)
test test_subprocess failed

--
components: Windows
messages: 294056
nosy: haypo, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: test_communicate_epipe() of test_subprocess fails randomly on AMD64 
Windows7 SP1 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



[issue30351] regrtest hangs on x86 Windows XP 2.7

2017-05-20 Thread STINNER Victor

STINNER Victor added the comment:

Hum, it's the second time that regrtest hangs on x86 Windows XP 2.7 while 
test_threading is running.

--

___
Python tracker 

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



[issue30351] regrtest hangs on x86 Windows XP 2.7

2017-05-20 Thread STINNER Victor

STINNER Victor added the comment:

New fail on x86 Windows XP 2.7:

http://buildbot.python.org/all/builders/x86%20Windows%20XP%202.7/builds/166/steps/test/logs/stdio

...
0:35:19 [401/403] test_email_codecs passed -- running: test_threading (70 sec)
0:35:20 [402/403] test_gettext passed -- running: test_threading (71 sec)

command timed out: 1200 seconds without output running 
['Tools\\buildbot\\test.bat', '-j2'], attempting to kill
program finished with exit code 1
elapsedTime=3330.414000

--

___
Python tracker 

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



[issue30417] [buildbot] Disable the cpu resources on slow buildbots

2017-05-20 Thread Zachary Ware

Changes by Zachary Ware :


--
nosy: +zach.ware

___
Python tracker 

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



[issue30314] Buildbots: 15 min is too low for test_tools on x86 Tiger 3.6 buildbot

2017-05-20 Thread Zachary Ware

Changes by Zachary Ware :


--
nosy: +zach.ware

___
Python tracker 

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



[issue30314] Buildbots: 15 min is too low for test_tools on x86 Tiger 3.6 buildbot

2017-05-20 Thread STINNER Victor

STINNER Victor added the comment:

I merged my PR and applied the new buildbot configuration. I will try to check 
if the config was applied correctly.

Serhiy: "test_tools is so slow because it proceeds *all* Python files. This 
controlled by the "cpu" resource (only 10 random files are chosen if it is 
disabled)."

I created the bpo-30417 to track this idea.

--
components: +Tests
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



[issue30417] [buildbot] Disable the cpu resources on slow buildbots

2017-05-20 Thread STINNER Victor

New submission from STINNER Victor:

Follow-up of the issue #30314. Copy of Serhiy Storchaka's msg294048:
--
test_tools is so slow because it proceeds *all* Python files. This controlled 
by the "cpu" resource (only 10 random files are chosen if it is disabled).

Maybe disable the "cpu" resource on slow buildbots?
--

Good point, I like the idea.

It seems like regrtest accepts -u all,-cpu option.

--
components: Tests
messages: 294052
nosy: haypo
priority: normal
severity: normal
status: open
title: [buildbot] Disable the cpu resources on slow buildbots
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



[issue30416] constant folding opens compiler to quadratic time hashing

2017-05-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Nice example.

The only fix I see is caching the hash in a tuple. This can even help in more 
cases, when tuples are used as dict keys. But this affect too much code, and 
can even break a code that mutates a tuple with refcount 1.

--
nosy: +serhiy.storchaka

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

New submission from Andrew Dalke:

Others have reported issues like #21074 where the peephole compiler generates 
and discards large strings, and #30293 where it generates multi-MB integers and 
stores them in the .pyc.

This is a different issue. The code:

  def tuple20():
return 1,)*20,)*20,)*20,)*20,)*20,)*20,)*20,)*20

takes over four minutes (257 seconds) to compile on my machine. The seemingly 
larger:

  def tuple30():
return 1,)*30,)*30,)*30,)*30,)*30,)*30,)*30,)*30

takes a small fraction of a second to compile, and is equally fast to run.

Neither code generates a large data structure. In fact, they only needs about 
1K.

A sampling profiler of the first case, taken around 30 seconds into the run, 
shows that nearly all of the CPU time is spent in computing the hash of the 
highly-nested tuple20, which must visit a very large number of elements even 
though there are only a small number of unique elements. The call chain is:

Py_Main -> PyRun_SimpleFileExFlags -> PyAST_CompileObject -> compiler_body -> 
compiler_function -> compiler_make_closure -> compiler_add_o -> PyDict_GetItem 
and then into the tuple hash code.

It appears that the peephole optimizer converts the highly-nested tuple20 into 
a constant value. The compiler then creates the code object with its co_consts. 
Specifically, compiler_make_closure uses a dictionary to ensure that the 
elements in co_consts are unique, and mapped to the integer used by LOAD_CONST.

It takes about 115 seconds to compute hash(tuple20). I believe the hash is 
computed twice, once to check if the object is present, and the second to 
insert it. I suspect most of the other 26 seconds went to computing the 
intermediate constants in the tuple.

Based on the previous issues I highlighted in my first paragraph, I believe 
this report will be filed under "Doctor, doctor, it hurts when I do this"/"Then 
don't do it." I see no easy fix, and cannot think of how it would come about in 
real-world use.

I point it out because in reading the various issues related to the peephole 
optimizer there's a subset of people who propose a look-before-you-leap 
technical solution of avoiding an optimization where the estimated result is 
too large. While it does help, it does not avoid all of the negatives of the 
peephole optimizer, or any AST-based optimizer with similar capabilities. I 
suspect even most core developers aren't aware of this specific negative.

--
components: Interpreter Core
messages: 294050
nosy: dalke
priority: normal
severity: normal
status: open
title: constant folding opens compiler to quadratic time hashing
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



[issue23560] Group the docs of similar methods in stdtypes.rst

2017-05-20 Thread Cheryl Sabella

Cheryl Sabella added the comment:

Hi Martin,

Do you think it would be good to move forward with this as a PR?


Thanks!

--
nosy: +csabella

___
Python tracker 

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



[issue30314] Buildbots: 15 min is too low for test_tools on x86 Tiger 3.6 buildbot

2017-05-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

test_tools is so slow because it proceeds *all* Python files. This controlled 
by the "cpu" resource (only 10 random files are chosen if it is disabled).

Maybe disable the "cpu" resource on slow buildbots?

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue30314] Buildbots: 15 min is too low for test_tools on x86 Tiger 3.6 buildbot

2017-05-20 Thread STINNER Victor

STINNER Victor added the comment:

PR: https://github.com/python/buildmaster-config/pull/8

--

___
Python tracker 

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



[issue30415] Improve fnmatch testing

2017-05-20 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
pull_requests: +1779

___
Python tracker 

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



[issue30413] Add fnmatch.filter_false function

2017-05-20 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
components: +Library (Lib)
dependencies: +Improve fnmatch testing

___
Python tracker 

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



[issue30415] Improve fnmatch testing

2017-05-20 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

Proposed patch adds new tests for the fnmatch module.

--
assignee: serhiy.storchaka
components: Tests
messages: 294045
nosy: serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Improve fnmatch testing
type: enhancement
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



[issue30410] Documentation for sys.stdout encoding does not reflect the new Windows behavior in Python 3.6+

2017-05-20 Thread Eryk Sun

Eryk Sun added the comment:

How about this?

The character encoding is platform-dependent. Non-Windows 
platforms use the locale encoding (see 
locale.getpreferredencoding()).

On Windows, UTF-8 is used for console character 
devices (i.e. CON, CONIN$, and CONOUT$). However, this
can be overridden to use the console as a generic 
character device by setting the environment variable 
PYTHONLEGACYWINDOWSSTDIO before starting Python. Non-
character devices such as disk files and pipes use the 
system locale encoding (i.e. the ANSI codepage). 
Character devices such as NUL (i.e. isatty() returns 
True) use the value of the console input and output
codepages at startup, respectively for stdin and
stdout/stderr. This defaults to the system locale
encoding if the process is not initially attached to a
console.

Under all platforms, you can override this value by
setting the PYTHONIOENCODING environment variable before
starting Python. However, for the Windows console, this
only applies when PYTHONLEGACYWINDOWSSTDIO is also set.

--
nosy: +eryksun

___
Python tracker 

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



[issue30414] multiprocesing.Queue silently ignore messages after exc in _feeder

2017-05-20 Thread Grzegorz Grzywacz

Changes by Grzegorz Grzywacz :


--
pull_requests: +1778

___
Python tracker 

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



[issue30414] multiprocesing.Queue silently ignore messages after exc in _feeder

2017-05-20 Thread Grzegorz Grzywacz

New submission from Grzegorz Grzywacz:

multiprocessing.Queue is running background thread feeder. Feeder serialize and 
sends buffered data to pipe. 

The issue is with exception handling, feeder is catching all exceptions but out 
of main loop, so after exception is handled feeder is not going back to loop - 
thread finish. If feeder thread is not running any Queue.put will execute 
without exceptions but message not gonna be delivered.

Solution is to move exception handling inside main loop. I will provide PR.

I have run performance tests (found: #17025) and submitted patch do not affect 
performance.

--
components: Library (Lib)
messages: 294044
nosy: grzgrzgrz3
priority: normal
severity: normal
status: open
title: multiprocesing.Queue silently ignore messages after exc in _feeder
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



[issue23667] IDLE to provide option for making trailing whitespace visible

2017-05-20 Thread Cheryl Sabella

Cheryl Sabella added the comment:

Thanks, Terry!  I'll take a look at 30290.  No need to start with colorizer; it 
was in this ticket so I referenced it more for convenience than anything.

--

___
Python tracker 

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



[issue23674] super() documentation isn't very clear

2017-05-20 Thread Cheryl Sabella

Cheryl Sabella added the comment:

Thank you for pointing out those other links.  For me, they all tie together 
because I was originally trying to figure out why the data model page defined 
`super(B, obj).m()` instead of just `super().m()`.  It seems that the zero 
argument super is preferred, so I was trying to understand when to use the 
other form.  I didn't intend to question whether the docs needed to be 
rewritten.

--

___
Python tracker 

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



[issue30413] Add fnmatch.filter_false function

2017-05-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Yes, it does so only if normalize_case is True. Currently fnmatch.filter() 
returns non-normalized names.

--

___
Python tracker 

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



[issue30388] ndbm can't iterate through values on OS X

2017-05-20 Thread Ned Deily

Ned Deily added the comment:

Can you provide a complete example of how to reproduce the behavior you are 
seeing?  Ideally, it would include producing the shelve object.  Also, please 
provide the output of this command:

otool -L $(python3.6 -c 'import _dbm;print(_dbm.__file__)')

--

___
Python tracker 

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



[issue30413] Add fnmatch.filter_false function

2017-05-20 Thread Wolfgang Maier

Wolfgang Maier added the comment:

Does it? I thought it does so only if normalize_case is True.
Did I miss something?

--

___
Python tracker 

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



[issue30413] Add fnmatch.filter_false function

2017-05-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Your patch makes filter() returning normalized names. This may be not what is 
expected.

--

___
Python tracker 

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



[issue27945] Various segfaults with dict

2017-05-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you for your patches Duane and Tim. Thank you for your very detailed 
report that allow writing these patches tehybel.

I excluded changes in dict.fromkeys() since they look unnecessary for this 
issue after fixing insertdict(). There are other reasons for adding these 
changes (this makes the behavior with exact dicts and sets and their subclasses 
more consistent), but this is other issue. There are also reasons for not 
adding them.

We need to check also the set implementation whether it is vulnerable to 
similar issues.

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



[issue30413] Add fnmatch.filter_false function

2017-05-20 Thread Wolfgang Maier

Wolfgang Maier added the comment:

Hi,
seems I had the same thoughts as you, Steven. I had started working on a patch 
independently yesterday, but after making my changes to fnmatch itself, I found 
I had too many other things to do to address unittests and doc changes to turn 
this into a real patch - so thank you for spending time on all of this.
I just downloaded your patch and merged it with mine because I think my version 
of fnmatch.py may be simpler and slightly faster (though like you I didn't run 
performance tests). Feel free to do whatever you like with this alternate 
version - it's not that there is much new in it to take credit for :)

Another thing I noted: fnmatch takes a rather unusual approach to determine 
whether normcase is NOP or not. It imports posixpath only to see if it is the 
same as os.path. That looks pretty weird and wasteful to me (especially if you 
are running this on Windows and are effectively importing posixpath just for 
fun then). I think it would be better to just check os.name instead (like 
pathlib does for example). I moved the corresponding check to the top of the 
module to make this easier to address, should that be of interest. I'm also 
using the result of the check in fnmatch.fnmatch because I don't see any reason 
why you wouldn't want to benefit from it there as well.

--
nosy: +wolma
Added file: http://bugs.python.org/file46880/filterfalse.alternate_patch

___
Python tracker 

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



[issue27945] Various segfaults with dict

2017-05-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:


New changeset e6a0b5982973e64b9fa28e5e3e54eb8c47882780 by Serhiy Storchaka in 
branch '2.7':
[2.7] bpo-27945: Fixed various segfaults with dict. (GH-1657) (#1681)
https://github.com/python/cpython/commit/e6a0b5982973e64b9fa28e5e3e54eb8c47882780


--

___
Python tracker 

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



[issue30245] possible overflow when organize struct.pack_into error message

2017-05-20 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
components: +Extension Modules
stage: needs patch -> patch review

___
Python tracker 

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



[issue30245] possible overflow when organize struct.pack_into error message

2017-05-20 Thread Yuan Liu

Changes by Yuan Liu :


--
pull_requests: +1777

___
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-20 Thread STINNER Victor

STINNER Victor added the comment:

I'm fine with always using unsigned long long. I don't think that it's even
possible to measure the perf difference and if it's doable, I expect don't
expect it to be significant... especially compared to the cost of the stat
() syscall!

Well, most computers are 64-bit. Even smartphones, no?

--

___
Python tracker 

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



[issue27945] Various segfaults with dict

2017-05-20 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
pull_requests: +1776

___
Python tracker 

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



[issue30362] Launcher add list and list with paths options

2017-05-20 Thread Eryk Sun

Eryk Sun added the comment:

I'm -0 on the "-0" option, but I think printing the list of registered Python 
installations would be useful in the --help text and when the launcher fails to 
find a requested version.

--
nosy: +eryksun

___
Python tracker 

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



[issue30403] Running extension modules using -m switch

2017-05-20 Thread Nick Coghlan

Nick Coghlan added the comment:

Yep, that's the kind of thing we'd like to make possible.

--

___
Python tracker 

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



[issue30413] Add fnmatch.filter_false function

2017-05-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

In general LGTM. I left few minor comments on Rietveld. Needed the versionadded 
directive, Misc/NEWS and What's New entries.

But shouldn't the new function have name "filterfalse" for parallel with 
itertools.filterfalse? And this would better match the style of the fnmatch 
module, fnmatchcase doesn't contain an underscore.

Tests for fnmatch.filter are too poor. I think we should add more tests (this 
is other issue).

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



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

2017-05-20 Thread Xavier de Gaye

Xavier de Gaye added the comment:

Good point.
PyLong_FromLong() is faster than PyLong_FromLongLong(), IMO the fastest should 
be used when it is possible.
PyLong_FromUnsignedLong() and PyLong_FromUnsignedLongLong() are almost 
identical, they implement the same algorithm. The first one uses unsigned long 
(on the stack and for a register) while the other uses unsigned long long, so 
the difference in performance may be in the order of nano seconds on current 
processors. Should only PyLong_FromUnsignedLongLong() be used then or should 
this be left as is for consistency with the handling of PyLong_FromLong() ?

Another point (not related) is that the d_ino member of the DirEntry structure 
is of type ino_t which is unsigned and PR 1666 should be corrected to use 
unsigned instead in the last modifications made by the PR in 
os_DirEntry_inode_impl(). I will push this change when a decision has been 
taken on the point raised by Martin.

--

___
Python tracker 

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



[issue20751] Misleading descriptor protocol documentation: direct call, super binding

2017-05-20 Thread Mark Lawrence

Changes by Mark Lawrence :


--
nosy:  -BreamoreBoy

___
Python tracker 

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



[issue30413] Add fnmatch.filter_false function

2017-05-20 Thread Steven D'Aprano

New submission from Steven D'Aprano:

There has been some discussion on Python-Ideas about adding 
fnmatch.filter_false to complement filter, for when you want to ignore matching 
files rather than non-matching ones.

https://mail.python.org/pipermail/python-ideas/2017-May/045694.html

I don't believe there have been any strong objections, and work-arounds have a 
considerable performance penalty (according to the OP, I have not confirmed 
that).

Here's a patch which refactors filter and adds filter_false.

Sorry I haven't got my head around the brave new world on Github, so I'm going 
old school here with a diff :-)

--
files: filterfalse.diff
keywords: patch
messages: 294029
nosy: steven.daprano
priority: normal
severity: normal
status: open
title: Add fnmatch.filter_false function
type: enhancement
versions: Python 3.7
Added file: http://bugs.python.org/file46879/filterfalse.diff

___
Python tracker 

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



[issue9584] fnmatch, glob: Allow curly brace expansion

2017-05-20 Thread Steven D'Aprano

Changes by Steven D'Aprano :


--
nosy: +steven.daprano

___
Python tracker 

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



[issue30412] mailbox : add option to prevent platform EOL conversion

2017-05-20 Thread adder

New submission from adder:

The mailbox module will actively convert EOL format from the input mailbox, 
towards the EOL convention of the platform it is running on.

This is wrong.

If the mailbox originates from the same platform, as the code is executing on, 
it is an unnecessary conversion.
If the mailbox originates from a different platform, as the code is executing 
on, it is an incorrect conversion.

In general, it is best to be EOL preserving.

Please consider a solution which will be backwards compatible, by having an 
option when opening a mailbox to prevent EOL translations, which defaults to 
the current behaviour of EOL conversion.
That will prevent legacy code from breaking.

--
components: Library (Lib)
messages: 294028
nosy: adder
priority: normal
severity: normal
status: open
title: mailbox : add option to prevent platform EOL conversion
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



[issue19495] context manager for measuring duration of blocks of code

2017-05-20 Thread irdb

Changes by irdb :


--
nosy: +irdb

___
Python tracker 

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



[issue8704] cgitb sends a bogus HTTP header if the app crashes before finishing headers

2017-05-20 Thread Артур Клесун

Артур Клесун added the comment:

Apache started strict check of headers ch
aracters to be valid recently. That causes it fail on "<--: spam".

```
[Sat May 20 13:09:23.056673 2017] [http:error] [pid 26379] [client 
12.34.567.41:60988] AH02429: Response header name 

[issue23674] super() documentation isn't very clear

2017-05-20 Thread Martin Panter

Martin Panter added the comment:

Cheryl: see also Issue 25777 and Issue 20751, both about the “super binding” 
under Invoking Descriptors.

Raymond: if you want to just pick parts of my patch, go for it. But I don’t 
understand your concern about explaining the MRO. I think it is important to 
explain which base classes are skipped, and which are searched. It is not just 
the type/subclass (super.__thisclass__) entry in the MRO that is skipped; this 
parameter determines the starting point, so the preceding entries are also 
skipped.

Another problem with referring to “getattr” is that it checks for instance 
attributes and custom __getattr__ and __getattribute__ implementations, but I 
don’t think “super” does any of that.

Looking at my patch now, I would propose that the exception message only be 
changed in the current (3.7) branch.

--

___
Python tracker 

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



[issue30411] git doesn't support "-C" args under 1.8.5 occurs in configure.ac

2017-05-20 Thread Roundup Robot

Changes by Roundup Robot :


--
pull_requests: +1775

___
Python tracker 

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



[issue27945] Various segfaults with dict

2017-05-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:


New changeset 564398af6ccb34d0db8b6e2537830eca285689e5 by Serhiy Storchaka in 
branch '3.6':
[3.6] bpo-27945: Fixed various segfaults with dict. (GH-1657) (#1677)
https://github.com/python/cpython/commit/564398af6ccb34d0db8b6e2537830eca285689e5


--

___
Python tracker 

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



[issue27945] Various segfaults with dict

2017-05-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:


New changeset 2f7f533cf6fb57fcedcbc7bd454ac59fbaf2c655 by Serhiy Storchaka in 
branch '3.5':
[3.5] bpo-27945: Fixed various segfaults with dict. (GH-1657) (#1678)
https://github.com/python/cpython/commit/2f7f533cf6fb57fcedcbc7bd454ac59fbaf2c655


--

___
Python tracker 

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



[issue30411] git doesn't support "-C" args under 1.8.5 occurs in configure.ac

2017-05-20 Thread Roundup Robot

Changes by Roundup Robot :


--
pull_requests: +1774

___
Python tracker 

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



[issue27945] Various segfaults with dict

2017-05-20 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
pull_requests: +1773

___
Python tracker 

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



[issue27945] Various segfaults with dict

2017-05-20 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
pull_requests: +1772

___
Python tracker 

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



[issue20751] Misleading descriptor protocol documentation: direct call, super binding

2017-05-20 Thread Martin Panter

Martin Panter added the comment:

Lower-case “a” is defined at the top of the list: “The starting point . . . is 
‘a.x’.” The last entry may fit in better if it was written “If binding to an 
instance of ‘super’ ”.

The problem with the m() call is also mentioned in Issue 25777, about the 
descriptor how-to.

Issue 12077 seems to be largely about the __get__ signature.

--
dependencies: +Harmonizing descriptor protocol documentation
nosy: +martin.panter, rhettinger
stage:  -> needs patch
title: Misleading examples in the descriptor protocol documentation -> 
Misleading descriptor protocol documentation: direct call, super binding
versions: +Python 2.7, Python 3.6, Python 3.7 -Python 3.4

___
Python tracker 

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



[issue27945] Various segfaults with dict

2017-05-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:


New changeset 753bca3934a7618a4fa96e107ad1c5c18633a683 by Serhiy Storchaka in 
branch 'master':
bpo-27945: Fixed various segfaults with dict. (#1657)
https://github.com/python/cpython/commit/753bca3934a7618a4fa96e107ad1c5c18633a683


--

___
Python tracker 

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



[issue30411] git doesn't support "-C" args under 1.8.5 occurs in configure.ac

2017-05-20 Thread Yuan Liu

New submission from Yuan Liu:

git doesn't support "-C" args under 1.8.5 occurs in configure.ac

as I noticed from git release notes in 1.8.5: 

 * Just like "make -C ", "git -C  ..." tells Git
   to go there before doing anything else.

So we should have some conditional statements in configure.ac around git 
checkpoint, otherwise we got error message which is :

Unknown option: -C
usage: git [--version] [--help] [-c name=value]
   [--exec-path[=]] [--html-path] [--man-path] [--info-path]
   [-p|--paginate|--no-pager] [--no-replace-objects] [--bare]
   [--git-dir=] [--work-tree=] [--namespace=]
[]

--
messages: 294021
nosy: Yuan Liu
priority: normal
severity: normal
status: open
title: git doesn't support "-C" args under 1.8.5 occurs in configure.ac
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



[issue30410] Documentation for sys.stdout encoding does not reflect the new Windows behavior in Python 3.6+

2017-05-20 Thread Paul Moore

New submission from Paul Moore:

The documentation for the encoding of sys.stdin/out/err (see 
https://docs.python.org/3.6/library/sys.html#sys.stdout) does not reflect the 
change in Python 3.6 on Windows to use the console Unicode APIs, and hence 
UTF-8 for the encoding.

--
assignee: docs@python
components: Documentation, Windows
keywords: easy
messages: 294020
nosy: docs@python, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Documentation for sys.stdout encoding does not reflect the new Windows 
behavior in Python 3.6+
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



[issue30403] Running extension modules using -m switch

2017-05-20 Thread Terry J. Reedy

Terry J. Reedy added the comment:

So a use case might be that someone could compile all the stdlib .py modules 
with cython, as they are, without touching the code, and have the result be a 
drop-in replacement.  I'd like that to be possible.

--

___
Python tracker 

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



[issue30378] SysLogHandler does not support IPv6 destinations

2017-05-20 Thread Xiang Zhang

Changes by Xiang Zhang :


--
nosy: +vinay.sajip, xiang.zhang

___
Python tracker 

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



[issue30378] SysLogHandler does not support IPv6 destinations

2017-05-20 Thread Xiang Zhang

Changes by Xiang Zhang :


--
pull_requests: +1771

___
Python tracker 

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



[issue25794] __setattr__ does not always overload operators

2017-05-20 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


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

___
Python tracker 

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



[issue25794] __setattr__ does not always overload operators

2017-05-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:


New changeset 4a86fe9d3f5e7af6f019ae22536eec228f04e22e by Serhiy Storchaka in 
branch '3.5':
[3.5] bpo-25794: Fix `type.__setattr__()` for non-interned attribute names. 
(GH-1652) (#1674)
https://github.com/python/cpython/commit/4a86fe9d3f5e7af6f019ae22536eec228f04e22e


--

___
Python tracker 

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



[issue25794] __setattr__ does not always overload operators

2017-05-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:


New changeset 193f7e094f070cecbc6faea6dffafb80ea9e7536 by Serhiy Storchaka in 
branch '3.6':
[3.6] bpo-25794: Fix `type.__setattr__()` for non-interned attribute names. 
(GH-1652) (#1673)
https://github.com/python/cpython/commit/193f7e094f070cecbc6faea6dffafb80ea9e7536


--

___
Python tracker 

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



[issue30403] Running extension modules using -m switch

2017-05-20 Thread Nick Coghlan

Nick Coghlan added the comment:

As a high level overview of the general idea: we'd like it to be almost 
entirely transparent to the end user as to whether a particular module is 
implemented as normal Python source code, a precompiled bytecode/wordcode file, 
or a precompiled Cython extension module (or equivalent).

At the moment, this is pretty close to being true for source code vs 
precompiled bytecode/wordcode when it comes to both imports and execution as a 
script. The main missing piece there is to implement source code maps for 
generating more informative tracebacks given only the precompiled form (perhaps 
by borrowing JavaScript's "source map" concept)

For extension modules, the original multi-phase initialisation PEP got this 
pretty close to being true for the import case - things like reload() can now 
work much the same way they do for pure Python and pyc files if a module author 
(or module generation tool) cares to make it so.

However, we don't yet support the use of extension modules as scripts, neither 
for direct execution, nor via the `-m` switch, so it's impossible for a tool 
like Cython to handle that transparently - if a module exposes functionality 
via -m, then migrating it directly to Cython will break than behaviour.

--

___
Python tracker 

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



[issue25794] __setattr__ does not always overload operators

2017-05-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:


New changeset e9f9b042781e3cb480315860bcdf7b7d22cba0f8 by Serhiy Storchaka in 
branch '2.7':
[2.7] bpo-25794: Fix `type.__setattr__()` for non-interned or unicode attribute 
names. (GH-1652) (#1675)
https://github.com/python/cpython/commit/e9f9b042781e3cb480315860bcdf7b7d22cba0f8


--

___
Python tracker 

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



[issue30362] Launcher add list and list with paths options

2017-05-20 Thread Steve Barnes

Steve Barnes added the comment:

@terry.reedy - Very good points and I like the shortness of -0 note that there 
is already an accepted change to allow -x.y-64 to specifically require the 64 
bit versions so we don't need the complex logic to distinguish cases where -x.y 
will run 32 bit because there is no 64 bit verses -x.y will run 64 bit and 
-x.y-32 will run 32 bit so I haven't implemented that complex logic.

I have put a tab between the run flag and the path as I find that is easier to 
detect than some number of spaces.

Found that I needed to move the test for -0 nearer the top as 0 is a 
potentially valid version specifier, (isdigit).

Also modified the "not found" message to mention -0 as an option for discovery.

--

___
Python tracker 

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



[issue17188] Document 'from None' in raise statement doc.

2017-05-20 Thread Terry J. Reedy

Terry J. Reedy added the comment:

The double listing seems to be a glitch.

Either someone else does backport or online doc change waits until I can do it.

--
assignee: docs@python -> terry.reedy
stage: patch review -> backport needed
versions: +Python 3.6, Python 3.7 -Python 3.4, Python 3.5

___
Python tracker 

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



[issue23674] super() documentation isn't very clear

2017-05-20 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Martin, can we just fix the signature here.  It is not the purpose of the super 
docs explain the MRO (that is a feature of all new-style classes, super() is 
just something that hops to the next in the chain) or to be a tutorial.  I 
would like to keep the rest of the docs mostly as-is.  These docs have already 
been refined multiple times and proven themselves usable for a lot of user).   
The only part that wasn't previously edited was the parameter names for the 
signature.

--

___
Python tracker 

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



[issue17188] Document 'from None' in raise statement doc.

2017-05-20 Thread Terry J. Reedy

Terry J. Reedy added the comment:


New changeset 763557eac06ba60d7c5133e4f80df8870d8f917e by terryjreedy 
(csabella) in branch 'master':
bpo-17188: DOC: Document 'from None' in raise statement (#1671)
https://github.com/python/cpython/commit/763557eac06ba60d7c5133e4f80df8870d8f917e


--

___
Python tracker 

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



[issue25794] __setattr__ does not always overload operators

2017-05-20 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
pull_requests: +1770

___
Python tracker 

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



[issue30409] locale.getpreferredencoding doesn't return result

2017-05-20 Thread Decorater

Changes by Decorater :


Added file: http://bugs.python.org/file46878/suggested_change.diff

___
Python tracker 

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



[issue30408] [defaultdict] default_factory should accept a "key" default parameter (which can be passed my __missing__)

2017-05-20 Thread Nam

Nam added the comment:

Sure, thanks Raymond and Steven for your thoughts.

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



[issue30409] locale.getpreferredencoding doesn't return result

2017-05-20 Thread STINNER Victor

STINNER Victor added the comment:

> ok,  is this a valid fix then?

Yes, totally. Sorry, ignore my first comment.

--

___
Python tracker 

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



[issue30409] locale.getpreferredencoding doesn't return result

2017-05-20 Thread Sean McCully

Sean McCully added the comment:

ok,  is this a valid fix then?

On Saturday, May 20, 2017 1:34 AM, STINNER Victor  
wrote:

STINNER Victor added the comment:

> In fact, it seems like I introduced a regression in bpo-6393, commit 
> 94a3694c3dda97e3bcb51264bf47d948c5424d84.

I backported this commit, but I didn't notice the bug in the code... In fact, 
this commit was followed by the commit 6a448d4c2eac16af4c451b43c6dc46cf287b1671.

--

___
Python tracker 

___

--

___
Python tracker 

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