[issue19903] Idle: Use inspect.signature for calltips

2017-05-02 Thread Louie Lu

Louie Lu added the comment:

ah, there are still some corner case about _first_param.sub(), some of them in 
signature will be like `(ci)`, not `(self, ci)`, and the regex will replace the 
first params to `()`, which is not correct.

--

___
Python tracker 

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



[issue28315] incorrect "in ?" output in 'divide' example at "Defining Clean-up Actions" in tutorial

2017-05-02 Thread Jaysinh shukla

Changes by Jaysinh shukla :


--
pull_requests: +1480

___
Python tracker 

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



[issue30223] Add Lib/test/__main__.py in 2.7

2017-05-02 Thread STINNER Victor

STINNER Victor added the comment:

Oh yes, I always wanted this tiny feature! It's painful to have to adapt my 
command for Python 2 after testing Python 3.

--
nosy: +haypo

___
Python tracker 

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



[issue30223] Add Lib/test/__main__.py in 2.7

2017-05-02 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
pull_requests: +1481

___
Python tracker 

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



[issue30223] Add Lib/test/__main__.py in 2.7

2017-05-02 Thread Xiang Zhang

Xiang Zhang added the comment:

+1. Every time when I want to run tests for 2.7, I have to type twice. Once 
python -m test, error and then python -m test.regrtest.

--
nosy: +xiang.zhang

___
Python tracker 

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



[issue30224] remove outdated checks in struct

2017-05-02 Thread Xiang Zhang

New submission from Xiang Zhang:

Reading struct's code I find some checks seem outdated. They seemly exists 
because there are two kinds of integer in 2.x. I wrote a patch to remove them 
but maybe they exist for other reasons I don't see. Sorry if I misunderstand 
them. :-(

--
components: Library (Lib)
messages: 292724
nosy: mark.dickinson, meador.inge, xiang.zhang
priority: normal
severity: normal
stage: patch review
status: open
title: remove outdated checks in struct
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



[issue30224] remove outdated checks in struct

2017-05-02 Thread Xiang Zhang

Changes by Xiang Zhang :


--
pull_requests: +1482

___
Python tracker 

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



[issue15987] Provide a way to compare AST nodes for equality recursively

2017-05-02 Thread Louie Lu

Changes by Louie Lu :


--
pull_requests: +1483

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

New submission from STINNER Victor:

test_http_body_pipe() of test_urllib2 uses a subprocess, no idea if it's 
related:

cmd = [sys.executable, "-c", r"pass"]
for headers in {}, {"Content-Length": 30}:
with subprocess.Popen(cmd, stdout=subprocess.PIPE) as proc:
req = Request("http://example.com/";, proc.stdout, headers)
...

See also my issue #29915 "Drop Mac OS X Tiger support in Python 3.7?" :-)

http://buildbot.python.org/all/builders/x86%20Tiger%203.x/builds/597/steps/test/logs/stdio

./python.exe -E -c 'import sys ; from sysconfig import get_platform ; 
print("%s-%d.%d" % (get_platform(), *sys.version_info[:2]))' >platform
/bin/sh: line 1: pybuildbot.identify: command not found
./python.exe  ./Tools/scripts/run_tests.py -j 1 -u all -W --slowest 
--timeout=900 -j2
make: [buildbottest] Error 127 (ignored)
== CPython 3.7.0a0 (heads/master:5d7a8d0, May 1 2017, 12:22:06) [GCC 4.0.1 
(Apple Computer, Inc. build 5367)]
==   Darwin-8.11.1-i386-32bit little-endian
==   hash algorithm: siphash24 32bit
==  cwd: /Users/db3l/buildarea/3.x.bolen-tiger/build/build/test_python_12700
==  encodings: locale=UTF-8, FS=utf-8
Testing with flags: sys.flags(debug=0, inspect=0, interactive=0, optimize=0, 
dont_write_bytecode=0, no_user_site=0, no_site=0, ignore_environment=1, 
verbose=0, bytes_warning=2, quiet=0, hash_randomization=1, isolated=0)
Using random seed 2778758
Run tests in parallel using 2 child processes
0:00:12 [  1/405] test_deque passed
0:00:35 [  2/405] test_trace passed (34 sec)
0:00:56 [  3/405] test_capi passed -- running: test_socket (44 sec)
0:00:57 [  4/405] test_pkgimport passed -- running: test_socket (45 sec)
0:01:02 [  5/405] test_socket passed (49 sec)
0:01:07 [  6/405] test_imaplib passed
0:01:18 [  7/405] test_urllib2 passed
Fatal Python error: Py_Initialize: can't initialize sys standard streams
OSError: [Errno 9] Bad file descriptor

Current thread 0xa000d000 (most recent call first):
Fatal Python error: Py_Initialize: can't initialize sys standard streams
OSError: [Errno 9] Bad file descriptor

Current thread 0xa000d000 (most recent call first):
0:01:20 [  8/405] test_getargs2 passed
0:01:24 [  9/405] test_calendar passed
0:01:25 [ 10/405] test_unpack_ex passed

--
components: Tests, macOS
messages: 292725
nosy: haypo, ned.deily, ronaldoussoren
priority: normal
severity: normal
status: open
title: EBADF error on x86 Tiger 3.x buildbot
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



[issue30104] clang 4.0 miscompiles dtoa.c, giving broken float parsing and printing

2017-05-02 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +1484

___
Python tracker 

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



[issue29943] PySlice_GetIndicesEx change broke ABI in 3.5 and 3.6 branches

2017-05-02 Thread Charalampos Stratakis

Charalampos Stratakis added the comment:

For what it's worth, in Fedora 26 we already rebased Python to 3.6.1, so this 
issue now is non existent for our ecosystem, and we are not shipping 3.6.0 in 
any way now.

--

___
Python tracker 

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



[issue29943] PySlice_GetIndicesEx change broke ABI in 3.5 and 3.6 branches

2017-05-02 Thread Miro Hrončok

Miro Hrončok added the comment:

> For what it's worth, in Fedora 26 we already rebased Python to 3.6.1, so this 
> issue now is non existent for our ecosystem, and we are not shipping 3.6.0 in 
> any way now.

Except of course if 3.6.2 would be fixed in a way that 3.6.1 would be 
considered broken, and released after Fedora 26 is released. In that case, we 
would need to deal with the situation in Fedora somehow (e.g. patch it back in 
or so).

--

___
Python tracker 

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



[issue30104] clang 4.0 miscompiles dtoa.c, giving broken float parsing and printing

2017-05-02 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 809101f14f27ddb394cd77c477470761ecf99f41 by Victor Stinner in 
branch '3.6':
bpo-30104: Use -fno-strict-aliasing on clang (#1376)
https://github.com/python/cpython/commit/809101f14f27ddb394cd77c477470761ecf99f41


--

___
Python tracker 

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



[issue30226] Modernize make_ssl_certs

2017-05-02 Thread Christian Heimes

New submission from Christian Heimes:

Lib/test/make_ssl_certs.py is used to generate and re-generate certificates and 
keys for SSL tests. The script and certificates have various smaller issues, 
e.g. RSA 1024bit certs with SHA-1 signature.  Some certificates lack v3 
extensions, too. The script fails to regenerate some files, e.g. a copy of 
pycacert.pem in capath.

I'm going to modernize the script.

--
assignee: christian.heimes
components: SSL
messages: 292729
nosy: christian.heimes
priority: normal
severity: normal
status: open
title: Modernize make_ssl_certs
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



[issue30104] clang 4.0 miscompiles dtoa.c, giving broken float parsing and printing

2017-05-02 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +1485

___
Python tracker 

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



[issue30104] clang 4.0 miscompiles dtoa.c, giving broken float parsing and printing

2017-05-02 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 03a7ab77d2f75323e1f3e8b6a1c164e701d58bfb by Victor Stinner in 
branch '3.5':
bpo-30104: Use -fno-strict-aliasing on clang (#1376) (#1377)
https://github.com/python/cpython/commit/03a7ab77d2f75323e1f3e8b6a1c164e701d58bfb


--

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

Changes by STINNER Victor :


--
pull_requests: +1486

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

Changes by STINNER Victor :


--
pull_requests: +1487

___
Python tracker 

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



[issue30212] test_ssl.py is broken in Centos7

2017-05-02 Thread Xiang Zhang

Xiang Zhang added the comment:

The failure can't be reproduced by me, 3.5 on CentOS 7.1.

--

___
Python tracker 

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



[issue7283] test_site failure when .local/lib/pythonX.Y/site-packages hasn't been created yet

2017-05-02 Thread STINNER Victor

STINNER Victor added the comment:

It seems like the original bug report was fixed, so I close it.

@Berker Peksag: Please open a new bug report if you see again the 
PermissionError error on Windows. I didn't see it recently.


> Well, I'm not sure the symlink is actually the problem. Apparently the 
> ".local" directory hadn't been created when the first test run.

I'm unable to reproduce this bug anymore. I named ~/.local to ~/.local.xxx: 
test_site pass (it starts by creating ~/.local/lib/python3.7/site-packages).

> I can't reproduce this locally. If remove ~/.local/lib/pythonX.Y and run 
> test_site, it creates the directory and modifies sys.path (this is a bug).

I fixed this bug: commit b85c136903c6d2368162f7c4a58f258c9c69ead0, issue #30108.

> I just saw a similar failure on AppVeyor: FAIL: test_s_option 
> (test.test_site.HelperFunctionsTests)

test_site failed twice. First run:

==
ERROR: test_underpth_file (test.test_site.StartupImportTests)
--
Traceback (most recent call last):
  File "C:\projects\cpython\lib\test\test_site.py", line 577, in 
test_underpth_file
self._cleanup_underpth_exe(exe_file)
  File "C:\projects\cpython\lib\test\test_site.py", line 512, in 
_cleanup_underpth_exe
test.support.unlink(exe_file)
  File "C:\projects\cpython\lib\test\support\__init__.py", line 398, in unlink
_unlink(filename)
  File "C:\projects\cpython\lib\test\support\__init__.py", line 348, in _unlink
_waitfor(os.unlink, filename)
  File "C:\projects\cpython\lib\test\support\__init__.py", line 316, in _waitfor
func(pathname)
PermissionError: [WinError 32] The process cannot access the file because it is 
being used by another process: 
'C:\\Users\\appveyor\\AppData\\Local\\Temp\\1\\python.exe'
==
ERROR: test_underpth_nosite_file (test.test_site.StartupImportTests)
--
Traceback (most recent call last):
  File "C:\projects\cpython\lib\test\test_site.py", line 534, in 
test_underpth_nosite_file
exe_file = self._create_underpth_exe(pth_lines)
  File "C:\projects\cpython\lib\test\test_site.py", line 495, in 
_create_underpth_exe
shutil.copy(sys.executable, exe_file)
  File "C:\projects\cpython\lib\shutil.py", line 241, in copy
copyfile(src, dst, follow_symlinks=follow_symlinks)
  File "C:\projects\cpython\lib\shutil.py", line 121, in copyfile
with open(dst, 'wb') as fdst:
PermissionError: [Errno 13] Permission denied: 
'C:\\Users\\appveyor\\AppData\\Local\\Temp\\1\\python.exe'


Second run:

==
FAIL: test_s_option (test.test_site.HelperFunctionsTests)
--
Traceback (most recent call last):
  File "C:\projects\cpython\lib\test\test_site.py", line 173, in test_s_option
self.assertIn(usersite, sys.path)
AssertionError: 
'C:\\Users\\appveyor\\AppData\\Roaming\\Python\\Python36\\site-packages' not 
found in ['', 'C:\\projects\\cpython\\PCbuild\\win32\\python36.zip', 
'C:\\projects\\cpython\\DLLs', 'C:\\projects\\cpython\\lib', 
'C:\\projects\\cpython\\PCbuild\\win32', 'C:\\projects\\cpython', 
'C:\\projects\\cpython\\lib\\site-packages']


The first failures are unrelated to this bug report. The first failure 
(PermissionError: [WinError 32] The process cannot access the file because it 
is being used by another process) seems like an antivirus holding the file 
open. Please open a different bug report if you see it again.

--
nosy: +haypo
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue30108] test_site modifies sys.path

2017-05-02 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 33a5d40de997fff5b60157c546a3bf711e083bcc by Victor Stinner in 
branch '3.6':
bpo-30108: Restore sys.path in test_site (#1197) (#1378)
https://github.com/python/cpython/commit/33a5d40de997fff5b60157c546a3bf711e083bcc


--

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

STINNER Victor added the comment:


New changeset 092f4602c329e23b863692249cc630a3eba5b6b5 by Victor Stinner in 
branch '3.5':
bpo-30108: Restore sys.path in test_site (#1197) (#1379)
https://github.com/python/cpython/commit/092f4602c329e23b863692249cc630a3eba5b6b5


--

___
Python tracker 

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



[issue30223] Add Lib/test/__main__.py in 2.7

2017-05-02 Thread Nick Coghlan

Nick Coghlan added the comment:

+1 from me. We hadn't done this (or the test.support backport) previously due 
to the "no new features" guideline, but I think simplifying cross-branch 
maintenance overrides that concerns.

--

___
Python tracker 

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



[issue30212] test_ssl.py is broken in Centos7

2017-05-02 Thread STINNER Victor

STINNER Victor added the comment:

@david-cpi: Can you please elaborate?

* What is your Centos full version?
* How do you get Python 3.5? Tarball from python.org?
* What is the error message?

"except: pass" is bad practice, you must catch a specific exception type.

It seems very strange to have to ignore errors on sendall().

--

___
Python tracker 

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



[issue30212] test_ssl.py is broken in Centos7

2017-05-02 Thread STINNER Victor

STINNER Victor added the comment:

Oh, I missed the attached test.log file. So, it's CentOS 7.3.1611 and the full 
error message is:

== CPython 3.5.2 (default, Apr 29 2017, 16:07:16) [GCC 4.8.5 20150623 (Red Hat 
4.8.5-11)]
==   Linux-3.10.0-514.16.1.el7.x86_64-x86_64-with-centos-7.3.1611-Core 
little-endian
==   hash algorithm: siphash24 64bit
==   /home/vagrant/Downloads/Python-3.5.2/build/test_python_16502
...
[1/1/1] test_ssl
test_ssl: testing with 'OpenSSL 1.0.1e-fips 11 Feb 2013' (1, 0, 1, 5, 15)
  under Linux ('CentOS Linux', '7.3.1611', 'Core')
  HAS_SNI = True
  OP_ALL = 0x83f7
  OP_NO_TLSv1_1 = 0x1000
...
test_read_write_data (test.test_ssl.NetworkedBIOTests) ... Needed 3 calls to 
complete do_handshake().
Needed 1 calls to complete write().
ERROR
...
==
ERROR: test_read_write_data (test.test_ssl.NetworkedBIOTests)
--
Traceback (most recent call last):
  File "/home/vagrant/Downloads/Python-3.5.2/Lib/test/test_ssl.py", line 1785, 
in test_read_write_data
buf = self.ssl_io_loop(sock, incoming, outgoing, sslobj.read, 1024)
  File "/home/vagrant/Downloads/Python-3.5.2/Lib/test/test_ssl.py", line 1724, 
in ssl_io_loop
sock.sendall(buf)
BrokenPipeError: [Errno 32] Broken pipe

--
Ran 117 tests in 39.538s

FAILED (errors=1, skipped=8)
/home/vagrant/Downloads/Python-3.5.2/Lib/unittest/case.py:628: ResourceWarning: 
unclosed 
  outcome.errors.clear()
test test_ssl failed

--

___
Python tracker 

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



[issue30212] test_ssl.py is broken in Centos7

2017-05-02 Thread STINNER Victor

STINNER Victor added the comment:

David: can you please check if you get the same error with Python 3.6, or even 
the development version (Git master branch)?

--

___
Python tracker 

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



[issue30227] test_site must not write outside the build directory: must not write into $HOME/.local/

2017-05-02 Thread STINNER Victor

New submission from STINNER Victor:

test_site creates the $HOME/.local/lib/python3.7/site-packages/ directory, or 
parent directories if needed. That's wrong. An unit test must not modify its 
environment, especially the home directory!

The unit test must mock $HOME environment variable and mock the home directory.

Example of issue of writing into $HOME:

http://buildbot.python.org/all/builders/AMD64%20FreeBSD%20CURRENT%20Non-Debug%203.5/builds/75/steps/test/logs/stdio

[109/398] test_site
test_site skipped -- unable to create user site directory 
('/.local/lib/python3.5/site-packages'): [Errno 13] Permission denied: '/.local'

On this buildbot, $HOME is set to /. The whole test_site test is skipped just 
because of that.

Recent change on test_site related to this issue: commit 
b85c136903c6d2368162f7c4a58f258c9c69ead0, bpo-30108.

--
components: Distutils, Tests
messages: 292739
nosy: dstufft, haypo, merwok
priority: normal
severity: normal
status: open
title: test_site must not write outside the build directory: must not write 
into $HOME/.local/
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



[issue30132] [Windows] test_distutils leaks a vc140.pdb file

2017-05-02 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +1488

___
Python tracker 

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



[issue30199] Warning -- asyncore.socket_map was modified by test_ssl

2017-05-02 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +1489

___
Python tracker 

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



[issue30132] [Windows] test_distutils leaks a vc140.pdb file

2017-05-02 Thread STINNER Victor

STINNER Victor added the comment:

I'm unable to run test_distutils on Windows using python_d.exe: I get link 
error 1101.

LINK : fatal error LNK1101: incorrect MSPDB140.DLL version; recheck 
installation of this product

I ran manually the following command, but it didn't help:

   "%VS140COMNTOOLS%\..\..\VC"\vcvarsall.bat amd64 

I also tried to modify manually the PATH environment variable to only include 
the VC amd64 path, but it didn't work neither. I don't know how to fix the 
error. I don't understand how the configure the C compiler and it's hard to get 
good documentation on it :-/

So I wrote https://github.com/python/cpython/pull/1380 another attempt to fix 
the test_distutils warning.

--

___
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-02 Thread Louie Lu

Changes by Louie Lu :


--
pull_requests: +1490

___
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-02 Thread Louie Lu

Louie Lu added the comment:

@Terry, the PR is created, it is now serving with signature. The two exception 
(object not callable, invalid method signature) will return the corresponding 
message.

The only thing I didn't figure out it how to change the color, so I didn't test 
for this feature.

--

___
Python tracker 

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



[issue30219] webbrowser.open outputs xdg-open deprecation warning

2017-05-02 Thread desbma

desbma added the comment:

I'm on Arch Linux with Cinnamon, all packages up to date and xdg-utils 1.1.1 
(https://www.archlinux.org/packages/extra/any/xdg-utils/).

The fix you mention has not been included in a release yet, last release of 
xdg-utils is from 2015 (https://portland.freedesktop.org/download/).

So it likely many other Linux distributions are affected (eg. Ubuntu 16.04 LTS) 
and will never see a xdg-utils fix, if it is ever released.

That is why I think we should consider silencing xdg-open's output at the Popen 
call line. I can't think of any downside of doing so.

--

___
Python tracker 

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



[issue30219] webbrowser.open outputs xdg-open deprecation warning

2017-05-02 Thread desbma

desbma added the comment:

Also most other Popen calls in the webbrowser module already silence the called 
program's output, so it makes sense to do the same for the BackgroundBrowser 
class.

Here is a small patch for discussion.

--
keywords: +patch
Added file: http://bugs.python.org/file46845/issue30218-1.patch

___
Python tracker 

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



[issue30228] Open a file in text mode requires too many syscalls

2017-05-02 Thread STINNER Victor

New submission from STINNER Victor:

Example:

with open("x", "w", encoding="utf-8") as fp:
fp.write("HERE")
fp.close()

syscalls:

14249 open("x", O_WRONLY|O_CREAT|O_TRUNC|O_CLOEXEC, 0666) = 3
14249 fstat(3, {st_mode=S_IFREG|0664, st_size=0, ...}) = 0
14249 ioctl(3, TCGETS, 0x7fff07d43330)  = -1 ENOTTY (Inappropriate ioctl for 
device)
14249 lseek(3, 0, SEEK_CUR) = 0
14249 lseek(3, 0, SEEK_CUR) = 0
14249 lseek(3, 0, SEEK_CUR) = 0
14249 write(3, "HERE", 4)   = 4
14249 close(3)  = 0

I only expected 3 syscalls: open, write, close.

* fstat() is used by the FileIO constructor to check if the file is a directory 
or not, and to get the block size
* ioctl() comes from open() which checks if the file is a TTY or not, to decide 
how to configure buffering
* the first lseek() is used by the BuffererWriter constructor to initialize the 
private abs_pos attribute
* the second lseek() is used by the TextIOWrapper constructor to check if the 
underlying file object (buffered writer) is seekable or not
* the last lseek() is used to create the cookie object in TextIOWrapper 
constructor

Can we maybe reduce the number of lseek() to a single syscall?

For example, BuffererWriter constructor calls FileIO.tell(): can't this method 
set the seekable attribute depending on lseek() success, as the FileIO.seekable 
property?

--
messages: 292744
nosy: haypo, pitrou, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Open a file in text mode requires too many syscalls
type: performance
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



[issue30132] [Windows] test_distutils leaks a vc140.pdb file

2017-05-02 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 92fd6c9ef54a857815e3dca8ee74b2b4f5cdf154 by Victor Stinner in 
branch 'master':
bpo-30132: distutils BuildExtTestCase use temp_cwd (#1380)
https://github.com/python/cpython/commit/92fd6c9ef54a857815e3dca8ee74b2b4f5cdf154


--

___
Python tracker 

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



[issue30199] Warning -- asyncore.socket_map was modified by test_ssl

2017-05-02 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 1dae7450c68bad498e57800387b24cb103c461fa by Victor Stinner in 
branch 'master':
bpo-30199: test_ssl closes all asyncore channels (#1381)
https://github.com/python/cpython/commit/1dae7450c68bad498e57800387b24cb103c461fa


--

___
Python tracker 

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



[issue30212] test_ssl.py is broken in Centos7

2017-05-02 Thread david-cpi

david-cpi added the comment:

Hi Victor,
I will try during the day and get back with the logs.

--

___
Python tracker 

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



[issue30228] Open a file in text mode requires too many syscalls

2017-05-02 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +1491

___
Python tracker 

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



[issue30224] remove outdated checks in struct

2017-05-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Could you please run microbenchmarks for affected code to be sure that changes 
don't hit performance (if for example PyLong_FromLongLong is significantly 
slower than PyLong_FromLong)?

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue30228] Open a file in text mode requires too many syscalls

2017-05-02 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +1492

___
Python tracker 

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



[issue30228] Open a file in text mode requires too many syscalls

2017-05-02 Thread STINNER Victor

Changes by STINNER Victor :


--
components: +IO

___
Python tracker 

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



[issue30229] Closing a BufferedRandom calls lseek() mutliple times

2017-05-02 Thread STINNER Victor

New submission from STINNER Victor:

Given the following snippet:

with open("x", "w+", encoding="utf-8") as fp:
pass

Creating the TextIOWrapper object requires many syscall: see the issue #30228.

But I also noticed that *closing* such object also requires multiple lseek() 
syscalls, whereas the snippet doesn't read nor write anything.

Attached PR avoids lseek() if read and write buffers are empty.

--
components: IO
messages: 292749
nosy: haypo, pitrou, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Closing a BufferedRandom calls lseek() mutliple times
type: performance
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



[issue30212] test_ssl.py is broken in Centos7

2017-05-02 Thread david-cpi

david-cpi added the comment:

Hello Victor,

in 3.6.1 the test passes but it's because on sub-test was removed.

The one generating the issue is NetworkedBIOTests which is not found in 3.6.1.

in 3.5.2:
if support.is_resource_enabled('network'):
tests.append(NetworkedTests)
tests.append(NetworkedBIOTests)
in 3.6.1
if support.is_resource_enabled('network'):
tests.append(NetworkedTests)

--

___
Python tracker 

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



[issue30212] test_ssl.py is broken in Centos7

2017-05-02 Thread STINNER Victor

STINNER Victor added the comment:

> in 3.6.1 the test passes but it's because on sub-test was removed.

The unit tests still exist and were enhanced.

On Python 3.5, the BIO read-write data test used the external server 
self-signed.pythontest.net. On Python 3.6, the test now uses a server running 
locally. See issue #25940 and commit 3840b2ac6728d1940a7efc2ecab2c7d9a100c080.

Note: the failing test was renamed to test_bio_read_write_data.

--

David: You can try the following command to run the failing test in verbose 
mode (and only run this test). You can add --forever option to run the test in 
a loop until it fails.

In your output, I see "Needed 3 calls to complete do_handshake(). Needed 1 
calls to complete write()." but not "Needed 2 calls to complete read(). Needed 
1 calls to complete unwrap().".

For Python 3.5:

haypo@selma$ ./python -m test -u all test_ssl -v -m test_read_write_data

== CPython 3.5.3+ (default, May 2 2017, 11:20:59) [GCC 6.3.1 20161221 (Red Hat 
6.3.1-1)]
==   Linux-4.10.11-200.fc25.x86_64-x86_64-with-fedora-25-Twenty_Five 
little-endian
==   hash algorithm: siphash24 64bit
==   /home/haypo/prog/python/3.5/build/test_python_20359
Testing with flags: sys.flags(debug=0, inspect=0, interactive=0, optimize=0, 
dont_write_bytecode=0, no_user_site=0, no_site=0, ignore_environment=0, 
verbose=0, bytes_warning=0, quiet=0, hash_randomization=1, isolated=0)
[1/1] test_ssl
test_ssl: testing with 'OpenSSL 1.0.2k-fips  26 Jan 2017' (1, 0, 2, 11, 15)
  under Linux ('Fedora', '25', 'Twenty Five')
  HAS_SNI = True
  OP_ALL = 0x83ff
  OP_NO_TLSv1_1 = 0x1000
test_read_write_data (test.test_ssl.NetworkedBIOTests) ... Needed 3 calls to 
complete do_handshake().
Needed 1 calls to complete write().
Needed 2 calls to complete read().
Needed 1 calls to complete unwrap().
ok

--
Ran 1 test in 0.456s

OK
1 test OK.


For Python 3.6:

haypo@selma$ ./python -m test test_ssl -v -m test_bio_read_write_data

== CPython 3.6.1+ (default, May 2 2017, 10:23:14) [GCC 6.3.1 20161221 (Red Hat 
6.3.1-1)]
==   Linux-4.10.11-200.fc25.x86_64-x86_64-with-fedora-25-Twenty_Five 
little-endian
==   hash algorithm: siphash24 64bit
==  cwd: /home/haypo/prog/python/3.6/build/test_python_20383
==  encodings: locale=UTF-8, FS=utf-8
Testing with flags: sys.flags(debug=0, inspect=0, interactive=0, optimize=0, 
dont_write_bytecode=0, no_user_site=0, no_site=0, ignore_environment=0, 
verbose=0, bytes_warning=0, quiet=0, hash_randomization=1, isolated=0)
Run tests sequentially
0:00:00 [1/1] test_ssl
test_ssl: testing with 'OpenSSL 1.0.2k-fips  26 Jan 2017' (1, 0, 2, 11, 15)
  under Linux ('Fedora', '25', 'Twenty Five')
  HAS_SNI = True
  OP_ALL = 0x83ff
  OP_NO_TLSv1_1 = 0x1000
test_bio_read_write_data (test.test_ssl.SimpleBackgroundTests) ...  server:  
new connection from ('127.0.0.1', 42160)
 server: connection cipher is now ('ECDHE-RSA-AES256-SHA', 'TLSv1/SSLv3', 256)
 server: selected protocol is now None
Needed 3 calls to complete do_handshake().
Needed 1 calls to complete write().
Needed 2 calls to complete read().
Needed 2 calls to complete unwrap().
ok

--
Ran 1 test in 0.058s

OK
1 test OK.

Total duration: 413 ms
Tests result: SUCCESS

--

___
Python tracker 

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



[issue30229] Closing a BufferedRandom calls lseek() mutliple times

2017-05-02 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +1493

___
Python tracker 

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



[issue30228] Open a file in text mode requires too many syscalls

2017-05-02 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 999707373630ce090300c3c542066f493b12faa0 by Victor Stinner in 
branch 'master':
bpo-30228: FileIO seek() and tell() set seekable (#1384)
https://github.com/python/cpython/commit/999707373630ce090300c3c542066f493b12faa0


--

___
Python tracker 

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



[issue29641] ./configure --enable-optimizations && make && make install compiles Python twice

2017-05-02 Thread STINNER Victor

STINNER Victor added the comment:

Ok, I tested again: in fact, "it works" but "make install" recompiles Python 
from scratch (1st build with -fprofile-generate, profile task, 2nd build with 
-fprofile-use) whereas "make" just succeeded to build Python!?

--
title: make install failure when using ./configure --enable-optimizations -> 
./configure --enable-optimizations && make && make install compiles Python twice

___
Python tracker 

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



[issue30132] [Windows] test_distutils leaks a vc140.pdb file

2017-05-02 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +1494

___
Python tracker 

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



[issue29641] ./configure --enable-optimizations && make && make install compiles Python twice

2017-05-02 Thread STINNER Victor

STINNER Victor added the comment:

Oh, it's just a duplicate of issue #29243.

--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> --enable-optimizations makes common build commands always need 
to compile from scratch

___
Python tracker 

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



[issue30224] remove outdated checks in struct

2017-05-02 Thread Xiang Zhang

Xiang Zhang added the comment:

There seems no significant regression in performance. A microbenchmark against 
nu_longlong:

./python3 -m perf timeit --duplicate=1000 --compare-to 
/home/angwer/repos/cpython/python -s 'import struct; p = struct.Struct("@L")' 
'p.unpack(b"d\x00\x00\x00\x00\x00\x00\x00")'
python: . 156 ns +- 10 ns
python3: . 157 ns +- 9 ns

Median +- std dev: [python] 156 ns +- 10 ns -> [python3] 157 ns +- 9 ns: 1.01x 
slower
Not significant!

--

___
Python tracker 

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



[issue30132] [Windows] test_distutils leaks a vc140.pdb file

2017-05-02 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 30768958490c658fba0fe24f1cabbdad44be22ff by Victor Stinner in 
branch '3.6':
bpo-30132: distutils BuildExtTestCase use temp_cwd (#1387)
https://github.com/python/cpython/commit/30768958490c658fba0fe24f1cabbdad44be22ff


--

___
Python tracker 

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



[issue30132] [Windows] test_distutils leaks a vc140.pdb file

2017-05-02 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +1495

___
Python tracker 

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



[issue30131] test_logging leaks a "dangling" thread

2017-05-02 Thread STINNER Victor

STINNER Victor added the comment:

Ok, this bug is now fixed in 3.5, 3.6 and master (3.7).

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

___
Python tracker 

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



[issue30173] x86 Windows7 3.x buildbot has the issue #26624 bug

2017-05-02 Thread STINNER Victor

STINNER Victor added the comment:

I don't see the bug again, I confirm that the bug was fixed. Thanks David.

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

___
Python tracker 

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



[issue30228] Open a file in text mode requires too many syscalls

2017-05-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I don't like PR 1385. abs_pos is a private attribute used only in 
_io._Buffered.seek() for readable streams when whence is SEEK_SET or SEEK_CUR. 
There is no guarantee that it contains relevant value for non-readable stream.

You could call buffer.seek(0, SEEK_CUR) rather than buffer.tell() for avoiding 
a system call for readable stream. But this looks as a shamanism too.

Or provide a function similar to the RAW_TELL macro but just checking if the 
current position is 0. If define it in bufferedio.c near _buffered_raw_tell() 
it is more chance that it is consistent with abs_pos and future changes don't 
break it.

--

___
Python tracker 

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



[issue30124] Fix C aliasing issue in Python/dtoa.c to use strict aliasing on Clang 4.0

2017-05-02 Thread STINNER Victor

STINNER Victor added the comment:

dtoa.c is now compiled with -fno-string-aliasing (for any clang version, not 
only clang 4.0) on Python 3.5, 3.6 and 3.7.

It was decided to not touch dtoa.c to not diverge from upstream.

Thanks Dimitry Andric and Mark Dickinson for your reviews and support in this 
cryptic issue!

Note 1: We consider that Clang 4.0 is wrong, whereas GCC respects the C99 
standard for aliasing on unions. But I don't think that it matters much who is 
wrong or not :-)

Note 2: Python 2.7 already used -fno-strict-aliasing on all .c files because of 
its design of PyObject structures, fixed in Python 3.

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

___
Python tracker 

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



[issue30104] clang 4.0 miscompiles dtoa.c, giving broken float parsing and printing

2017-05-02 Thread STINNER Victor

STINNER Victor added the comment:

dtoa.c is now compiled with -fno-string-aliasing (for any clang version, not 
only clang 4.0) on Python 3.5, 3.6 and 3.7.

It was decided to not touch dtoa.c to not diverge from upstream.

Thanks Dimitry Andric and Mark Dickinson for your reviews and support in this 
cryptic issue!

Note 1: We consider that Clang 4.0 is wrong, whereas GCC respects the C99 
standard for aliasing on unions. But I don't think that it matters much who is 
wrong or not :-)

Note 2: Python 2.7 already used -fno-strict-aliasing on all .c files because of 
its design of PyObject structures, fixed in Python 3.

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



[issue30224] remove outdated checks in struct

2017-05-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I see a tiny 3% regression.

$ ./python -m timeit -s 'import struct; u = struct.Struct("10Q").unpack; b 
= b"abcd\0\0\0\0"*10' 'u(b)'
Unpatched:  50 loops, best of 5: 9.34 msec per loop
Patched:50 loops, best of 5: 9.66 msec per loop

$ ./python -m timeit -s 'import struct; u = struct.Struct("<10Q").unpack; b 
= b"abcd\0\0\0\0"*10' 'u(b)'
Unpatched:  50 loops, best of 5: 9.37 msec per loop
Patched:50 loops, best of 5: 9.71 msec per loop

$ ./python -m timeit -s 'import struct; u = struct.Struct(">10Q").unpack; b 
= b"\0\0\0\0dcba"*10' 'u(b)'
Unpatched:  20 loops, best of 5: 11.6 msec per loop
Patched:20 loops, best of 5: 12 msec per loop

--

___
Python tracker 

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



[issue30132] [Windows] test_distutils leaks a vc140.pdb file

2017-05-02 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 3ceeb84b5a90e327ef55190105e82c926b0b8aab by Victor Stinner in 
branch '3.5':
bpo-30132: distutils BuildExtTestCase use temp_cwd (#1387) (#1388)
https://github.com/python/cpython/commit/3ceeb84b5a90e327ef55190105e82c926b0b8aab


--

___
Python tracker 

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



[issue30199] Warning -- asyncore.socket_map was modified by test_ssl

2017-05-02 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +1496

___
Python tracker 

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



[issue30199] Warning -- asyncore.socket_map was modified by test_ssl

2017-05-02 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +1497

___
Python tracker 

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



[issue30230] Move quick test in PyObject_IsSubClass outside if PyType_CheckExact guard

2017-05-02 Thread Jim Fasarakis-Hilliard

New submission from Jim Fasarakis-Hilliard:

Currently the first lines in PyObject_IsSubClass are:

/* We know what type's __subclasscheck__ does. */
if (PyType_CheckExact(cls)) {
/* Quick test for an exact match */
if (derived == cls)
return 1;
return recursive_issubclass(derived, cls);
}

The if (derived == cls) runs only if PyType_CheckExact is True which doesn't 
hold for any classes with a custom metaclass. As a result, a check of the form 
issubclass(Sequence, Sequence) will take a slow path that invokes 
__subclasscheck__.

I'm not sure if this was placed inside there due to some wild edge-case, 
though. PyObject_IsInstance uses the same trick and does so outside the if 
(PyType_CheckExact(cls)) check.

I'll gladly submit a PR if this indeed needs fixing and not by design.

--
components: Interpreter Core
messages: 292764
nosy: Jim Fasarakis-Hilliard
priority: normal
severity: normal
status: open
title: Move quick test in PyObject_IsSubClass outside if PyType_CheckExact guard
type: behavior
versions: Python 3.7

___
Python tracker 

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



[issue30125] test_SEH() of test_ctypes logs "Windows fatal exception: access violation"

2017-05-02 Thread STINNER Victor

STINNER Victor added the comment:

faulthandler.disable() has been fixed on Windows in Python 3.6 and master (3.7).

The test_ctypes warning has been made quiet in Python 3.6 and master (3.7) as 
well.

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

___
Python tracker 

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



[issue30230] Move quick test in PyObject_IsSubClass outside of PyType_CheckExact guard

2017-05-02 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
title: Move quick test in PyObject_IsSubClass outside if PyType_CheckExact 
guard -> Move quick test in PyObject_IsSubClass outside of PyType_CheckExact 
guard
type: behavior -> performance

___
Python tracker 

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



[issue30126] CheckTraceCallbackContent of test_sqlite3 fails on OS X Tiger

2017-05-02 Thread STINNER Victor

STINNER Victor added the comment:

David: "Ok, this should be resolved."

Oh, thank you! I confirm that test_sqlite3 pass again!

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

___
Python tracker 

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



[issue30169] test_multiprocessing_spawn crashed on AMD64 Windows8.1 Non-Debug 3.x buildbot

2017-05-02 Thread STINNER Victor

STINNER Victor added the comment:

Sadly, the random issue didn't reoccur in the following 13 builds. So I close 
the issue. I will reopen it if I see the crash again.

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



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

2017-05-02 Thread STINNER Victor

New submission from STINNER Victor:

The public cyrus.andrew.cmu.edu IMAP server (port 993) doesn't accept TLS 
connection using our self-signed x509 certificate. The following two tests of 
test_imaplib were skipped by the issue #30175:

* test_logincapa_with_client_certfile() of RemoteIMAP_SSLTest
* test_logincapa_with_client_ssl_context() of RemoteIMAP_SSLTest

We should either remove these tests or spawn an IMAP server which accepts such 
certificate on pythontest.net.

@Benjamin: Is there someone available to build such IMAP server on 
pythontest.net? Or do you suggest to just remove the 2 unit tests?

--
components: Tests
messages: 292768
nosy: benjamin.peterson, dstufft, gregory.p.smith, haypo, pitrou
priority: normal
severity: normal
status: open
title: test_imaplib needs a TLS server accepting self-signed certificates
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



[issue30175] Random test_imaplib.test_logincapa_with_client_certfile failure on x86 Gentoo Installed with X 3.x

2017-05-02 Thread STINNER Victor

STINNER Victor added the comment:

Buildbots are now fixed, I close the issue.

I created the issue #30231 to propose to run an IMAP server on pythontest.net, 
or to remove the two unit tests which are currently skipped.

Thanks for your help 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



[issue30199] Warning -- asyncore.socket_map was modified by test_ssl

2017-05-02 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 89a54c73746417bae003a9985668fa665040d5d9 by Victor Stinner in 
branch '3.5':
bpo-30199: test_ssl closes all asyncore channels (#1381) (#1389)
https://github.com/python/cpython/commit/89a54c73746417bae003a9985668fa665040d5d9


--

___
Python tracker 

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



[issue30199] Warning -- asyncore.socket_map was modified by test_ssl

2017-05-02 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 3c422b92653df05c7034136b77f76376aa5aec4f by Victor Stinner in 
branch '3.6':
bpo-30199: test_ssl closes all asyncore channels (#1381) (#1390)
https://github.com/python/cpython/commit/3c422b92653df05c7034136b77f76376aa5aec4f


--

___
Python tracker 

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



[issue27593] Deprecate sys._mercurial and create sys._git

2017-05-02 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 2c7085fd7b00cba8b5ab258c62453b6a12418b73 by Victor Stinner in 
branch '2.7':
bpo-27593: Get SCM build info from git instead of hg (#1327)
https://github.com/python/cpython/commit/2c7085fd7b00cba8b5ab258c62453b6a12418b73


--

___
Python tracker 

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



[issue30224] remove outdated checks in struct

2017-05-02 Thread Xiang Zhang

Xiang Zhang added the comment:

The test on my box is reverse and stable, python3 is unpatched and python is 
patched. Anyway, it can't be called significant.

 ./python3 -m perf timeit --compare-to /home/angwer/repos/cpython/python -s 
'import struct; u = struct.Struct("10Q").unpack; 
b=b"abcd\x00\x00\x00\x00"*10' 'u(b)'
python: . 2.96 ms +- 0.05 ms
python3: . 3.13 ms +- 0.03 ms

Median +- std dev: [python] 2.96 ms +- 0.05 ms -> [python3] 3.13 ms +- 0.03 ms: 
1.06x slower

./python3 -m perf timeit --compare-to /home/angwer/repos/cpython/python -s 
'import struct; u = struct.Struct("<10Q").unpack; 
b=b"abcd\x00\x00\x00\x00"*10' 'u(b)'
python: . 2.96 ms +- 0.05 ms
python3: . 3.13 ms +- 0.14 ms

Median +- std dev: [python] 2.96 ms +- 0.05 ms -> [python3] 3.13 ms +- 0.14 ms: 
1.06x slower

./python3 -m perf timeit --compare-to /home/angwer/repos/cpython/python -s 
'import struct; u = struct.Struct(">10Q").unpack; 
b=b"\x00\x00\x00\x00dcba"*10' 'u(b)'
python: . 3.51 ms +- 0.09 ms
python3: . 3.67 ms +- 0.06 ms

Median +- std dev: [python] 3.51 ms +- 0.09 ms -> [python3] 3.67 ms +- 0.06 ms: 
1.05x slower

--

___
Python tracker 

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



[issue30232] configure: support Git worktree

2017-05-02 Thread STINNER Victor

New submission from STINNER Victor:

configure.ac tests if .git/HEAD file exists to decide if it should get the git 
version / tag / branch.

I use git worktree to get 2.7, 3.5, 3.6 and master in their own directory. When 
using git worktree, ".git" is a text file with a content like:

haypo@selma$ cat ~/prog/python/2.7/.git
gitdir: /home/haypo/prog/python/master/.git/worktrees/2.7

Git supports such file, but configure.ac doesn't to Git in that case.

Attached PR fixes configure.ac to support Git worktree.

--
components: Build
messages: 292774
nosy: brett.cannon, haypo, ncoghlan
priority: normal
severity: normal
status: open
title: configure: support Git worktree
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



[issue30232] configure: support Git worktree

2017-05-02 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +1498

___
Python tracker 

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



[issue30232] configure: support Git worktree

2017-05-02 Thread STINNER Victor

STINNER Victor added the comment:

See the bpo-29798 which added support for Git worktree in `make patchcheck`.

--

___
Python tracker 

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



[issue30205] socket.getsockname() type mismatch with AF_UNIX on Linux

2017-05-02 Thread Antoine Pitrou

Antoine Pitrou added the comment:


New changeset 495b5021e73e3c4b6404417ecf4fa83aa10297f0 by Antoine Pitrou in 
branch 'master':
bpo-30205: Fix getsockname() for unbound AF_UNIX sockets on Linux (#1370)
https://github.com/python/cpython/commit/495b5021e73e3c4b6404417ecf4fa83aa10297f0


--

___
Python tracker 

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



[issue30224] remove outdated checks in struct

2017-05-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Your patch LGTM. Current code in _struct.c is ugly. I just wonder if it is 
worth to optimize PyLong_FromLongLong and PyLong_FromUnsignedLongLong if they 
are slower than PyLong_FromLong and PyLong_FromUnsignedLong.

--

___
Python tracker 

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



[issue27593] Deprecate sys._mercurial and create sys._git

2017-05-02 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +1499

___
Python tracker 

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



[issue27593] Deprecate sys._mercurial and create sys._git

2017-05-02 Thread STINNER Victor

STINNER Victor added the comment:

With https://github.com/python/cpython/pull/1392 Python 2.7 should up to date 
with Python master, and this issue should be fixed. Or did I miss something?

--

___
Python tracker 

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



[issue30223] Add Lib/test/__main__.py in 2.7

2017-05-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:


New changeset 43566aee12a177a7aef5d732abf768251e6b8a12 by Serhiy Storchaka in 
branch '2.7':
[2.7] bpo-30223: Add Lib/test/__main__.py. (#1373)
https://github.com/python/cpython/commit/43566aee12a177a7aef5d732abf768251e6b8a12


--

___
Python tracker 

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



[issue30132] [Windows] test_distutils leaks a vc140.pdb file

2017-05-02 Thread STINNER Victor

STINNER Victor added the comment:

Ok, this issue is now fixed in 3.5, 3.6 and master (3.7).

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

___
Python tracker 

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



[issue30205] socket.getsockname() type mismatch with AF_UNIX on Linux

2017-05-02 Thread Giampaolo Rodola'

Giampaolo Rodola' added the comment:

Thanks.

--

___
Python tracker 

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



[issue29992] Expose parse_string in JSONDecoder

2017-05-02 Thread Bob Ippolito

Bob Ippolito added the comment:

That's not a very convincing argument. Python 2 only returns byte strings if 
the input is a byte string and the contents of the string are all ASCII. 
Facilitating that sort of behavior in 3 would probably cause more issues than 
it solves.

--

___
Python tracker 

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



[issue30233] [3.5] Warning -- locale was modified by test_idle

2017-05-02 Thread STINNER Victor

New submission from STINNER Victor:

Importing idlelib.IOBinding modifies the LC_CTYPE locale. For example, this 
module is imported by idlelib.EditorWindow which is imported by 
idlelib.idle_test.test_formatparagraph.

As a consequence, running test_idle changes locales and the following warning 
is logged:

[3.5] Warning -- locale was modified by test_idle

http://buildbot.python.org/all/builders/AMD64%20Windows10%203.5/builds/224/steps/test/logs/warnings%20%281%29

I didn't check yet why I only see this warning on 3.5 buildbots.

--
assignee: terry.reedy
components: IDLE, Tests, Windows
messages: 292783
nosy: haypo, paul.moore, steve.dower, terry.reedy, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: [3.5] Warning -- locale was modified by test_idle
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



[issue30234] Remove duplicate checks in test_isinstance

2017-05-02 Thread Jim Fasarakis-Hilliard

New submission from Jim Fasarakis-Hilliard:

The test file duplicates some isinstance and issubclass checks due to the  
distinction of classes in Python 2. 

Proposed PR removes duplicate asserts.

--
components: Tests
messages: 292784
nosy: Jim Fasarakis-Hilliard
priority: normal
severity: normal
status: open
title: Remove duplicate checks in test_isinstance
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



[issue30234] Remove duplicate checks in test_isinstance

2017-05-02 Thread Jim Fasarakis-Hilliard

Changes by Jim Fasarakis-Hilliard :


--
pull_requests: +1500

___
Python tracker 

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



[issue27593] Deprecate sys._mercurial and create sys._git

2017-05-02 Thread Brett Cannon

Brett Cannon added the comment:

I think that covers it!

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



[issue30223] Add Lib/test/__main__.py in 2.7

2017-05-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

These new features affect only core developers and other contributors fixing 
bugs in 2.7. I don't think the "no new features" guideline is applicable here.

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

___
Python tracker 

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



[issue19903] Idle: Use inspect.signature for calltips

2017-05-02 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I will try to do that when I can.

--

___
Python tracker 

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



[issue30235] Validate shutil supports path-like objects, update docs accordingly

2017-05-02 Thread Brett Cannon

New submission from Brett Cannon:

If you look at the docs for shutil 
(https://docs.python.org/3/library/shutil.html), you will notice all over it 
says things like "path names given as strings". The question is whether that 
statement is true in the face of path-like objects? If it is true then the 
corresponding function in shutil should be updated to accept path-like objects. 
If it's false then the docs for the function should be updated.

This is a meta-issue to track working on the overall module (IOW separate PRs 
to fix things piecemeal is fine). Looks like the following functions need 
checking/updating:

- copyfile
- copymode
- copystat
- copy
- copy2
- copytree
- rmtree
- move
- disk_usage
- chown
- make_archive


[ unpack_archive is covered by https://github.com/python/cpython/pull/1367]

--
components: Library (Lib)
messages: 292788
nosy: brett.cannon
priority: normal
severity: normal
stage: test needed
status: open
title: Validate shutil supports path-like objects, update docs accordingly
type: behavior
versions: Python 3.7

___
Python tracker 

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



[issue30235] Validate shutil supports path-like objects, update docs accordingly

2017-05-02 Thread Brett Cannon

Changes by Brett Cannon :


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



[issue28556] typing.py upgrades

2017-05-02 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:


New changeset f06e0218ef6007667f5d61184b85a81a0466d3ae by Mariatta (Ivan 
Levkivskyi) in branch 'master':
bpo-28556: Routine updates to typing (#1366)
https://github.com/python/cpython/commit/f06e0218ef6007667f5d61184b85a81a0466d3ae


--

___
Python tracker 

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



[issue30235] Validate shutil supports path-like objects, update docs accordingly

2017-05-02 Thread Jelle Zijlstra

Changes by Jelle Zijlstra :


--
pull_requests: +1501

___
Python tracker 

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



[issue30236] Add options --match and --failfast for test.regrtest in 2.7

2017-05-02 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

Proposed patch adds options -m/--match and -G/--failfast for test.regrtest in 
2.7. They are two the most wanted by me features absent in 2.7.

I use them when add new test in long running test file. Often this needs 
running the test multiple times, incrementally changing the test or code until 
the test cover all cases and successful. Waiting running other tests in the 
same file is just waste of time.

Other cases -- fast running tests related to some feature in different files. 
For example -m '*ickl*' allows to run all pickle-related tests.

The code is backported from 3.3. This is the last version using getopt and the 
most compatible with 2.7. There was several major rewriting of regrtest in 
following versions.

--
components: Tests
messages: 292790
nosy: ezio.melotti, haypo, ncoghlan, serhiy.storchaka, xiang.zhang
priority: normal
severity: normal
stage: patch review
status: open
title: Add options --match and --failfast for test.regrtest in 2.7
type: enhancement
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



[issue30236] Add options --match and --failfast for test.regrtest in 2.7

2017-05-02 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
pull_requests: +1502

___
Python tracker 

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



[issue30237] Access violation due to CancelSynchronousIo of console read

2017-05-02 Thread Eryk Sun

New submission from Eryk Sun:

When ReadConsole is canceled by CancelSynchronousIo [1], for some reason the 
call still succeeds. It's probably related to the hack that maps STATUS_ALERTED 
to ERROR_OPERATION_ABORTED when a console read is interrupted by Ctrl+C.

The problem is that, when canceled, ReadConsole doesn't update the value of 
lpNumberOfCharsRead. Thus in read_console_w in Modules/_io/winconsoleio.c, the 
value of `n` is a random number that gets added to `readlen`, which is 
subsequently used to index into `buf`. The problem is the same for `n_read` in 
_PyOS_WindowsConsoleReadline.

For example, in 3.6:

import sys, ctypes, threading
kernel32 = ctypes.WinDLL('kernel32')
hMain = kernel32.OpenThread(1, 0, kernel32.GetCurrentThreadId())
t = threading.Timer(30, kernel32.CancelSynchronousIo, (hMain,))
t.start()
sys.stdin.readline()


Breakpoint 0 hit
KERNELBASE!ReadConsoleW:
7ffc`fb558200 4053pushrbx
0:000> pt
KERNELBASE!GetImmersiveColorTypeFromName+0x49d2:
7ffc`fb5d2672 c3  ret
0:000> r rax
rax=0001
0:000> ?? @$teb->LastErrorValue == 995
bool true

0:000> gu
python36!read_console_w+0x8b:
`6e43a483 85c0testeax,eax
0:000> ?? n
unsigned long 0xefdc39e8
0:000> g
(1154.11fc): Access violation - code c005 (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
python36!read_console_w+0x11f:
`6e43a517 66833a0acmp word ptr [rdx],0Ah
ds:01e8`cfb72c7e=

If the value of `n` is initialized to (DWORD)-1, then checking for a failed or 
canceled call could be implemented as follows:

if (!res || (n == (DWORD)-1 && GetLastError() ==
ERROR_OPERATION_ABORTED)) {
err = GetLastError();
break;
}

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

--
components: IO, Windows
keywords: easy (C)
messages: 292791
nosy: eryksun, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
stage: test needed
status: open
title: Access violation due to CancelSynchronousIo of console read
type: crash
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



[issue30233] [3.5] Warning -- locale was modified by test_idle

2017-05-02 Thread Terry J. Reedy

Terry J. Reedy added the comment:

The warning, which became a failure in 3.6, was averted for 3.6 by #27372.  I 
intentionally did not patch 3.5 and merge forward because the warning was 
neither unique nor a failure, while adding the merge would have been a 
considerable bother.  Also, I anticipated that the 3.5.3 release after 3.6.0 
would be the last 3.5 bugfix release as per normal policy, so that this would 
be a moot point by now.  (And I have no idea why normal policy was not 
followed.)  I think this issue should be closed as any of "duplicate", "out of 
date", or "won't fix".

--
assignee: terry.reedy -> 

___
Python tracker 

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



[issue30237] Access violation due to CancelSynchronousIo of console read

2017-05-02 Thread Eryk Sun

Eryk Sun added the comment:

Oops, I pasted the MSDN link for ReadConsole instead of CancelSynchronousIo [1].

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

--

___
Python tracker 

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



[issue30223] Add Lib/test/__main__.py in 2.7

2017-05-02 Thread Zachary Ware

Zachary Ware added the comment:

Once again, I agree with the change, but I have an unhappy buildbot :)

http://buildbot.python.org/all/builders/x86%20Gentoo%20Non-Debug%20with%20X%202.7/builds/124

This time it is due to python 2.4 not supporting the absolute_import __future__ 
feature.  By this point, I think we could get away with just removing the 
python 2.4 pickle compat tests.

--
nosy: +zach.ware

___
Python tracker 

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



  1   2   >