[issue30981] IDLE: Add config dialog font page tests

2017-07-20 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
pull_requests: +2844

___
Python tracker 

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



[issue28523] Idlelib.configdialog: use 'color' insteadof 'colour'

2017-07-20 Thread Terry J. Reedy

Changes by Terry J. Reedy :


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



[issue28523] Idlelib.configdialog: use 'color' insteadof 'colour'

2017-07-20 Thread Terry J. Reedy

Terry J. Reedy added the comment:


New changeset ac5c1e2ea311d11714f89476c86936f9388d19a4 by Terry Jan Reedy in 
branch '3.6':
[3.6] bpo-28523: IDLE: Use 'color' instead of 'colour'. (GH-2787) (#2791)
https://github.com/python/cpython/commit/ac5c1e2ea311d11714f89476c86936f9388d19a4


--

___
Python tracker 

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



[issue30964] Mention ensurepip in package installation docs

2017-07-20 Thread nicholas kobald

Changes by nicholas kobald :


--
pull_requests: +2843

___
Python tracker 

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



[issue30964] Mention ensurepip in package installation docs

2017-07-20 Thread nicholas kobald

Changes by nicholas kobald :


--
pull_requests: +2842

___
Python tracker 

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



[issue28523] Idlelib.configdialog: use 'color' insteadof 'colour'

2017-07-20 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
pull_requests: +2841

___
Python tracker 

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



[issue28523] Idlelib.configdialog: use 'color' insteadof 'colour'

2017-07-20 Thread Terry J. Reedy

Terry J. Reedy added the comment:


New changeset a54a8f188a803cd41bdc8758c10d34ba3328c566 by Terry Jan Reedy in 
branch 'master':
bpo-28523: IDLE: Use 'color' instead of 'colour'. (#2787)
https://github.com/python/cpython/commit/a54a8f188a803cd41bdc8758c10d34ba3328c566


--

___
Python tracker 

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



[issue30978] str.format_map() silences exceptions in __getitem__

2017-07-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Yet one consequence: this swallows KeyboardInterrupt and converts it to 
KeyError.

--
components: +Interpreter Core, Unicode
nosy: +ezio.melotti, haypo, serhiy.storchaka
stage:  -> patch review
versions: +Python 3.6 -Python 3.3, Python 3.4

___
Python tracker 

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



[issue30978] str.format_map() silences exceptions in __getitem__

2017-07-20 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
pull_requests: +2840

___
Python tracker 

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



[issue30964] Mention ensurepip in package installation docs

2017-07-20 Thread Nick Coghlan

Changes by Nick Coghlan :


--
stage: needs patch -> backport needed

___
Python tracker 

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



[issue30959] Constructor signature is duplicated in the help of namedtuples

2017-07-20 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Pydoc isn't the only tool for looking at docstrings.

I'm worried that you're systematically killing-off useful docstrings because of 
a world view that all tools will use pydoc and signatures.

As a result, IDLE's tooltips are now useless (this comes up every single day 
when I teach python courses).  BPython is thrown-off, etc.

Here's one of many problem examples of the docstring losing information:


Python 3.4.4 (v3.4.4:737efcadf5a6, Dec 19 2015, 20:38:52)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> print(sorted.__doc__)
sorted(iterable, key=None, reverse=False) --> new sorted list

>>> print(sorted.__doc__)
Return a new list containing all items from the iterable in ascending order.

A custom key function can be supplied to customize the sort order, and the
reverse flag can be set to request the result in descending order.

--

___
Python tracker 

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



[issue30964] Mention ensurepip in package installation docs

2017-07-20 Thread Nick Coghlan

Nick Coghlan added the comment:


New changeset b3527bfefd7a0188d43a2d7515ac6addd97a8202 by Nick Coghlan 
(Nicholas) in branch 'master':
bpo-30964: Mention ensurepip in package installation docs (GH-2786)
https://github.com/python/cpython/commit/b3527bfefd7a0188d43a2d7515ac6addd97a8202


--

___
Python tracker 

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



[issue30780] IDLE: configdialog - add tests for ConfigDialog GUI.

2017-07-20 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
dependencies: +IDLE: Add config dialog font page tests

___
Python tracker 

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



[issue30466] Tutorial doesn't explain the use of classes

2017-07-20 Thread Mariatta Wijaya

Changes by Mariatta Wijaya :


--
resolution:  -> fixed
stage: backport needed -> resolved
status: open -> closed

___
Python tracker 

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



[issue30466] Tutorial doesn't explain the use of classes

2017-07-20 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:


New changeset ef4231adb7aa6b323c94e854ac3dc3bebc841115 by Mariatta (Trey 
Hunner) in branch '3.6':
bpo-30466: Add brief explanation of classes to tutorial (GH-1804) (GH-2700)
https://github.com/python/cpython/commit/ef4231adb7aa6b323c94e854ac3dc3bebc841115


--

___
Python tracker 

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



[issue24776] IDLE: Improve config dialog font change user interface

2017-07-20 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I decided to rearrange page #24776 before changing sample #13802.

--
dependencies: +IDLE: Add config dialog font page tests -IDLE Prefernces/Fonts: 
use multiple alphabets in examples

___
Python tracker 

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



[issue13802] IDLE Prefernces/Fonts: use multiple alphabets in examples

2017-07-20 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I decided to rearrange page #24776 before changing sample #13802.

--
dependencies: +IDLE: Improve config dialog font change user interface

___
Python tracker 

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



[issue30981] IDLE: Add config dialog font page tests

2017-07-20 Thread Terry J. Reedy

New submission from Terry J. Reedy:

I am working on this.
* Change 'test_highlight_sample' to 'highlight_sample.
* Change 'set_font_sample()' to 'set_samples()', since it also changes 
highlight_sample, and test.
* Add gui event test for 'bold' checkbutton.
* Perhaps add gui event test for size pulldown, or wait until replace.
* Test tab setting or wait until replace.

Do this before #24776 to redo page and #13802 to redo sample

--

___
Python tracker 

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



[issue30870] IDLE: configdialog/fonts: change font when select by key up/down

2017-07-20 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
resolution:  -> fixed
stage: test needed -> resolved
status: open -> closed

___
Python tracker 

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



[issue30870] IDLE: configdialog/fonts: change font when select by key up/down

2017-07-20 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I am closing this as basically complete.  I opened #30981 to add and perhaps 
complete font page tests.

--

___
Python tracker 

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



[issue30981] IDLE: Add config dialog font page tests

2017-07-20 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
assignee: terry.reedy
components: IDLE
nosy: terry.reedy
priority: normal
severity: normal
stage: needs patch
status: open
title: IDLE: Add config dialog font page tests
type: enhancement
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



[issue30968] test_get_font (idlelib.idle_test.test_config.IdleConfTest) failure on x86 Windows7 3.x

2017-07-20 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Thanks.  I will see what that does.

--

___
Python tracker 

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



[issue30968] test_get_font (idlelib.idle_test.test_config.IdleConfTest) failure on x86 Windows7 3.x

2017-07-20 Thread Louie Lu

Louie Lu added the comment:

For the problem about the small name in git log Author, if you want to changed 
it, it will need to setup at https://github.com/settings/profile and update the 
first column "Name".

I think this is because we merged on GitHub, and GitHub ignores the git author 
but use GitHub account's name (if this didn't setup, it will fallback to GitHub 
account). I have some small name with "mlouielu" when I changed to this new 
account.

--

___
Python tracker 

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



[issue30977] reduce uuid.UUID() memory footprint

2017-07-20 Thread Nir Soffer

Nir Soffer added the comment:

This saves memory, but using str(uuid.uuid4()) requires even less memory.
If you really want to save memory, you can keep the uuid.uuid4().int.

Can you explain someone would like to have 100 uuid objects, instead of 
100 strings? What is the advantage of keeping UUID objects around?

--
nosy: +Nir Soffer

___
Python tracker 

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



[issue30822] Python implementation of datetime module is not being tested correctly.

2017-07-20 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 287c5594edc1ca08db64d1f4739cc36bfe75ae75 by Victor Stinner 
(Utkarsh Upadhyay) in branch 'master':
bpo-30822: Fix testing of datetime module. (#2530) (#2783)
https://github.com/python/cpython/commit/287c5594edc1ca08db64d1f4739cc36bfe75ae75


--

___
Python tracker 

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



[issue30822] Python implementation of datetime module is not being tested correctly.

2017-07-20 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 80ebc438ed377f8c6491e8887425526c6787c0e7 by Victor Stinner in 
branch '2.7':
bpo-30822: regrtest: fix -u extralargefile (#2788)
https://github.com/python/cpython/commit/80ebc438ed377f8c6491e8887425526c6787c0e7


--

___
Python tracker 

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



[issue30931] Race condition in asyncore may access the wrong dispatcher

2017-07-20 Thread STINNER Victor

Changes by STINNER Victor :


--
versions:  -Python 3.3, Python 3.4

___
Python tracker 

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



[issue30980] Calling asyncore.file_wrapper.close twice may close unrelated file descriptor

2017-07-20 Thread STINNER Victor

Changes by STINNER Victor :


--
versions:  -Python 3.3, Python 3.4

___
Python tracker 

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



[issue30980] Calling asyncore.file_wrapper.close twice may close unrelated file descriptor

2017-07-20 Thread Nir Soffer

Changes by Nir Soffer :


--
pull_requests: +2839

___
Python tracker 

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



[issue30979] the winapi fails to run shortcuts (because considers a shortcut not a valid Win32App)

2017-07-20 Thread Eryk Sun

Eryk Sun added the comment:

subprocess.Popen calls WinAPI CreateProcess, which can execute PE/COFF 
executables and .BAT/.CMD batch scripts. It doesn't know anything about .LNK 
shell shortcuts. If CreateProcess fails, a Windows shell (e.g. CMD or 
PowerShell) tries ShellExecuteEx, which knows how to open a .LNK file. You can 
use shell=True for this in Python.

Directly supporting ShellExecuteEx would be a major enhancement. It would 
probably require a new keyword-only parameter, or at least a sentinel value for 
the existing `shell` parameter.

--
nosy: +eryksun
versions:  -Python 2.7, Python 3.3, Python 3.4, Python 3.5

___
Python tracker 

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



[issue30980] Calling asyncore.file_wrapper.close twice may close unrelated file descriptor

2017-07-20 Thread Nir Soffer

New submission from Nir Soffer:

Commit 4d4c69dc35154a9c21fed1b6b4088e741fbc6ae6 added protection for double 
close in file_wrapper.close, but the test did not consider that fact that 
file_wrapper is dupping the file descriptor, making the test ineffective.

>>> fd1, fd2 = os.pipe()
>>> f = asyncore.file_wrapper(fd1)
>>> os.close(f.fd)
>>> f.close()
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib64/python3.5/asyncore.py", line 621, in close
os.close(self.fd)
OSError: [Errno 9] Bad file descriptor
>>> f.fd
4
>>> fd3, fd4 = os.pipe()
>>> fd3
4
>>> f.close()
>>> os.close(fd3)
Traceback (most recent call last):
  File "", line 1, in 
OSError: [Errno 9] Bad file descriptor

f.close() closed an unrelated file descriptor.

--
messages: 298753
nosy: Nir Soffer, haypo
priority: normal
severity: normal
status: open
title: Calling asyncore.file_wrapper.close twice may close unrelated file 
descriptor
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



[issue30822] Python implementation of datetime module is not being tested correctly.

2017-07-20 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +2838

___
Python tracker 

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



[issue30979] the winapi fails to run shortcuts (because considers a shortcut not a valid Win32App)

2017-07-20 Thread Bernát Gábor

New submission from Bernát Gábor:

Although python27.exe.lnk is callable from any command line tool, with any of 
its arguments the subprocess module thinks it's not a valid Win32 application.

Proof, let there be python27.exe.lnk be a shortcut to python.exe:

C:\Python27
λ ls python*
python.exe*  python27.exe.lnk*  pythonw.exe*

λ python.exe -c "import sys; print(sys.version)"
2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:42:59) [MSC v.1500 32 bit (Intel)]

C:\Python27
λ python.exe -c "import subprocess; print(subprocess.call(['./python.exe', 
'-c', '\"import sys; print(sys.version)\"']))"
0

C:\Python27
λ python27.exe -c "import subprocess; 
print(subprocess.call(['./python27.exe.lnk', '-c', '\"import sys; 
print(sys.version)\"']))"
Traceback (most recent call last):
  File "", line 1, in 
  File "C:\Python27\lib\subprocess.py", line 168, in call
return Popen(*popenargs, **kwargs).wait()
  File "C:\Python27\lib\subprocess.py", line 390, in __init__
errread, errwrite)
  File "C:\Python27\lib\subprocess.py", line 640, in _execute_child
startupinfo)
WindowsError: [Error 193] %1 is not a valid Win32 application

--
components: Windows
messages: 298752
nosy: Bernát Gábor, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: the winapi fails to run shortcuts (because considers a shortcut not a 
valid Win32App)
type: enhancement
versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7

___
Python tracker 

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



[issue25988] collections.abc.Indexable

2017-07-20 Thread Guido van Rossum

Guido van Rossum added the comment:

At least one use of Indexable (by whatever name, but this rolls off the tongue 
the easiest) would be the metaclass in typing.py that allows one to write 
List[int] -- there's no containter here!

The "drowning out" seems purely subjective -- perhaps if you order the contents 
of the module alphabetically you won't get much insight, but the docs should 
use a better organizing principle than that. (After all alphabetization was 
invented as a crutch for searching. :-)

--

___
Python tracker 

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



[issue30978] str.format_map() silences exceptions in __getitem__

2017-07-20 Thread Eric V. Smith

Changes by Eric V. Smith :


--
nosy: +eric.smith

___
Python tracker 

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



[issue28523] Idlelib.configdialog: use 'color' insteadof 'colour'

2017-07-20 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
pull_requests: +2837

___
Python tracker 

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



[issue18875] Idle: Auto insertion of the closing parens, brackets, and braces

2017-07-20 Thread Charles Wohlganger

Charles Wohlganger added the comment:

I've uploaded a test file and updated ParenClose.

--
Added file: http://bugs.python.org/file47030/ParenClose.py

___
Python tracker 

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



[issue18875] Idle: Auto insertion of the closing parens, brackets, and braces

2017-07-20 Thread Charles Wohlganger

Changes by Charles Wohlganger :


Added file: http://bugs.python.org/file47029/test_parenclose.py

___
Python tracker 

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



[issue30917] IDLE: Add idlelib.config.IdleConf unittest

2017-07-20 Thread Terry J. Reedy

Terry J. Reedy added the comment:

PR2769 is the fix for master for test_get_font for #30968.  The listing here is 
a cross-reference.  The fix was incorporated into the 3.6 backport PR2753 
before it was merged.

This issue is closed, having increased coverage from 46% to 96%.  Further work 
on config and test config should be new issues building on top of this one.

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



[issue29284] Include thread_name_prefix in the concurrent.futures.ThreadPoolExecutor example 17.4.2.1

2017-07-20 Thread Cheryl Sabella

Cheryl Sabella added the comment:

Hi John,

Would you be able to make a GitHub pull request for your change?  Since CPython 
development has moved to GitHub, you may have a better chance of a review with 
a PR.

--
nosy: +csabella

___
Python tracker 

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



[issue30978] str.format_map() silences exceptions in __getitem__

2017-07-20 Thread Akuli

New submission from Akuli:

Example:

class BrokenMapping:
def __getitem__(self, key):
1/0

# this silences the ZeroDivisionError and raises KeyError('world')
'hello {world}'.format_map(BrokenMapping())

I have tried this on several different CPython versions on Ubuntu 14.04
(including the latest Python 3.7.0a0 from github) and they all do this.
PyPy passes the ZeroDivisionError through correctly.

--
messages: 298747
nosy: Akuli
priority: normal
severity: normal
status: open
title: str.format_map() silences exceptions in __getitem__
type: behavior
versions: Python 3.3, Python 3.4, Python 3.5, Python 3.7

___
Python tracker 

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



[issue30973] Regular expression "hangs" interpreter

2017-07-20 Thread Matthew Barnett

Matthew Barnett added the comment:

The regex module is much better in this respect, but it's not foolproof. With 
this particular example it completes quickly.

--

___
Python tracker 

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



[issue30964] Mention ensurepip in package installation docs

2017-07-20 Thread nicholas kobald

Changes by nicholas kobald :


--
pull_requests: +2836

___
Python tracker 

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



[issue30976] multiprocessing.Process.is_alive can show True for dead processes

2017-07-20 Thread Mick Phillips

Mick Phillips added the comment:

Yep - apologies, my mistake.

--
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue30576] http.server should support HTTP compression (gzip)

2017-07-20 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I saw the python-ideas post.  I have no experience with http.server, but I just 
read the doc, and know something of our general enhancement policies.  I hope 
these comments help.

There are two questions: Should compression support be added to http.server?  
If so, how?

To me, the purpose of the module is to provide a server and request handlers 
for toy, experimental, and basic production use, whether on a private or the 
public net.  Whatever the case was when the module was written, compression 
strikes me as a basic http feature now.

I agree with Martin that compression does not fit with the current definition 
of SimpleHTTPRequestHandler.  I suggest instead a subclass thereof.  
CompressionHTTPRequestHandler?  ZippyHTTPRequestHandler?  Then add -zip to 
command line options.

If cgi + compression is relevant, a CompressionMixin might be posible, but I 
notice that there has been no suggestion so far that the combination is needed.

I suspect one motivation for adding compression to Simple... is to make it 
default.  I understand the desire to give users something for 'free', but 
changing default behavior usually breaks something somewhere and is therefore 
contrary to our general policy, and I definitely would not break it for this.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue30231] test_imaplib needs a TLS server accepting self-signed certificates

2017-07-20 Thread Ned Deily

Ned Deily added the comment:


New changeset b5f20ea91ec4d9dc7e1c31629903888c651bd02c by Ned Deily (Victor 
Stinner) in branch '3.3':
[3.3] Backport CI config from master and remove skipped imaplib tests (#2481)
https://github.com/python/cpython/commit/b5f20ea91ec4d9dc7e1c31629903888c651bd02c


--
nosy: +ned.deily

___
Python tracker 

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



[issue30964] Mention ensurepip in package installation docs

2017-07-20 Thread Nicholas P Kobald

Nicholas P Kobald added the comment:

Should this section refer to 
https://packaging.python.org/tutorials/installing-packages/#install-pip-setuptools-and-wheel
 as well?

--
nosy: +Nickk

___
Python tracker 

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



[issue30968] test_get_font (idlelib.idle_test.test_config.IdleConfTest) failure on x86 Windows7 3.x

2017-07-20 Thread STINNER Victor

STINNER Victor added the comment:

Terry J. Reedy: I don't understand 'format your name' as there is no formatting 
that I did.

GitHub picks your commits unchanged. Git picks your name from your .gitconfig 
configuration file, global $HOME/.gitconfig or local /.gitconfig.

It's just that I saw "terryjreedy" in your last commit, instead of the usual 
"Terry Jan Reedy".

It's up to you to pick whatever name you want, I was just surprised to see the 
name formatted differently.

> I have no idea about commit message.  The PR title has no extra spaces.  But 
> github does not always copy correctly.

It doesn't matter at all. It's just that I was surprised ;-)

--

___
Python tracker 

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



[issue27099] IDLE: turn builting extensions into regular modules

2017-07-20 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Same place is good for now as testing will be easier.  Moving menu items will 
be a separate issue later.

--

___
Python tracker 

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



[issue30977] reduce uuid.UUID() memory footprint

2017-07-20 Thread Wouter Bolsterlee

Wouter Bolsterlee added the comment:

as a follow-up note, i also experimented with keeping the actual value as a 
bytes object instead of an integer, but that does not lead to less memory being 
used: a 128-bit integer uses less memory than a 16 byte bytes object 
(presumably because PyBytesObject has a cached hash() field and a trailing null 
byte).

--

___
Python tracker 

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



[issue30977] reduce uuid.UUID() memory footprint

2017-07-20 Thread Wouter Bolsterlee

New submission from Wouter Bolsterlee:

memory usage for uuid.UUID seems larger than it has to be. it seems that using 
__slots__ will save around ~100 bytes per instance, which is very significant, 
e.g. when dealing with large sets of uuids (which are often used as "primary 
keys" into external data stores).

uuid.UUID has a __setattr__ that prevents any extra attributes to be
set:

def __setattr__(self, name, value):
raise TypeError('UUID objects are immutable')

...so it seems to me not having __dict__ should not cause any problems?


before (RES column):

>>> import uuid
>>> y = {uuid.uuid4() for _ in range(100)}

  PID USER  PRI  NI  VIRT   RES   SHR S CPU% MEM%   TIME+  Command
23020 wbolster   20   0  315M  253M  7256 S  0.0  1.6  0:04.98 python

with slots:

>>> import uuid
>>> y = {uuid.uuid4() for _ in range(100)}

  PID USER  PRI  NI  VIRT   RES   SHR S CPU% MEM%   TIME+  Command
21722 wbolster   20   0  206M  145M  7348 S  0.0  0.9  0:05.03 python

i will open a pr on github shortly.

--
messages: 298738
nosy: wbolster
priority: normal
severity: normal
status: open
title: reduce uuid.UUID() memory footprint

___
Python tracker 

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



[issue30977] reduce uuid.UUID() memory footprint

2017-07-20 Thread Wouter Bolsterlee

Changes by Wouter Bolsterlee :


--
pull_requests: +2835

___
Python tracker 

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



[issue30968] test_get_font (idlelib.idle_test.test_config.IdleConfTest) failure on x86 Windows7 3.x

2017-07-20 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I will try to look at the first line more carefully before hitting the 2nd 
green button.

--

___
Python tracker 

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



[issue30976] multiprocessing.Process.is_alive can show True for dead processes

2017-07-20 Thread Gareth Rees

Gareth Rees added the comment:

This is a race condition — when os.kill returns, that means that the signal has 
been delivered, but it does not mean that the subprocess has exited yet. You 
can see this by inserting a sleep after the kill and before the liveness check:

print(proc.is_alive())
os.kill(proc.pid, signal.SIGTERM)
time.sleep(1)
print(proc.is_alive())

This (probably) gives the process time to exit. (Presumably the 
psutil.pid_exists() call has a similar effect.) Of course, waiting for 1 second 
(or any amount of time) might not be enough. The right thing to do is to join 
the process. Then when the join exits you know it died.

--
nosy: +g...@garethrees.org

___
Python tracker 

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



[issue30968] test_get_font (idlelib.idle_test.test_config.IdleConfTest) failure on x86 Windows7 3.x

2017-07-20 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I don't understand 'format your name' as there is no formatting that I did.  
Github copies account name and email as they are.

I have no idea about commit message.  The PR title has no extra spaces.  But 
github does not always copy correctly.

--

___
Python tracker 

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



[issue25988] collections.abc.Indexable

2017-07-20 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

Raymond,

> The existence of use ABCs like MutableMapping is being drowned-out by 
> one-trick-ponies.  We're developing an unfavorable ratio of theoretical 
> building blocks versus the practical tools.

Why do you think they are "theoretical"? FWIW, a simple search on GitHub for 
abc.X gives this:
Sequence 322K
Mapping 267K
Iterable 244K
Container 99K
MutableMapping 77K

I don't see any pattern here (although this may be only anecdotal evidence :-)

> Other than a feeling of lightness, I don't think this proposal does anything 
> for us.

This proposal makes more sense (and motivation) in the context of static 
typing, since it is a good way to know how __getitem__ is going to be used -- 
from its static type. Something typed with Subscriptable[int, T] would accept 
both Sequence[T] and Mapping[int, T]. The latter two are  currently 
differentiated by __reversed__ (Sequence is Reversible as opposed to Mapping).

Concerning an invariant that order of iteration is consistent with indexing by 
subsequent integers, I think this can't be checked reliably neither statically, 
nor by any simple runtime isinstance check. For example a subclass can override 
Indexable.__iter__ and break the iteration order. We can still add it, and rely 
on user cooperation.

Anyway, I am not insisting on adding either Subscriptable nor Indexable, but I 
think it is important that these things are discussed in view of PEP 544.

Alternative proposal would be to add Subscriptable and its subclass Indexable 
only to typing as protocols (with some special-casing in type checkers for the 
latter to provide a higher level of contract).
(Concerning the name, I think Enumerable sounds better than Indexable, IIUC the 
idea is to work correctly with enumerate.)

--

___
Python tracker 

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



[issue29284] Include thread_name_prefix in the concurrent.futures.ThreadPoolExecutor example 17.4.2.1

2017-07-20 Thread John Taylor

John Taylor added the comment:

Bump

--

___
Python tracker 

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



[issue30822] Python implementation of datetime module is not being tested correctly.

2017-07-20 Thread Utkarsh Upadhyay

Changes by Utkarsh Upadhyay :


--
pull_requests: +2834

___
Python tracker 

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



[issue30822] Python implementation of datetime module is not being tested correctly.

2017-07-20 Thread STINNER Victor

STINNER Victor added the comment:


New changeset bf3a1e973b49236e6f267cca135d36290568e6a4 by Victor Stinner in 
branch '3.5':
bpo-30822: regrtest: remove tzdata (#2782)
https://github.com/python/cpython/commit/bf3a1e973b49236e6f267cca135d36290568e6a4


--

___
Python tracker 

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



[issue30974] Update os.samefile docstring to match documentation

2017-07-20 Thread R. David Murray

R. David Murray added the comment:

I would take "actual file" as meaning the file the symlink points to, so I'd 
say the documentation matches the implementation according to your description 
of the two.  The current docs actually say "refer to the same file or 
directory", and mention os.stat explicitly, so again I'd say the docs and 
implementation match.

It sounds like what you want is to open a feature request for a samefile 
equivalent that does not follow symlinks.  lsamefile?

We could use this issue for making the docstring match the docs, though.  I 
think the sentence in the docs is short enough to just get copied into the 
docstring.

--
assignee:  -> docs@python
components: +Documentation
nosy: +docs@python, r.david.murray
title: os.samefile / shutil._samefile: following symlinks -> Update os.samefile 
docstring to match documentation
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



[issue28638] Optimize namedtuple creation

2017-07-20 Thread Raymond Hettinger

Raymond Hettinger added the comment:

>  it would be *nice* to not only optimization the creation 
> but also attribute access by name

FWIW, once the property/itemgetter pair are instantiated in the NT class, the 
actual lookup runs through them at C speed (no pure python steps).  There is 
not much fluff here.

--

___
Python tracker 

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



[issue30822] Python implementation of datetime module is not being tested correctly.

2017-07-20 Thread STINNER Victor

STINNER Victor added the comment:

(Oops, I gone too fast in my 3.5 backport. tzdata was only introduced in Python 
3.6, for me it was something older. I wrote a new fix for 3.5, to only add 
extralargefile, but don't add tzdata.)

--

___
Python tracker 

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



[issue25988] collections.abc.Indexable

2017-07-20 Thread Raymond Hettinger

Raymond Hettinger added the comment:

IIRC, the original motivation for ABCs was to differentiate distinct uses of 
__getitem__ (we forever struggled with differentiating sequences from mapping). 
 It seems to me that this proposal is a step backwards.  Other than a feeling 
of lightness, I don't think this proposal does anything for us.  What is point 
of knowing an object is Subscriptable without knowing how it is to be used.

The OP has a sense that Mapping and Sequence are "too heavy" but I think the 
reality that useful classes almost never use __getitem__ in isolation; rather, 
it is part of a small constellation of methods that are typically used 
together.  I would prefer that collections.abc continue to reflect that reality.

Also, I worry that collections.abc is becoming cluttered.  The existence of use 
ABCs like MutableMapping is being drowned-out by one-trick-ponies.  We're 
developing an unfavorable ratio of theoretical building blocks versus the 
practical tools.

--
nosy: +rhettinger

___
Python tracker 

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



[issue30973] Regular expression "hangs" interpreter

2017-07-20 Thread R. David Murray

R. David Murray added the comment:

Right.  We don't try to fix handling these kinds of exponential expressions.  
This is a case of "don't do that" :)

(I don't know if the regex module is better at "handling" this kind of regex 
bug.)

--
nosy: +r.david.murray
resolution:  -> wont fix
stage:  -> resolved
status: open -> closed
type: crash -> behavior

___
Python tracker 

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



[issue30822] Python implementation of datetime module is not being tested correctly.

2017-07-20 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +2833

___
Python tracker 

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



[issue30822] Python implementation of datetime module is not being tested correctly.

2017-07-20 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 645e503ba58086c7f51eda4d025743f2afc05a2a by Victor Stinner in 
branch '3.5':
bpo-30822: Exclude tzdata from regrtest --all (#2775) (#2781)
https://github.com/python/cpython/commit/645e503ba58086c7f51eda4d025743f2afc05a2a


--

___
Python tracker 

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



[issue30822] Python implementation of datetime module is not being tested correctly.

2017-07-20 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 96ef06f3979023fd69ed8796d0b1d5d3ae4d by Victor Stinner in 
branch '3.6':
bpo-30822: Exclude tzdata from regrtest --all (#2775) (#2777)
https://github.com/python/cpython/commit/96ef06f3979023fd69ed8796d0b1d5d3ae4d


--

___
Python tracker 

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



[issue30976] multiprocessing.Process.is_alive can show True for dead processes

2017-07-20 Thread Mick Phillips

New submission from Mick Phillips:

multiprocessing.Process.is_alive() returns True for processes that have been 
killed. See attached for example.

Workaround: also test against psutils.pid_exists.

--
components: Windows
files: alive.py
messages: 298724
nosy: davin, mickp, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: multiprocessing.Process.is_alive can show True for dead processes
versions: Python 2.7, Python 3.5
Added file: http://bugs.python.org/file47028/alive.py

___
Python tracker 

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



[issue30975] multiprocessing.Condition.notify_all() blocks indefinitely if a process waiting on it has died

2017-07-20 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +sbt

___
Python tracker 

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



[issue30822] Python implementation of datetime module is not being tested correctly.

2017-07-20 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +2832

___
Python tracker 

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



[issue27099] IDLE: turn builting extensions into regular modules

2017-07-20 Thread Charles Wohlganger

Charles Wohlganger added the comment:

Menus items were placed where they appeared as extensions. It would be no 
difficulty for me to move them around.

--

___
Python tracker 

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



[issue30975] multiprocessing.Condition.notify_all() blocks indefinitely if a process waiting on it has died

2017-07-20 Thread Antoine Pitrou

Antoine Pitrou added the comment:

As a matter of fact, the bug is in Condition (which is used by Event.wait() but 
not by Event.is_set(), hence your workaround).  Here is a reproducer script.

This looks like a hard issue to solve.  There is no way to know whether a 
process that used to be waiting for a Condition was killed.

--
title: Multiprocessing: Event.set() blocks indefinitely if a process waiting on 
it has died. -> multiprocessing.Condition.notify_all() blocks indefinitely if a 
process waiting on it has died
Added file: http://bugs.python.org/file47027/WaitersSleepers.py

___
Python tracker 

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



[issue30822] Python implementation of datetime module is not being tested correctly.

2017-07-20 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +2831

___
Python tracker 

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



[issue30822] Python implementation of datetime module is not being tested correctly.

2017-07-20 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 5b392bbaeb9d9b1db961ecfc7315d8c8662c27f6 by Victor Stinner in 
branch 'master':
bpo-30822: Exclude tzdata from regrtest --all (#2775)
https://github.com/python/cpython/commit/5b392bbaeb9d9b1db961ecfc7315d8c8662c27f6


--

___
Python tracker 

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



[issue30975] Multiprocessing: Event.set() blocks indefinitely if a process waiting on it has died.

2017-07-20 Thread Mick Phillips

Mick Phillips added the comment:

Thanks for confirming. If anyone finds this and is looking for a workaround, 
here's what I'm using:

while not event.is_set()
try:
time.sleep(timeout)
except (KeyboardInterrupt, IOError):
pass

--

___
Python tracker 

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



[issue30975] Multiprocessing: Event.set() blocks indefinitely if a process waiting on it has died.

2017-07-20 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Hi Mick, thanks for reporting this issue.  You're right that the behaviour 
isn't expected.

--
nosy: +pitrou
stage:  -> needs patch
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



[issue30966] multiprocessing.queues.SimpleQueue leaks 2 fds

2017-07-20 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +2830

___
Python tracker 

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



[issue30945] loop.create_server does not detect if the interface is IPv6 enabled

2017-07-20 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Cécile, thank you.  The reason the message is still displayed is that I turned 
the error into a warning (in other words, it is expected).

--

___
Python tracker 

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



[issue30822] Python implementation of datetime module is not being tested correctly.

2017-07-20 Thread STINNER Victor

STINNER Victor added the comment:

Serhiy Storchaka: "If testing with -u tzdata is such expensive, tzdata can be 
excluded from all resources."

I agree, I wrote a PR for that:
https://github.com/python/cpython/pull/2775

I like using "-u all" without having to remind that a specific resource 
(tzdata) is too slow to be enabled by default.

I suggest to backport this change to all branches.

--

___
Python tracker 

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



[issue30945] loop.create_server does not detect if the interface is IPv6 enabled

2017-07-20 Thread Cecile Tonglet

Cecile Tonglet added the comment:

Sure! It seems to work, the process returns an exit code of 0 and I see no 
traceback but the message is still displayed in the terminal.

(Also I did something weird because your patch applies on branch master and I 
ran it with Python 3.6... I suppose it shouldn't be a problem)


[0] [11:54:13] /tmp > d run -it --rm -v /tmp:/tmp:ro -v 
~/repos/cpython/Lib/asyncio:/usr/local/lib/python3.6/asyncio:ro python:3.6 
python /tmp/test_ipv6.py
error while attempting to bind on address ('::1', 27015, 0, 0): cannot assign 
requested address
[0] [11:54:19] /tmp > d run -it --rm -v /tmp:/tmp:ro python:3.6 python 
/tmp/test_ipv6.py
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/asyncio/base_events.py", line 1043, in 
create_server
sock.bind(sa)
OSError: [Errno 99] Cannot assign requested address

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/tmp/test_ipv6.py", line 11, in 
server = loop.run_until_complete(server_creation)
  File "/usr/local/lib/python3.6/asyncio/base_events.py", line 466, in 
run_until_complete
return future.result()
  File "/usr/local/lib/python3.6/asyncio/base_events.py", line 1047, in 
create_server
% (sa, err.strerror.lower()))
OSError: [Errno 99] error while attempting to bind on address ('::1', 27015, 0, 
0): cannot assign requested address
[1] [11:54:52] /tmp >

--

___
Python tracker 

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



[issue30973] Regular expression "hangs" interpreter

2017-07-20 Thread Gareth Rees

Gareth Rees added the comment:

This is the usual exponential backtracking behaviour of Python's regex engine. 
The problem is that the regex

(?:[^*]+|\*[^/])*

can match against a string in exponentially many ways, and Python's regex 
engine tries all of them before giving up.

--
nosy: +g...@garethrees.org

___
Python tracker 

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



[issue30822] Python implementation of datetime module is not being tested correctly.

2017-07-20 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +2829

___
Python tracker 

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



[issue30945] loop.create_server does not detect if the interface is IPv6 enabled

2017-07-20 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Cécile, could you try the following patch?  I have no easy way to test here.

--
keywords: +patch
Added file: http://bugs.python.org/file47026/eaddrnotavail_asyncio.patch

___
Python tracker 

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



[issue30975] Multiprocessing: Event.set() blocks indefinitely if a process waiting on it has died.

2017-07-20 Thread Mick Phillips

New submission from Mick Phillips:

If a process was waiting on an Event but dies for some reason, nothing else can 
set the Event. I think the Event._cond lock can not be acquired. See attached 
for a demonstration.

I see the same behaviour in Python 2.7.5 and Python 3.5.2. Is this expected 
behaviour?

--
components: Windows
files: WaitersSleepers.py
messages: 298713
nosy: Mick Phillips, davin, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Multiprocessing: Event.set() blocks indefinitely if a process waiting on 
it has died.
type: behavior
versions: Python 2.7, Python 3.5
Added file: http://bugs.python.org/file47025/WaitersSleepers.py

___
Python tracker 

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



[issue25988] collections.abc.Indexable

2017-07-20 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

The last few weeks something bothered while working on Protocols PEP: protocols 
should be ideally compact (and PEP already emphasizes this).
However, the only potential candidates for __getitem__ are Sequence and 
Mapping, that are both quite bulky (half dozen members each). I was thinking 
about different options like adding BaseMap as a base for Mapping and Sequence 
that will only have __getitem__. I expect this to be a popular protocol, since 
often people just need something that can be subscripted.

Fortunately I stumbled into this issue. It looks like the optimal way now is:

* Have an abstract base class (let's call it BaseMap, although I don't really 
like this name) in collections.abc that has only __getitem__ method.
* It will be inherited by both Sequence and Mapping, but for the purpose of 
static typing, Sequence[T] will be a subtype of BaseMap[int, T], while 
Mapping[KT, VT] will be a subtype of BaseMap[KT, VT].
* BaseMap will be contravariant in key, this will solve problems with Mapping 
(invariant in key), for example a function that expects BaseMap[str, int] will 
accept Dict[Union[str, unicode], int].
* BaseMap will be a protocol in typing, so that people can extend it depending 
on their needs (e.g. add a .get() method).

Guido, Łukasz if you agree, then I will add this to the Protocols PEP and  will 
make a PR to collections.abc. We need to agree on the name, there are two 
options now: BaseMap and Indexable. I don't like the second since I would 
rather have it as a generic alias: Indexable = BaseMap[int, T]. However, 
BaseMap is also not very good, since I want something more "neutral" between 
Mapping and Sequence.

--
assignee:  -> levkivskyi
nosy: +levkivskyi, lukasz.langa
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



[issue10544] yield expression inside generator expression does nothing

2017-07-20 Thread Ivan Levkivskyi

Changes by Ivan Levkivskyi :


--
assignee:  -> levkivskyi

___
Python tracker 

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



[issue30968] test_get_font (idlelib.idle_test.test_config.IdleConfTest) failure on x86 Windows7 3.x

2017-07-20 Thread STINNER Victor

STINNER Victor added the comment:

Terry: FYI your commit message starts with multiple spaces. I would also 
suggest you to format your name as you did previously: "Terry Jan Reedy".

commit 9f9192afbb4e45d09f0d3d717b457d157dc46398
Author: terryjreedy 
Date:   Wed Jul 19 20:45:36 2017 -0400

bpo-30968: Fix test_get_font in IDLE's test_config.  (#2769)

--

___
Python tracker 

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



[issue30883] test_urllib2net failed on s390x Debian 3.6: ftp.debian.org error, too many connections from your internet address

2017-07-20 Thread STINNER Victor

STINNER Victor added the comment:

Oh, I didn't know that pythontest.net had a FTP server. Cool! Thank you for the 
fix ;-)

--

___
Python tracker 

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



[issue10544] yield expression inside generator expression does nothing

2017-07-20 Thread Jim Fasarakis-Hilliard

Changes by Jim Fasarakis-Hilliard :


--
nosy: +Jim Fasarakis-Hilliard

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

Andrew Jaffe added the comment:

10.12.6 is out and the bug appears to be fixed...

--
resolution: out of date -> third party
status: pending -> closed

___
Python tracker 

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



[issue30974] os.samefile / shutil._samefile: following symlinks

2017-07-20 Thread Marcel Partap

New submission from Marcel Partap:

Don't know whether it should be considered a documentation or behavioral issue, 
but os.samefile calls os.stat() on given files, following symlinks. Does this 
really "test whether two pathnames reference the same actual file"? I'd 
consider os.lstat() more suited for that.

This bites me every time I want to overwrite a symlink with its referenced file 
using ranger.

--
messages: 298708
nosy: eMPee584
priority: normal
severity: normal
status: open
title: os.samefile / shutil._samefile: following symlinks
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