[issue30192] hashlib module breaks with 64-bit kernel and 32-bit user space

2017-05-04 Thread Berker Peksag

Berker Peksag added the comment:

Neil, can this issue be closed or do you want to backport to 3.6?

--
nosy: +berker.peksag

___
Python tracker 

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



[issue29094] Regression in zipfile writing in 2.7.13

2017-05-04 Thread Benjamin Peterson

Benjamin Peterson added the comment:


New changeset ef4c6ba169ff59215442fc4047d83f7a3d39bf39 by Benjamin Peterson in 
branch '2.7':
Revert "Issue #29094: Offsets in a ZIP file created with extern file object and 
modes" (#1467)
https://github.com/python/cpython/commit/ef4c6ba169ff59215442fc4047d83f7a3d39bf39


--

___
Python tracker 

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



[issue30215] Make re.compile() locale agnostic

2017-05-04 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



[issue29621] telnetlib.Telnet.write gives confusing error message when a string is passed in

2017-05-04 Thread Berker Peksag

Berker Peksag added the comment:

I agree with David. The documentation of the method starts with "Write a byte 
string to the socket [...]" and the example at 
https://docs.python.org/3/library/telnetlib.html#telnet-example is pretty clear.

--
nosy: +berker.peksag
resolution:  -> rejected
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



[issue30247] Make importlib.machinery class handle os.PathLike path

2017-05-04 Thread Nick Coghlan

Nick Coghlan added the comment:

FileFinder only handles a single directory, and FileLoader only handles a 
single file, so their "path" attributes are paths in the "fspath" sense, rather 
than the "sys.path" or "PathFinder" sense.

Perhaps it would be worth the hassle of migrating to "fspath" as the attribute 
and parameter names here?

The attribute can be renamed without breaking backwards compatibility by also 
adding a "path" property that manipulates the renamed "fspath" attribute.

Renaming the parameters would be a bit trickier, since we would need to allow 
the parameter to be supplied under either name for at least 3.7, so we'd need 
to do something like:

1. Remove the current positional-or-keyword "path" parameter
2. Add keyword-only "path" and "fspath" parameters that default to None
3. Accept arbitrary additional positional arguments (which is already the case 
for FileFinder)
4. If both of the new keyword-only parameters are None, then extract "fspath" 
from the tuple of positional parameters (i.e. by doing "fspath, *loader_details 
loader_details" in FileFinder, and "fspath, * = args" in the FileLoader classes

At a documentation level, this would just be described as the parameter name 
being "fspath", and a versionchanged note for 3.7 saying that the parameter 
name changed from "path" to "fspath" and the old "path' name is still supported 
as a keyword argument for backwards compatibility reasons.

If we actively deprecated the old names, then the deprecation warnings would 
live in the access function definitions for the "path" attribute, and in the 
case where the "path" keyword argument was non-None for the renamed parameters.

--

___
Python tracker 

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



[issue29094] Regression in zipfile writing in 2.7.13

2017-05-04 Thread Benjamin Peterson

Changes by Benjamin Peterson :


--
pull_requests: +1566

___
Python tracker 

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



[issue30215] Make re.compile() locale agnostic

2017-05-04 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:


New changeset 898ff03e1e7925ecde3da66327d3cdc7e07625ba by Serhiy Storchaka in 
branch 'master':
bpo-30215: Make re.compile() locale agnostic. (#1361)
https://github.com/python/cpython/commit/898ff03e1e7925ecde3da66327d3cdc7e07625ba


--

___
Python tracker 

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



[issue30243] Core dump when use uninitialized _json objects

2017-05-04 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Repeated calling of the __init__ method caused memory leaks.

--

___
Python tracker 

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



[issue30243] Core dump when use uninitialized _json objects

2017-05-04 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka

___
Python tracker 

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



[issue19903] Idle: Use inspect.signature for calltips

2017-05-04 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

As well as __name__, __qualname__, __module__, __bases__, __call__, mro, etc.

--

___
Python tracker 

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



[issue30247] Make importlib.machinery class handle os.PathLike path

2017-05-04 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

If the path attribute can be None or list it looks to me that it isn't a 
filesystem path, and it may be incorrect to use os.fspath() with it. How this 
attribute is used? What wrong if left it a pathlib.Path?

--

___
Python tracker 

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



[issue30264] [Windows] test_sax: Warning -- files was modified by test_sax

2017-05-04 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

As you said, calling close() can have side effects (for example invoking 
self._cont_handler.endDocument()). This was the argument against PR 1444.

It seems to me that if _entity_stack is not empty (this happens in case of 
error in entity parsing) the close() method does nothing. And maybe there are 
other leaks in entity parsing.

--

___
Python tracker 

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



[issue30276] import hashlib makes many programs slow

2017-05-04 Thread Bernhard M. Wiedemann

New submission from Bernhard M. Wiedemann:

Steps to Reproduce:
echo import hashlib > test.py
time python -m cProfile -s tottime test.py 2>&1 | head

Actual Results:
shows 27ms spent in hashlib.py


The problem goes away when dropping everything after line 133
in hashlib.py

see also issue 21288

--
assignee: christian.heimes
components: Library (Lib), SSL
messages: 293039
nosy: bmwiedemann, christian.heimes
priority: normal
severity: normal
status: open
title: import hashlib makes many programs slow
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



[issue30172] test_tools takes longer than 5 minutes on some buildbots

2017-05-04 Thread STINNER Victor

STINNER Victor added the comment:

I modified regrtest to log the system load: bpo-30263.

> On x86-64 El Capitan 3.x buildbot, test_tools takes longer than 5 minutes, 
> whereas the overall test suite took 31 min. Is someone wrong in test_tools?

On this buildbot which has 2 CPUs, the system load starts at 3.33, but goes up 
35.40:

0:04:48 load avg: 35.40 [ 41/405] test_tokenize passed (257 sec) -- running: 
test_lib2to3 (171 sec)

The system load is between 3.88 and 17.47 while test_tools is running.

running: test_multiprocessing_spawn (158 sec), test_tools (30 sec)
running: test_multiprocessing_spawn (188 sec), test_tools (60 sec)
running: test_multiprocessing_spawn (218 sec), test_tools (90 sec)
0:27:38 load avg: 4.04 [380/405] test_multiprocessing_spawn passed (247 sec) -- 
running: test_tools (120 sec)
0:27:39 load avg: 4.04 [381/405] test_telnetlib passed -- running: test_tools 
(121 sec)
0:27:43 load avg: 3.88 [382/405] test_dis passed -- running: test_tools (125 
sec)
0:27:44 load avg: 3.88 [383/405] test_script_helper passed -- running: 
test_tools (126 sec)
0:27:45 load avg: 3.88 [384/405] test_glob passed -- running: test_tools (127 
sec)
0:27:46 load avg: 4.21 [385/405] test_ensurepip passed -- running: test_tools 
(128 sec)
0:27:51 load avg: 4.59 [386/405] test_descr passed -- running: test_tools (133 
sec)
0:27:52 load avg: 4.59 [387/405] test_sax passed -- running: test_tools (134 
sec)
0:27:53 load avg: 4.59 [388/405] test_unicode_file_functions passed -- running: 
test_tools (135 sec)
0:27:54 load avg: 4.59 [389/405] test_xml_dom_minicompat passed -- running: 
test_tools (136 sec)
0:27:57 load avg: 4.54 [390/405] test___all__ passed -- running: test_tools 
(139 sec)
0:27:58 load avg: 4.54 [391/405] test_grammar passed -- running: test_tools 
(140 sec)
0:27:59 load avg: 4.54 [392/405] test_unpack passed -- running: test_tools (141 
sec)
0:28:17 load avg: 4.48 [393/405] test_weakref passed -- running: test_tools 
(159 sec)
0:28:19 load avg: 4.48 [394/405] test_parser passed -- running: test_tools (160 
sec)
0:28:25 load avg: 4.52 [395/405] test_difflib passed -- running: test_tools 
(167 sec)
0:28:26 load avg: 4.52 [396/405] test_compare passed -- running: test_tools 
(167 sec)
0:28:47 load avg: 9.68 [397/405] test_long passed -- running: test_tools (189 
sec)
0:28:48 load avg: 9.68 [398/405] test_mailcap passed -- running: test_tools 
(190 sec)
0:28:49 load avg: 9.68 [399/405] test_rlcompleter passed -- running: test_tools 
(191 sec)
running: test_pickle (30 sec), test_tools (221 sec)
0:29:38 load avg: 17.47 [400/405] test_pickle passed (49 sec) -- running: 
test_tools (240 sec)
0:29:49 load avg: 14.94 [401/405] test_nntplib passed -- running: test_tools 
(251 sec)
0:29:50 load avg: 14.94 [402/405] test_with passed -- running: test_tools (252 
sec)
0:29:52 load avg: 14.22 [403/405] test_enum passed -- running: test_tools (254 
sec)
0:29:55 load avg: 14.22 [404/405] test_source_encoding passed -- running: 
test_tools (257 sec)
running: test_tools (287 sec)
running: test_tools (317 sec)
0:30:58 load avg: 5.59 [405/405] test_tools passed (319 sec)


Is it ok to have such system load? Is there something wrong on this buildbot?

--

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

STINNER Victor added the comment:

If no one speak up to propose a fix for the two skipped tests before a deadline 
of two weeks, I will removed them, apply:
https://github.com/python/cpython/pull/1419

--

___
Python tracker 

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



[issue30255] test_xml_etree: python: Objects/sliceobject.c:176: _PySlice_AdjustIndices: Assertion `step >= -PY_SSIZE_T_MAX' failed.

2017-05-04 Thread STINNER Victor

STINNER Victor added the comment:

> It's very strange because I expect either a crash: regrtest stops with no 
> more output, or a report of the crash. But no, regrtest displays the summary 
> as everything was fine...

It was a bug in regrtest: now fixed by bpo-30258.

--

___
Python tracker 

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



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

2017-05-04 Thread STINNER Victor

STINNER Victor added the comment:

Jeremy Kloth: "I'm not in the position to be able to check this possibility, 
ATM, but it is possible that other things have also changed since this was 
commited 5 years ago."

I expect that many bugs have been fixed in virtualenv and venv modules, so 
maybe bpo-15366 was fixed indirectly?

It would be nice if you can tests on your side, since I'm not confident in my 
own tests :-)

I modified the build system of Python 2.7, 3.5, 3.6 and master (3.7). So you 
can pick any of these branches to run your test :-) I'm not sure that the bug 
affected or can affect Python 2.7.

--

___
Python tracker 

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



[issue23404] 'make touch' does not work with git clones of the source repository

2017-05-04 Thread STINNER Victor

STINNER Victor added the comment:

I modified Python 2.7, 3.5, 3.6 and master (3.7). I prefer to keep the issue 
open at least one week in a regression is found, like issue #30273 (this one 
should already be fixed).

Maybe the devguide should be updated too?

--

___
Python tracker 

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



[issue23404] 'make touch' does not work with git clones of the source repository

2017-05-04 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 8a19eb24c97ef43e9fc7d45af180334ac8093545 by Victor Stinner in 
branch '2.7':
bpo-23404: make touch becomes make regen-all (#1466)
https://github.com/python/cpython/commit/8a19eb24c97ef43e9fc7d45af180334ac8093545


--

___
Python tracker 

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



[issue23404] 'make touch' does not work with git clones of the source repository

2017-05-04 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +1565

___
Python tracker 

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



[issue30275] pickle doesn't work in compile/exec

2017-05-04 Thread Jeff Zhang

New submission from Jeff Zhang:

I want to use pickle in compile/exec, but it doesn't work for me. It only works 
when I use the global namespace. But I don't want to use global namespace, is 
there any way for that ? Thanks

>>> a = compile("def f():\n\t'hello'\nimport pickle\npickle.dumps(f)", 
>>> "", "exec")
>>> exec(a)# works
>>> exec(a, {})# fails  
Traceback (most recent call last):
  File "", line 1, in 
  File "", line 4, in 
_pickle.PicklingError: Can't pickle : it's not the 
same object as __main__.f
>>> exec(a, {'__name__': '__main__'})   # fails too
Traceback (most recent call last):
  File "", line 1, in 
  File "", line 4, in 
_pickle.PicklingError: Can't pickle : it's not the 
same object as __main__.f

--
components: Library (Lib)
messages: 293032
nosy: Jeff Zhang
priority: normal
severity: normal
status: open
title: pickle doesn't work in compile/exec
type: enhancement
versions: Python 3.5

___
Python tracker 

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



[issue23404] 'make touch' does not work with git clones of the source repository

2017-05-04 Thread STINNER Victor

STINNER Victor added the comment:


New changeset ab6b962ef241be97536573d7490ce1cfc74fde18 by Victor Stinner in 
branch '3.5':
bpo-23404: make touch becomes make regen-all (#1405) (#1461) (#1465)
https://github.com/python/cpython/commit/ab6b962ef241be97536573d7490ce1cfc74fde18


--

___
Python tracker 

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



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

2017-05-04 Thread STINNER Victor

STINNER Victor added the comment:


New changeset ab6b962ef241be97536573d7490ce1cfc74fde18 by Victor Stinner in 
branch '3.5':
bpo-23404: make touch becomes make regen-all (#1405) (#1461) (#1465)
https://github.com/python/cpython/commit/ab6b962ef241be97536573d7490ce1cfc74fde18


--

___
Python tracker 

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



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

2017-05-04 Thread STINNER Victor

STINNER Victor added the comment:

> The change to sysconfig *may* be a regression wrt bpo-15366.

Hum, I'm still able to create a venv and install coverage in the venv after my 
commit b109a1d3360fc4bb87b9887264e3634632d392ca, whereas this commit basically 
reverts the bpo-15366 fix.

--

___
Python tracker 

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



[issue23404] 'make touch' does not work with git clones of the source repository

2017-05-04 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +1563

___
Python tracker 

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



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

2017-05-04 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +1564

___
Python tracker 

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



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

2017-05-04 Thread Jeremy Kloth

Jeremy Kloth added the comment:

The change to sysconfig *may* be a regression wrt bpo-15366.

I'm not in the position to be able to check this possibility, ATM, but it is 
possible that other things have also changed since this was commited 5 years 
ago.

--
nosy: +jkloth

___
Python tracker 

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



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

2017-05-04 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 9d02f562961efd12d3c8317a10916db7f77330cc by Victor Stinner in 
branch '3.6':
[3.6] bpo-23404: make touch becomes make regen-all (#1405) (#1461)
https://github.com/python/cpython/commit/9d02f562961efd12d3c8317a10916db7f77330cc


--

___
Python tracker 

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



[issue23404] 'make touch' does not work with git clones of the source repository

2017-05-04 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 9d02f562961efd12d3c8317a10916db7f77330cc by Victor Stinner in 
branch '3.6':
[3.6] bpo-23404: make touch becomes make regen-all (#1405) (#1461)
https://github.com/python/cpython/commit/9d02f562961efd12d3c8317a10916db7f77330cc


--

___
Python tracker 

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



[issue29094] Regression in zipfile writing in 2.7.13

2017-05-04 Thread Thomas Wouters

Thomas Wouters added the comment:

Well, what should the zipfile module do when you open a broken zipfile for 
appending in the first place? :) There are many ways in which it could be 
broken. I don't think a zipfile with incorrect offsets should be treated any 
differently.

(I don't know *how* the zipfile module should treat broken zipfiles, and I 
don't know how it treats them now -- but I think the most important thing is 
consistency and documenting the choice :P)

--

___
Python tracker 

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



[issue19903] Idle: Use inspect.signature for calltips

2017-05-04 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Interesting  dir(list.append) and the IDLE completion box show 
__text_signature__.  dir(list) and the box do not.

--

___
Python tracker 

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



[issue30270] Remove sqlite3.Cache display method

2017-05-04 Thread Brett Cannon

Brett Cannon added the comment:

How long has the method been there? And does it hurt anything for it to be 
exposed? Removing it at this point may break code if it predates Python 3.7.

--
nosy: +brett.cannon

___
Python tracker 

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



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

2017-05-04 Thread Brett Cannon

New submission from Brett Cannon:

https://docs.python.org/3/library/importlib.html#importlib.machinery.ExtensionFileLoader
 says "fullname, path" for __init__(), but 
https://github.com/python/cpython/blob/647c3d381e67490e82cdbbe6c96e46d5e1628ce2/Lib/importlib/_bootstrap_external.py#L909
 says "name, path". While I would much rather change the parameter name to 
match the rest of the module, I don't think I'm comfortable with the 
backwards-compatibility breakage over just a single parameter name (although 
chances are no one will notice in either direction as everyone probably passes 
by position).

--
assignee: docs@python
components: Documentation
messages: 293022
nosy: brett.cannon, docs@python
priority: normal
severity: normal
stage: needs patch
status: open
title: Make importlib.abc.ExtensionFileLoader.__init__() documentation match 
code

___
Python tracker 

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



[issue30085] Discourage operator.__dunder__ functions

2017-05-04 Thread Terry J. Reedy

Changes by Terry J. Reedy :


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



[issue30264] [Windows] test_sax: Warning -- files was modified by test_sax

2017-05-04 Thread STINNER Victor

STINNER Victor added the comment:

> What if the third-party parser don't use prepare_input_source()? It can use 
> more efficient way if pass just a file name.

About "third-party parsers": I have no idea of what are these parsers. It seems 
like Jython uses provides a parser. But I'm not interested to test Jython, 
sorry!

> Wouldn't be better to move your code into the parser's method parse()? If a 
> file is opened inside the parse() method and is not exposed outside, that 
> method should close it.

I wrote a first patch putting the try/except into expatparser code, but then I 
found a second parser with a parse() method: IncrementalParser. In fact, the 
expat parser inherits from IncrementalParser. So I only modified 
IncrementalParser, and IncrementalParser calls the abstract method close(). So 
any parser implemented on top of IncrementalParser should get the fix for free.

My 3rd attempt (patch IncrementalParser.parse()) changes less code and IMHO is 
less error-prone.

Now, *in practice*, only the expat parser is used in CPython, and according to 
unit tests, my fix closes the file, so the bug is fixed!

--

___
Python tracker 

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



[issue19903] Idle: Use inspect.signature for calltips

2017-05-04 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

>>> list.__text_signature__
'(iterable=(), /)'

But IDLE shouldn't use __text_signature__ directly, it should use the inspect 
module.

--

___
Python tracker 

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



[issue19903] Idle: Use inspect.signature for calltips

2017-05-04 Thread Terry J. Reedy

Terry J. Reedy added the comment:

(I presume'ordinal' meant 'ordinary'.)  I don't know where signature finds the 
info on built-in type objects   Methods like .append have .__text_signature__.  
List does not, and list.__call__.__text_signature is the generic '($self, /, 
*args, **kwargs)'.  That signature finds it somewhere is a reason for the 
switch. There is no longer a signature in the first lines of the docstring. So 
currently, 'list(' only displays "Built-in mutable sequence."

Louie, I verified that for python-coded classes, signature itself gets the info 
from the __init__ method, so we don't need 'fob = ob.__init__' for python 
classes either.

--

___
Python tracker 

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



[issue23404] 'make touch' does not work with git clones of the source repository

2017-05-04 Thread STINNER Victor

STINNER Victor added the comment:


New changeset b109a1d3360fc4bb87b9887264e3634632d392ca by Victor Stinner in 
branch 'master':
bpo-30273: Update sysconfig (#1464)
https://github.com/python/cpython/commit/b109a1d3360fc4bb87b9887264e3634632d392ca


--

___
Python tracker 

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



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

2017-05-04 Thread STINNER Victor

STINNER Victor added the comment:


New changeset b109a1d3360fc4bb87b9887264e3634632d392ca by Victor Stinner in 
branch 'master':
bpo-30273: Update sysconfig (#1464)
https://github.com/python/cpython/commit/b109a1d3360fc4bb87b9887264e3634632d392ca


--

___
Python tracker 

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



[issue23404] 'make touch' does not work with git clones of the source repository

2017-05-04 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +1562

___
Python tracker 

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



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

2017-05-04 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +1561

___
Python tracker 

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



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

2017-05-04 Thread STINNER Victor

STINNER Victor added the comment:

> get_config_var('AST_H_DIR')

Oh, I see. My commit a5c62a8e9f0de6c4133825a5710984a3cd5e102b removed multiple 
variables from Makefile.pre.in to simplify it, but I didn't notice that some of 
them (only AST_H_DIR?) were used outside Makefile.pre.in. I completely forgot 
the evil sysconfig (evil in term of backward compatibility...).

I removed the following variables from Makefile.pre.in:

* @GENERATED_COMMENT@
* ASDLGEN
* ASDLGEN_FILES
* AST_ASDL
* AST_C
* AST_C_DIR
* AST_H
* AST_H_DIR
* GRAMMAR_C
* GRAMMAR_H
* GRAMMAR_INPUT
* OPCODETARGETGEN
* OPCODETARGETGEN_FILES
* OPCODETARGETS_H
* OPCODE_H
* OPCODE_H_DIR
* OPCODE_H_GEN
* OPCODE_H_SCRIPT
* PYTHON_FOR_GEN (renamed to PYTHON_FOR_REGEN)

I didn't see the point of the AST_H_DIR variable since its value was hardcoded 
to "Include" and it was only used to regenerate generated files related to AST.

I don't understand why sysconfig chose this specific variable to get the 
"Include" subdirectory!?

I'm writing a fix to replace AST_H_DIR variable with "Include".

--

___
Python tracker 

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



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

2017-05-04 Thread STINNER Victor

STINNER Victor added the comment:

To reproduce the bug, build the master branch of Python and then run:

./python -m venv venv
./venv/bin/python -m pip install -U coverage

Or just:

$ ./venv/bin/python -c 'from distutils import sysconfig; 
print(sysconfig.get_python_inc())'
Traceback (most recent call last):
  File "", line 1, in 
  File "/home/haypo/prog/python/master/Lib/distutils/sysconfig.py", line 100, 
in get_python_inc
incdir = os.path.join(_sys_home, get_config_var('AST_H_DIR'))
  File "/home/haypo/prog/python/master/Lib/posixpath.py", line 92, in join
genericpath._check_arg_types('join', a, *p)
  File "/home/haypo/prog/python/master/Lib/genericpath.py", line 149, in 
_check_arg_types
(funcname, s.__class__.__name__)) from None
TypeError: join() argument must be str or bytes, not 'NoneType'

--

___
Python tracker 

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



[issue19903] Idle: Use inspect.signature for calltips

2017-05-04 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Ah, yes, __new__ and __init__ differ from ordinal methods. They don't have 
docstrings generated by Argument Clinic. But list itself as a callable have 
correct signature.

>>> inspect.signature(list)


--

___
Python tracker 

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



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

2017-05-04 Thread STINNER Victor

New submission from STINNER Victor:

Bug reported by Antoine Pitrou on the python-committers mailing list.

According to Brett Canon, the first failure was:
https://travis-ci.org/python/cpython/jobs/228409786

And the regression is related to my commit 
a5c62a8e9f0de6c4133825a5710984a3cd5e102b: bpo-23404.

Collecting coverage
  Downloading coverage-4.3.4.tar.gz (361kB)
�Complete output from command python setup.py egg_info:
running egg_info
creating pip-egg-info/coverage.egg-info
writing pip-egg-info/coverage.egg-info/PKG-INFO
writing dependency_links to
pip-egg-info/coverage.egg-info/dependency_links.txt
writing entry points to pip-egg-info/coverage.egg-info/entry_points.txt
writing top-level names to pip-egg-info/coverage.egg-info/top_level.txt
writing manifest file 'pip-egg-info/coverage.egg-info/SOURCES.txt'
warning: manifest_maker: standard file '-c' not found

Traceback (most recent call last):
  File "", line 1, in 
  File "/tmp/pip-build-ewtgqc2r/coverage/setup.py", line 204, in

main()
  File "/tmp/pip-build-ewtgqc2r/coverage/setup.py", line 194, in main
setup(**setup_args)
  File "/home/travis/build/python/cpython/Lib/distutils/core.py",
line 148, in setup
dist.run_commands()
  File "/home/travis/build/python/cpython/Lib/distutils/dist.py",
line 955, in run_commands
self.run_command(cmd)
  File "/home/travis/build/python/cpython/Lib/distutils/dist.py",
line 974, in run_command
cmd_obj.run()
  File
"/home/travis/build/python/cpython/venv/lib/python3.7/site-packages/setuptools/command/egg_info.py",
line 279, in run
self.find_sources()
  File
"/home/travis/build/python/cpython/venv/lib/python3.7/site-packages/setuptools/command/egg_info.py",
line 306, in find_sources
mm.run()
  File
"/home/travis/build/python/cpython/venv/lib/python3.7/site-packages/setuptools/command/egg_info.py",
line 533, in run
self.add_defaults()
  File
"/home/travis/build/python/cpython/venv/lib/python3.7/site-packages/setuptools/command/egg_info.py",
line 562, in add_defaults
sdist.add_defaults(self)
  File
"/home/travis/build/python/cpython/Lib/distutils/command/sdist.py", line
228, in add_defaults
self._add_defaults_ext()
  File
"/home/travis/build/python/cpython/Lib/distutils/command/sdist.py", line
311, in _add_defaults_ext
build_ext = self.get_finalized_command('build_ext')
  File "/home/travis/build/python/cpython/Lib/distutils/cmd.py",
line 299, in get_finalized_command
cmd_obj.ensure_finalized()
  File "/home/travis/build/python/cpython/Lib/distutils/cmd.py",
line 107, in ensure_finalized
self.finalize_options()
  File
"/home/travis/build/python/cpython/Lib/distutils/command/build_ext.py",
line 150, in finalize_options
py_include = sysconfig.get_python_inc()
  File
"/home/travis/build/python/cpython/Lib/distutils/sysconfig.py", line
100, in get_python_inc
incdir = os.path.join(_sys_home, get_config_var('AST_H_DIR'))
  File "/home/travis/build/python/cpython/Lib/posixpath.py", line
92, in join
genericpath._check_arg_types('join', a, *p)
  File "/home/travis/build/python/cpython/Lib/genericpath.py", line
149, in _check_arg_types
(funcname, s.__class__.__name__)) from None
TypeError: join() argument must be str or bytes, not 'NoneType'


�Command "python setup.py egg_info" failed with error code 1 in
/tmp/pip-build-ewtgqc2r/coverage/�

--
components: Build, Tests
messages: 293014
nosy: haypo, pitrou
priority: normal
severity: normal
status: open
title: The coverage job is broken: distutils build_ext fails on None
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



[issue19903] Idle: Use inspect.signature for calltips

2017-05-04 Thread Terry J. Reedy

Terry J. Reedy added the comment:

help(object.__init__) and help(list.__init__) have exactly the same output.

--

___
Python tracker 

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



[issue19903] Idle: Use inspect.signature for calltips

2017-05-04 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

list.__new__ is inherited from object. Look at list.__init__.

--

___
Python tracker 

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



[issue19903] Idle: Use inspect.signature for calltips

2017-05-04 Thread Terry J. Reedy

Terry J. Reedy added the comment:

>>> help(list.__new__)
Help on built-in function __new__:

__new__(*args, **kwargs) method of builtins.type instance
Create and return a new object.  See help(type) for accurate signature.

'list.__new__(' currently pops up just the docstring.  I think adding (*args, 
**kwargs) on top of it does not hurt and maybe is a slight improvement, as it 
explains the second line a bit.  In any case, explicitly calling __new__ and 
__init__ is extremely rare, especially for beginners.

For rexep.sub, adding (repl, string, count=0) on top of "Return the string 
obtained by replacing the leftmost non-overlapping occurrences o..." is a pure 
win.  Wrapping the too-long docstring line is a separate matter.

--

___
Python tracker 

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



[issue30272] distutils.version.LooseVersion's compare raises exception in corner-case

2017-05-04 Thread Oliver Smith

Changes by Oliver Smith :


--
components: +Distutils
nosy: +dstufft, merwok
type:  -> behavior

___
Python tracker 

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



[issue30272] distutils.version.LooseVersion's compare raises exception in corner-case

2017-05-04 Thread Oliver Smith

New submission from Oliver Smith:

This should return True and not raise an exception:

>>> from distutils.version import LooseVersion
>>> LooseVersion("22.7-r1") < LooseVersion("22.7.3-r1")
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/python3.6/distutils/version.py", line 52, in __lt__
c = self._cmp(other)
  File "/usr/lib/python3.6/distutils/version.py", line 337, in _cmp
if self.version < other.version:
TypeError: '<' not supported between instances of 'str' and 'int'
>>>

Tested with Python 3.6.1.

--
messages: 293009
nosy: ollieparanoid2
priority: normal
severity: normal
status: open
title: distutils.version.LooseVersion's compare raises exception in corner-case
versions: Python 3.6

___
Python tracker 

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



[issue19903] Idle: Use inspect.signature for calltips

2017-05-04 Thread Yury Selivanov

Changes by Yury Selivanov :


--
nosy:  -yselivanov

___
Python tracker 

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



[issue19903] Idle: Use inspect.signature for calltips

2017-05-04 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Let's back up.  The high-level specification for get_argspec is something like 
'Return information that will help programmers write a correct call."  The 
proposed implementation strategy is to combine signature info from signature 
(replacing getfullargspec) and the initial part of the callable docstring.

This goal and strategy mimic help(callable).  So we can use its output as a 
guide, but improve on it when we can and think we should.  This issue could be 
framed as 'catch up with help(callable)' which already switched to signature.

The test examples constitute a low-level specification by example.  As such, 
they should be discussed here before changing the code. Let's consider the ones 
you listed, using 'help(callable)' as a guide.

>>> help(range.__init__)
Help on wrapper_descriptor:
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.

Not very helpful, but if one types 'range.__init__(', one currently sees the 
last line and should see the last two lines in the future.

However, the calltip for 'range(' should not be the above.  When 
type(__init__).__name__ == 'wrapper_descripter, the "fob = ob.__init__" 
replacement should not happen, at least not until we see a case where a 
wrapper_descripter has the real signature.  (Whether is it still needed for 
python-coded classes is a separate issue.)  I don't know if all built-in inits 

>>> help(list.append)
Help on method_descriptor:
append(self, object, /)
Append object to the end of the list.
>>> help([].append)
Help on built-in function append:
append(object, /) method of builtins.list instance
Append object to the end of the list.

The signature output is fine with me.  I want future calltips to include it, 
along with the docstring line.

The only issue is the ', /'.  If people can survive it presence in help output, 
ditto for calltips.  But whenever a signature string contains '/', we could 
add, between signature and docstring lines, the following.
"('/' marks preceding arguments as positional-only.)"  If we do this, the 
string should be a global '_positional = ...' so it can be used as-is for 
tests.  I am inclined to try this.

I want to leave the '/' in the signature because there have been multiple 
issues and forum questions about why the equivalent of [].append(object='a') 
does not work.  Now, some built-in parameters are positional-only, some 
keyword-only, and some both.  The hint should make this clear.

--

___
Python tracker 

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



[issue30264] [Windows] test_sax: Warning -- files was modified by test_sax

2017-05-04 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

What if the third-party parser don't use prepare_input_source()? It can use 
more efficient way if pass just a file name.

Wouldn't be better to move your code into the parser's method parse()? If a 
file is opened inside the parse() method and is not exposed outside, that 
method should close it.

--
components: +Library (Lib) -Tests
nosy: +eli.bendersky, scoder, serhiy.storchaka
stage:  -> patch review
type:  -> behavior

___
Python tracker 

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



[issue30271] Make sqlite3 statement cache optional

2017-05-04 Thread Aviv Palivoda

Changes by Aviv Palivoda :


--
pull_requests: +1560

___
Python tracker 

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



[issue30271] Make sqlite3 statement cache optional

2017-05-04 Thread Aviv Palivoda

New submission from Aviv Palivoda:

Currently the minimum size of the statement cache is 10. I suggest that it will 
be any value above 1 or no cache at all if the size is set to 0.

--
components: Extension Modules
messages: 293006
nosy: berker.peksag, ghaering, palaviv
priority: normal
severity: normal
status: open
title: Make sqlite3 statement cache optional
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



[issue18699] What is Future.running() for in PEP 3148 / concurrent.futures.Future?

2017-05-04 Thread Mariatta Wijaya

Changes by Mariatta Wijaya :


--
pull_requests:  -1535

___
Python tracker 

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



[issue18669] curses.chgat() moves cursor, documentation says it shouldn't

2017-05-04 Thread Roundup Robot

Changes by Roundup Robot :


--
pull_requests: +1558

___
Python tracker 

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



[issue30270] Remove sqlite3.Cache display method

2017-05-04 Thread Aviv Palivoda

Changes by Aviv Palivoda :


--
pull_requests: +1559

___
Python tracker 

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



[issue30270] Remove sqlite3.Cache display method

2017-05-04 Thread Aviv Palivoda

New submission from Aviv Palivoda:

The display method is there for debugging and should not be in the released 
code.

--
components: Extension Modules
messages: 293005
nosy: berker.peksag, ghaering, palaviv
priority: normal
severity: normal
status: open
title: Remove sqlite3.Cache display method
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



[issue30267] Deprecate os.path.commonprefix

2017-05-04 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

We shouldn't deprecate a function until add an alternative. There is a working 
alternative for paths, but commonprefix() is used in the wild for non-paths 
(for example in unittest.util). The problem is that there is no right place for 
this function. The string module is wrong place because commonprefix() supports 
not only strings. Perhaps the new seqtools module would be a right place.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue30269] [2.7] test_release_task_refs() of test_multiprocessing.py is unstable

2017-05-04 Thread STINNER Victor

New submission from STINNER Victor:

[2.7] test_release_task_refs() of test_multiprocessing.py fails randomly.

Example:

http://buildbot.python.org/all/builders/x86%20Ubuntu%20Shared%202.7/builds/136/steps/test/logs/stdio

[116/401/1] test_multiprocessing
[77069 refs]
test test_multiprocessing failed -- Traceback (most recent call last):
  File 
"/srv/buildbot/buildarea/2.7.bolen-ubuntu/build/Lib/test/test_multiprocessing.py",
 line 1293, in test_release_task_refs
self.assertEqual(set(wr() for wr in refs), {None})
AssertionError: Items in the first set but not the second:










Items in the second set but not the first:
None
(...)
Re-running test 'test_multiprocessing' in verbose mode
(...)
Ran 167 tests in 20.640s
OK (skipped=12)

--
components: Tests
messages: 293003
nosy: haypo
priority: normal
severity: normal
status: open
title: [2.7] test_release_task_refs() of test_multiprocessing.py is unstable
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



[issue23404] 'make touch' does not work with git clones of the source repository

2017-05-04 Thread STINNER Victor

STINNER Victor added the comment:

I started a thread on python-dev to ask if it's ok to backport the change to 
2.7, 3.5 and 3.6.

I started to backport the change to 3.6:
https://github.com/python/cpython/pull/1461

--

___
Python tracker 

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



[issue23404] 'make touch' does not work with git clones of the source repository

2017-05-04 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +1557

___
Python tracker 

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



[issue30171] Emit ResourceWarning in multiprocessing Queue destructor

2017-05-04 Thread Antoine Pitrou

Antoine Pitrou added the comment:

The thread seems to be stopped when the Queue object is finalized:

# Send sentinel to the thread queue object when garbage collected
self._close = Finalize(
self, Queue._finalize_close,
[self._buffer, self._notempty],
exitpriority=10
)

I don't think the other resources (pipe, lock, semaphore) need explicit 
cleaning.

--
nosy: +pitrou

___
Python tracker 

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



[issue30108] test_site modifies sys.path

2017-05-04 Thread STINNER Victor

STINNER Victor added the comment:


New changeset e81e355a8e4395680225e3f99859a1a29ecb by Victor Stinner in 
branch '2.7':
bpo-30108: Fix test_site setUpModule() (#1460)
https://github.com/python/cpython/commit/e81e355a8e4395680225e3f99859a1a29ecb


--

___
Python tracker 

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



[issue30108] test_site modifies sys.path

2017-05-04 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +1556

___
Python tracker 

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



[issue30108] test_site modifies sys.path

2017-05-04 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 78064387e5815633168a80dcdc1bd9aec4eff46a by Victor Stinner in 
branch '2.7':
bpo-30108: Restore sys.path in test_site (#1197) (#1459)
https://github.com/python/cpython/commit/78064387e5815633168a80dcdc1bd9aec4eff46a


--

___
Python tracker 

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



[issue30185] forkserver process should silence KeyboardInterrupt

2017-05-04 Thread STINNER Victor

STINNER Victor added the comment:

> There is no forkserver in 2.7.

Oh right, it's specific to forkserver, ok ;-) 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



[issue30185] forkserver process should silence KeyboardInterrupt

2017-05-04 Thread Antoine Pitrou

Antoine Pitrou added the comment:

There is no forkserver in 2.7.

--

___
Python tracker 

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



[issue30268] Make mimetypes.guess_type accept path-like objects

2017-05-04 Thread ProgVal

New submission from ProgVal:

The documentation for mimetypes.guess_type says that it “guesses the type of a 
file based on its filename or URL”.

However, this function only accepts a string object, and not a bytes object:

>>> import os
>>> import mimetypes
>>> mimetypes.guess_type(os.listdir(os.fsencode('./'))[0])
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/python3.7/mimetypes.py", line 291, in guess_type
return _db.guess_type(url, strict)
  File "/usr/lib/python3.7/mimetypes.py", line 116, in guess_type
scheme, url = urllib.parse.splittype(url)
  File "/usr/lib/python3.7/urllib/parse.py", line 924, in splittype
match = _typeprog.match(url)
TypeError: cannot use a string pattern on a bytes-like object

--
components: Library (Lib)
messages: 292995
nosy: Valentin.Lorentz
priority: normal
severity: normal
status: open
title: Make mimetypes.guess_type accept path-like objects

___
Python tracker 

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



[issue30185] forkserver process should silence KeyboardInterrupt

2017-05-04 Thread STINNER Victor

STINNER Victor added the comment:

Python 2.7 isn't affected by this bug?

--

___
Python tracker 

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



[issue30267] Deprecate os.path.commonprefix

2017-05-04 Thread STINNER Victor

STINNER Victor added the comment:

Ned Batchelder wrote an article about this function in 2010 :-)

https://nedbatchelder.com/blog/201003/whats_the_point_of_ospathcommonprefix.html

"""
The docs helpfully include the warning:

Note that this may return invalid paths because it works a character at a 
time.

But it should say:

This function is in the wrong place, and has nothing to do with paths, 
don't use it if you are interested in file paths!
"""

--
nosy: +haypo, nedbat

___
Python tracker 

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



[issue30108] test_site modifies sys.path

2017-05-04 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +1555

___
Python tracker 

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



[issue30267] Deprecate os.path.commonprefix

2017-05-04 Thread ProgVal

New submission from ProgVal:

The function os.path.commonprefix computes the longest prefix of strings (any 
iterable, actually), regardless of their meaning as paths.

I do not see any reason to use this function for paths, and keeping it in the 
os.path module makes it prone to be confused with os.path.commonpath (which was 
introduced in Python 3.5).

I believe making this function raise a DeprecationWarning would help avoid 
having this kind of bugs.

--
components: Library (Lib)
messages: 292993
nosy: Valentin.Lorentz
priority: normal
severity: normal
status: open
title: Deprecate os.path.commonprefix

___
Python tracker 

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



[issue12857] Expose called function on frame object

2017-05-04 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



[issue30263] regrtest: log the system load?

2017-05-04 Thread STINNER Victor

STINNER Victor added the comment:

> why will a 1 CPU environment using -j8?

Many tests of the Python test suite spend a significant time on just sleeping 
and waiting for I/O. Using -jN with N > 1 runs tests much faster.

> isn't that too much for it?

That's a good question :-) At least, we now have one more tool to take a 
decision. Maybe the buildbot slave allows also more than one build in parallel? 
(ex: test 3.5 and 3.6 branches)

--

___
Python tracker 

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



[issue22610] test_ftplib fails with sem_init: Too many open files

2017-05-04 Thread STINNER Victor

STINNER Victor added the comment:

I didn't see this error recently on any buildbot.

While the patch seems safe, I prefer to not apply it to prevent any kind of 
regression.

--
nosy: +haypo
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue30185] forkserver process should silence KeyboardInterrupt

2017-05-04 Thread Antoine Pitrou

Changes by Antoine Pitrou :


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



[issue30263] regrtest: log the system load?

2017-05-04 Thread Louie Lu

Louie Lu added the comment:

why will a 1 CPU environment using -j8?
isn't that too much for it?

--
nosy: +louielu

___
Python tracker 

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



[issue30185] forkserver process should silence KeyboardInterrupt

2017-05-04 Thread Antoine Pitrou

Antoine Pitrou added the comment:


New changeset 7299088ccf5f72b8494063814b58a180b4250aa7 by Antoine Pitrou in 
branch '3.5':
[3.5] bpo-30185: avoid KeyboardInterrupt tracebacks in forkserver (GH-1319) 
(#1455)
https://github.com/python/cpython/commit/7299088ccf5f72b8494063814b58a180b4250aa7


--

___
Python tracker 

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



[issue19133] Transient test failure: test_with_statement (test_ftplib)

2017-05-04 Thread STINNER Victor

STINNER Victor added the comment:

I didn't see this failure recently on any buildbot.

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



[issue15934] flaky test in test_ftplib

2017-05-04 Thread STINNER Victor

STINNER Victor added the comment:

I didn't see this failure recently on any buildbot.

--
nosy: +haypo
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue30185] forkserver process should silence KeyboardInterrupt

2017-05-04 Thread Antoine Pitrou

Antoine Pitrou added the comment:


New changeset a7e48b544becc01dbf9059ed01f38997c6d0156c by Antoine Pitrou in 
branch '3.6':
[3.6] bpo-30185: avoid KeyboardInterrupt tracebacks in forkserver (GH-1319) 
(#1454)
https://github.com/python/cpython/commit/a7e48b544becc01dbf9059ed01f38997c6d0156c


--

___
Python tracker 

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



[issue30265] [2.7] test.support.unlink() should fail or emit a warning on WindowsError: [Error 32] The process cannot access the file ...

2017-05-04 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +1554

___
Python tracker 

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



[issue30185] forkserver process should silence KeyboardInterrupt

2017-05-04 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
pull_requests: +1553

___
Python tracker 

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



[issue30185] forkserver process should silence KeyboardInterrupt

2017-05-04 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
pull_requests: +1552

___
Python tracker 

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



[issue19903] Idle: Use inspect.signature for calltips

2017-05-04 Thread Louie Lu

Louie Lu added the comment:

Thing just getting weird. If we remove the guard, some of the builtin function 
will get not-so-good signature result:

>>> i.signature(range.__init__)

>>> i.signature(list.append)
>>>   

>>> i.signature([].append)  
>>>   


You can check my latest commit, The most big change is about __method__, it 
will make some different behavior:

str(i.signature(list.__new__)) -> (*args, **kwargs)
str(i.signature(p.sub))-> (repl, string, count=0)

both of them are BuiltinFunctionType, and the first one in old version will be 
guard, so the get_argspec result will be docstring, we can't different them in 
non-guard version.

--

___
Python tracker 

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



[issue30225] EBADF error on x86 Tiger 3.x buildbot

2017-05-04 Thread STINNER Victor

STINNER Victor added the comment:

Ok, the race condition causing EBADF is now handled correctly in 3.5, 3.6 and 
master (3.7).

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

___
Python tracker 

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



[issue30185] forkserver process should silence KeyboardInterrupt

2017-05-04 Thread Antoine Pitrou

Antoine Pitrou added the comment:


New changeset 6dd4d734ed207ba16b017e38f8909de7ef187e29 by Antoine Pitrou in 
branch 'master':
bpo-30185: avoid KeyboardInterrupt tracebacks in forkserver (#1319)
https://github.com/python/cpython/commit/6dd4d734ed207ba16b017e38f8909de7ef187e29


--

___
Python tracker 

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



[issue30265] [2.7] test.support.unlink() should fail or emit a warning on WindowsError: [Error 32] The process cannot access the file ...

2017-05-04 Thread STINNER Victor

STINNER Victor added the comment:

> Looking at test.support, the only errors that I can see being ignored by 
> unlink() is FileNotFoundError and NotADirectoryError (line 399)

Oh wait, I was looking at Python 2.7 code:

def unlink(filename):
try:
_unlink(filename)
except OSError:
pass

So this issuse seems to be specific to Python 2.7.

--
title: test.support.unlink() should fail or emit a warning on WindowsError: 
[Error 32] The process cannot access the file ... -> [2.7] 
test.support.unlink() should fail or emit a warning on WindowsError: [Error 32] 
The process cannot access the file ...
versions: +Python 2.7 -Python 3.7

___
Python tracker 

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



[issue30265] test.support.unlink() should fail or emit a warning on WindowsError: [Error 32] The process cannot access the file ...

2017-05-04 Thread Jeremy Kloth

Jeremy Kloth added the comment:

Looking at test.support, the only errors that I can see being ignored by 
unlink() is FileNotFoundError and NotADirectoryError (line 399). The only bare 
OSError except clause is on line 359, but for an lstat() call.

--
nosy: +jkloth

___
Python tracker 

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



[issue30263] regrtest: log the system load?

2017-05-04 Thread STINNER Victor

STINNER Victor added the comment:

On Windows, there is a "System > Processor Queue Length" metric which is close 
to the UNIX system load, but I'm unable to see how to get this value.

--

___
Python tracker 

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



[issue30263] regrtest: log the system load?

2017-05-04 Thread STINNER Victor

STINNER Victor added the comment:

Oh... I see many unexpected load average!

On the small ARMv7 Ubuntu 3.x (1 CPU), -j8 is used: the load average starts 
with 2.58 but goes up to 11.13 around "0:04:20 load avg: 11.13 [216/405] ". 
Load average of 11 on such device seems too high and can explain test failures.

PPC64 Fedora 3.x (64 CPU) starts at 8.48 and goes up to "0:01:33 load avg: 
11.33", but it has much more CPUs, so it's ok.

--

___
Python tracker 

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



[issue8450] httplib: false BadStatusLine() raised

2017-05-04 Thread Roundup Robot

Changes by Roundup Robot :


--
pull_requests: +1551

___
Python tracker 

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



[issue30263] regrtest: log the system load?

2017-05-04 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 3d0056842c5e06b4102f990b59ab3b607f932dd8 by Victor Stinner in 
branch 'master':
bpo-30263: regrtest: log system load (#1452)
https://github.com/python/cpython/commit/3d0056842c5e06b4102f990b59ab3b607f932dd8


--

___
Python tracker 

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



[issue30263] regrtest: log the system load?

2017-05-04 Thread STINNER Victor

STINNER Victor added the comment:

Hum, "load: 1.73" is confusing. I replaced it with "load avg: 1.73" to be more 
explicit, even if it's a little bit longer.

--

___
Python tracker 

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



[issue30263] regrtest: log the system load?

2017-05-04 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +1550

___
Python tracker 

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



[issue30263] regrtest: log the system load?

2017-05-04 Thread STINNER Victor

STINNER Victor added the comment:

Logging the system load may also help to understand why, on the ARM buildbot, 
some builds fail with a timeout after 49 minutes, whereas an usual build take 
13 min.

Example of build killed with "command timed out: 1200 seconds without output":

http://buildbot.python.org/all/builders/ARMv7%20Ubuntu%203.5/builds/235/steps/test/logs/stdio

--

___
Python tracker 

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



[issue30225] EBADF error on x86 Tiger 3.x buildbot

2017-05-04 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 31906b42fd71c6baaf80429005c720b40dfe8fae by Victor Stinner in 
branch '3.6':
bpo-30225: Fix is_valid_fd() on macOS Tiger (#1443) (#1449)
https://github.com/python/cpython/commit/31906b42fd71c6baaf80429005c720b40dfe8fae


--

___
Python tracker 

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



[issue30225] EBADF error on x86 Tiger 3.x buildbot

2017-05-04 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 8a1c71053139f20348ea487c0c464694ed3c88c5 by Victor Stinner in 
branch '3.5':
bpo-30225: Fix is_valid_fd() on macOS Tiger (#1443) (#1450)
https://github.com/python/cpython/commit/8a1c71053139f20348ea487c0c464694ed3c88c5


--

___
Python tracker 

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



  1   2   >