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

2017-05-17 Thread Louie Lu

Changes by Louie Lu :


--
pull_requests: +1739

___
Python tracker 

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



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

2017-05-17 Thread Louie Lu

Changes by Louie Lu :


--
pull_requests: +1738

___
Python tracker 

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



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

2017-05-17 Thread Louie Lu

Changes by Louie Lu :


--
pull_requests: +1737

___
Python tracker 

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



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

2017-05-17 Thread Senthil Kumaran

Senthil Kumaran added the comment:


New changeset 906f5330b9c9a74cad1cf27fddaf77e99dff9edd by Senthil Kumaran in 
branch 'master':
bpo-29976: urllib.parse clarify '' in scheme values. (GH-984)
https://github.com/python/cpython/commit/906f5330b9c9a74cad1cf27fddaf77e99dff9edd


--

___
Python tracker 

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



[issue16487] Allow ssl certificates to be specified from memory rather than files.

2017-05-17 Thread Senthil Kumaran

Changes by Senthil Kumaran :


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



[issue16487] Allow ssl certificates to be specified from memory rather than files.

2017-05-17 Thread Senthil Kumaran

Senthil Kumaran added the comment:

Hi Jan-Philip, we might be close on this one. 
Could you convert your latest patch into PR against 
(https://github.com/python/cpython). Is will help to record you as the author 
as we can discuss the patch in python sprints and get this in. :-) Thanks!

--

___
Python tracker 

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



[issue30396] Document the PyClassMethod* C API functions.

2017-05-17 Thread Decorater

New submission from Decorater:

The way the documentation currently is set up there is no way to know what 
these functions in the C API actually do or what all the parameters are to call 
it unless someone source dives into python. Because of this I think making an C 
API page or a section for the functions like these or similar capabilities 
would be an Great an huge help to others as well as an example small module 
using said PyClassMethod* functions.

I will need to look at how far down in python versions that these functions 
exist for though.

--
assignee: docs@python
components: Documentation, Extension Modules
messages: 293907
nosy: Decorater, docs@python
priority: normal
severity: normal
status: open
title: Document the PyClassMethod* C API functions.
versions: Python 3.5, Python 3.6, Python 3.7

___
Python tracker 

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



[issue30303] IDLE: Add _utest to textview and add textview tests

2017-05-17 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
pull_requests: +1736

___
Python tracker 

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



[issue28618] Decorate hot functions using __attribute__((hot)) to optimize Python

2017-05-17 Thread Jesús Cea Avión

Changes by Jesús Cea Avión :


--
nosy: +jcea

___
Python tracker 

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



[issue30395] deadlocked child process after forking on pystate.c's head_mutex

2017-05-17 Thread Pádraig Brady

Changes by Pádraig Brady :


--
nosy: +pixelbeat

___
Python tracker 

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



[issue30395] deadlocked child process after forking on pystate.c's head_mutex

2017-05-17 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +haypo

___
Python tracker 

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



[issue30395] deadlocked child process after forking on pystate.c's head_mutex

2017-05-17 Thread Louis Brandy

New submission from Louis Brandy:

A forked process (via os.fork) can inherit a locked `head_mutex` from its 
parent process and will promptly deadlock in this stack (on my linux box):

Child Process (deadlocked):

#0  0x7f1a4da82e3c in futex_abstimed_wait_cancelable (private=0, 
abstime=0x0, expected=0, futex_word=0x7f1a4c2964e0) at 
../sysdeps/unix/sysv/linux/futex-internal.h:205
#1  0x7f1a4da82e3c in do_futex_wait (sem=sem@entry=0x7f1a4c2964e0, 
abstime=0x0) at sem_waitcommon.c:111
#2  0x7f1a4da82efc in __new_sem_wait_slow (sem=0x7f1a4c2964e0, abstime=0x0) 
at sem_waitcommon.c:181
#3  0x7f1a4da82fb9 in __new_sem_wait (sem=) at sem_wait.c:29
#4  0x7f1a4de4c605 in PyThread_acquire_lock_timed (lock=0x7f1a4c2964e0, 
microseconds=-1, intr_flag=0) at Python/thread_pthread.h:352
#5  0x7f1a4de4c4b4 in PyThread_acquire_lock (lock=, 
waitflag=waitflag@entry=1) at Python/thread_pthread.h:556
#6  0x7f1a4dd59e08 in _PyThreadState_DeleteExcept (tstate=0x7f19f2301800) 
at Python/pystate.c:483
#7  0x7f1a4dd46af4 in PyEval_ReInitThreads () at Python/ceval.c:326
#8  0x7f1a4dd78b0b in PyOS_AfterFork () at ./Modules/signalmodule.c:1608


The parent process has a race between one thread calling `os.fork` (and holding 
the GIL) and another (in our case C++) thread trying to use PyGILState_Ensure. 
PyGILState_Ensure will grab the head_mutex before it tries to get the GIL. So 
if a fork happens in this critical section, the child process will get the 
locked head_mutex. 

The path from PyGILState_Ensure -> head_mutex looks like this:

#0  new_threadstate (interp=0x7fb5fd483d80, init=init@entry=1) at 
Python/pystate.c:183
#1  0x7fb5ff149027 in PyThreadState_New (interp=) at 
Python/pystate.c:250
#2  0x7fb5ff006ac7 in PyGILState_Ensure () at Python/pystate.c:838




Possible fix?

A simple fix would be to, inside PyOS_AfterFork, reset/unlock pystate.c's 
head_mutex if it's already locked.

Unclear if this is related to: https://bugs.python.org/issue28812

--
components: Interpreter Core
messages: 293906
nosy: Louis Brandy
priority: normal
severity: normal
status: open
title: deadlocked child process after forking on pystate.c's head_mutex
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



[issue23749] asyncio missing wrap_socket (starttls)

2017-05-17 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


--
nosy: +barry

___
Python tracker 

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



[issue30394] smtplib leaves open sockets around if SMTPConnectError is raised in __init__

2017-05-17 Thread Joel Hillacre

Changes by Joel Hillacre :


Added file: http://bugs.python.org/file46875/test_client.py

___
Python tracker 

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



[issue30039] Resuming a 'yield from' stack is broken if a signal arrives in the middle

2017-05-17 Thread Yury Selivanov

Changes by Yury Selivanov :


--
pull_requests: +1735

___
Python tracker 

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



[issue30394] smtplib leaves open sockets around if SMTPConnectError is raised in __init__

2017-05-17 Thread Joel Hillacre

Changes by Joel Hillacre :


Added file: http://bugs.python.org/file46874/test_server.py

___
Python tracker 

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



[issue30394] smtplib leaves open sockets around if SMTPConnectError is raised in __init__

2017-05-17 Thread Joel Hillacre

New submission from Joel Hillacre:

I am encountering a ResourceWarning about an unclosed socket when getting a non 
220 response during connect() in __init__() of smtplib.SMTP. Attached are a 
client script causing this warning for me, a server script to cause the client 
to the warning and a patch that fixes the warning for me. My python version is 
Python 3.6.1 (default, Apr  7 2017, 09:32:32) [GCC 4.8.5 20150623 (Red Hat 
4.8.5-11)] on linux. I had found previous related issue with similar symptom 
and remedy in issue #21641.


$ python3.6 test_server.py
connected by ('127.0.0.1', 53630)
$ 


$ python3.6 test_client.py
Traceback (most recent call last):
  File "test_client.py", line 2, in 
smtp = smtplib.SMTP('127.0.0.1', 8025)
  File "/usr/lib64/python3.6/smtplib.py", line 253, in __init__
raise SMTPConnectError(code, msg)
smtplib.SMTPConnectError: (554, b'Nope.')
/usr/lib64/python3.6/socket.py:657: ResourceWarning: unclosed 
$ 


RFC 2821 states that servers responding with non 220 greetings must not close 
the connection. It is this behaviour that test_server.py is using to trigger 
the warning in test_client.py.

RFC 2821 Section 3.1 Paragraph 3
https://tools.ietf.org/html/rfc2821#section-3.1
   '... a 554 response MAY be given in the initial connection opening message
   instead of the 220.  A server taking this approach MUST still wait
   for the client to send a QUIT (see section 4.1.1.10) before closing
   the connection and SHOULD respond to any intervening commands with
   "503 bad sequence of commands".'

The ResourceWarning is no longer caused for me after applying this change.

--
components: Library (Lib)
files: smtplib.patch
keywords: patch
messages: 293905
nosy: jhillacre
priority: normal
severity: normal
status: open
title: smtplib leaves open sockets around if SMTPConnectError is raised in 
__init__
type: enhancement
versions: Python 3.6
Added file: http://bugs.python.org/file46873/smtplib.patch

___
Python tracker 

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



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

2017-05-17 Thread Jeremy Kloth

Changes by Jeremy Kloth :


--
nosy: +jkloth

___
Python tracker 

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



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

2017-05-17 Thread STINNER Victor

STINNER Victor added the comment:

Another failure on AMD64 Windows7 SP1 3.5:
http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.5/builds/145/steps/test/logs/stdio

==
FAIL: test_directory (test.test_multiprocessing_main_handling.SpawnCmdLineTest)
--
Traceback (most recent call last):
  File 
"C:\buildbot.python.org\3.5.kloth-win64\build\lib\test\test_multiprocessing_main_handling.py",
 line 197, in test_directory
self._check_script(script_dir)
  File 
"C:\buildbot.python.org\3.5.kloth-win64\build\lib\test\test_multiprocessing_main_handling.py",
 line 155, in _check_script
rc, out, err = assert_python_ok(*run_args, __isolated=False)
  File 
"C:\buildbot.python.org\3.5.kloth-win64\build\lib\test\support\script_helper.py",
 line 150, in assert_python_ok
return _assert_python(True, *args, **env_vars)
  File 
"C:\buildbot.python.org\3.5.kloth-win64\build\lib\test\support\script_helper.py",
 line 136, in _assert_python
err))
AssertionError: Process return code is 1
command line: 
['C:\\buildbot.python.org\\3.5.kloth-win64\\build\\PCbuild\\amd64\\python_d.exe',
 '-X', 'faulthandler', '-E', 
'C:\\Users\\Buildbot\\AppData\\Local\\Temp\\tmpld1_lj4t', 'spawn']

stdout:
---

---

stderr:
---
Traceback (most recent call last):
  File "C:\buildbot.python.org\3.5.kloth-win64\build\lib\runpy.py", line 193, 
in _run_module_as_main
"__main__", mod_spec)
  File "C:\buildbot.python.org\3.5.kloth-win64\build\lib\runpy.py", line 85, in 
_run_code
exec(code, run_globals)
  File "C:\Users\Buildbot\AppData\Local\Temp\tmpld1_lj4t\__main__.py", line 23, 
in 
raise RuntimeError("Timed out waiting for results")
RuntimeError: Timed out waiting for results
---

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



[issue30039] Resuming a 'yield from' stack is broken if a signal arrives in the middle

2017-05-17 Thread Yury Selivanov

Yury Selivanov added the comment:

Yes, I'll do the backport.

--

___
Python tracker 

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



[issue30039] Resuming a 'yield from' stack is broken if a signal arrives in the middle

2017-05-17 Thread STINNER Victor

STINNER Victor added the comment:

The change should be backported to 3.5 and 3.6, right? The change seems very 
short and safe. IMHO it's ok to backport.

--
nosy: +haypo

___
Python tracker 

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



[issue30387] warning of threading_cleanup in test_threading

2017-05-17 Thread STINNER Victor

STINNER Victor added the comment:

Ok, the warning should now be fixed. Thanks for the report Xiang. I don't know 
how I missed it ;-)

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



[issue29137] Fix fpectl-induced ABI breakage

2017-05-17 Thread Nathaniel Smith

Nathaniel Smith added the comment:

@Dima:
> @njs: to point out that usefulness of this module is not just wishful 
> thinking. I just used it to locate, up to the line in a Python extension 
> module written in C, a bug in Sagemath (that has perhaps 20 FPU-using 
> extensions, some of them as large as numpy).  (Without using it we were 
> pulling out our hair for weeks over this)

That's pretty cool :-). But from skimming your link, it sounds like it would 
have been sufficient in your case to add a call to "fesetmask(FP_X_INV)" using 
C or Cython or ctypes (or directly in gdb), and then running the program under 
gdb to get a backtrace where the SIGFPE was delivered? Is that correct? Or did 
your debugging depend on the specific fpectl machinery for responding to that 
signal?

> PS. I would volunteer to fix it and maintain it, assuming I have some modest 
> funding to support such an activity.

I'm not personally aware of any funding sources for this, if that's the 
question.

--

___
Python tracker 

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



[issue18617] AIA chasing for missing intermediate certificates on TLS connections

2017-05-17 Thread Alex Gaynor

Alex Gaynor added the comment:

Just discussed with Christian, and we're both in favor of adding AIA chasing 
support to the stdlib ssl.

--
nosy: +alex, janssen

___
Python tracker 

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



[issue29102] Add an id field to PyInterpreterState.

2017-05-17 Thread STINNER Victor

STINNER Victor added the comment:

What the status of this issue Eric? Do you still need interpreter ID?

--

___
Python tracker 

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



[issue30303] IDLE: Add _utest to textview and add textview tests

2017-05-17 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I am adding a couple of exception tests to complete coverage.

--

___
Python tracker 

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



[issue30303] IDLE: Add _utest to textview and add textview tests

2017-05-17 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
title: IDLE: Add _utest to textview -> IDLE: Add _utest to textview and add 
textview tests

___
Python tracker 

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



[issue30303] IDLE: Add _utest to textview

2017-05-17 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
stage:  -> backport needed
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



[issue30357] test_thread should clean threads after each test

2017-05-17 Thread STINNER Victor

STINNER Victor added the comment:


New changeset f5633e02433a81a6d0f14fc1c3294e752f4ac1a3 by Victor Stinner in 
branch '3.5':
bpo-30387: Fix warning in test_threading (#1634) (#1637)
https://github.com/python/cpython/commit/f5633e02433a81a6d0f14fc1c3294e752f4ac1a3


--

___
Python tracker 

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



[issue18617] AIA chasing for missing intermediate certificates on TLS connections

2017-05-17 Thread April King

April King added the comment:

Err, sorry, I may have been a bit unclear.  AIA chasing is not *universal* 
amongst browsers.  IE, Edge, Chrome, and Safari perform AIA chasing.  Firefox 
maintains a cache of intermediate certificate authorities.  I noted that a bit 
further underneath, but my apologies if it was confusing.

That said, every browser has a some chosen some underlying method to ameliorate 
this common TLS error.  It would be amazing if Python could similarly resolve 
this issue for developers.

--

___
Python tracker 

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



[issue29063] Fixed timemodule compile warnings (gmtoff).

2017-05-17 Thread STINNER Victor

STINNER Victor added the comment:

I backported the fix to 3.6. So all warnings on timemodule.c should now be 
fixed. Thanks for the bug report and the patch Decorater! 

commit 69f3a5ac28041fac86897e0c90d98ad9fd6fa3f7
Author: Victor Stinner 
Date:   Wed May 17 14:45:45 2017 -0700

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



[issue30357] test_thread should clean threads after each test

2017-05-17 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 44944b602af23712d7119801183cdc6e202e4f76 by Victor Stinner in 
branch '3.6':
bpo-30387: Fix warning in test_threading (#1634) (#1636)
https://github.com/python/cpython/commit/44944b602af23712d7119801183cdc6e202e4f76


--

___
Python tracker 

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



[issue30303] IDLE: Add _utest to textview

2017-05-17 Thread Terry J. Reedy

Terry J. Reedy added the comment:


New changeset ba365da9cee8901fad08ab0b61c7489c110e5c97 by terryjreedy (Louie 
Lu) in branch 'master':
bpo-30303: IDLE: Add _utest argument to textview (#1499)
https://github.com/python/cpython/commit/ba365da9cee8901fad08ab0b61c7489c110e5c97


--

___
Python tracker 

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



[issue18617] AIA chasing for missing intermediate certificates on TLS connections

2017-05-17 Thread April King

April King added the comment:

Browsers universally support AIA chasing/fetching, as do a number of underlying 
OS libraries, such as Secure Transport (macOS) and schannel (Windows).

As a result, it is becoming increasingly common for server operators to fail to 
include the entire certificate chain in their handshake. By some measures, 
anywhere from 10 to over 30% of all TLS errors(1) are caused by missing 
intermediate certificates.

There are a handful of ways that scanners and other tools have worked around 
this issue. Some, like SSL Labs, do their own AIA chasing. Others make 
subprocess to other tools linked to OS libraries which invisibly perform AIA 
chasing, such as curl on macOS. Others, like Firefox, maintain a cache of 
intermediate certificates.

In any case, all of these solutions are concession to the reality that TLS is 
really hard and that it is largely impossible to solve this particular 
misconfiguration issue.

I myself write a popular tool(2) that does scanning of sites for missing 
security configurations. Although it's not explicitly focused on TLS, some of 
the underlying tests rely on a verified TLS connection.  For example, the HTTP 
Strict Transport Security (HSTS) header can only be set on valid TLS 
connections.  I use requests (which uses httplib underneath), but I'm unable to 
tell if a given certificate error is because of either:

a) the certificate validation actually failed (for example, due to being 
expired), or
b) there was a missing intermediate certificate and that things would have 
worked if AIA chasing was available

As a result, I have to tell people that their HSTS header can't be set. This is 
often incorrect, because browsers that do AIA chasing consider the connection 
perfectly secure for the purposes of HSTS.

It would be really nice if Python's httplib could be updated to do transparent 
AIA chasing, with the optional ability to turn it off. In an ideal world, the 
underlying TLS libraries (such as OpenSSL) would do this for us, but 
unfortunately as things stand now OpenSSL leaves it up to the applications 
themselves to perform chasing. According to Mozilla research (3), if 
implemented, it would reduce TLS errors by approximately 6% were AIA chasing 
always performed and successful.

Thanks!

1. 
https://docs.google.com/document/d/1ryqFMSHHRDERg1jm3LeVt7VMfxtXXrI8p49gmtniNP0/edit?pli=1
2. https://observatory.mozilla.org/
3. https://bugzilla.mozilla.org/show_bug.cgi?id=399324#c80

--
nosy: +april
title: TLS and Intermediate Certificates -> AIA chasing for missing 
intermediate certificates on TLS connections

___
Python tracker 

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



[issue30387] warning of threading_cleanup in test_threading

2017-05-17 Thread STINNER Victor

STINNER Victor added the comment:


New changeset f5633e02433a81a6d0f14fc1c3294e752f4ac1a3 by Victor Stinner in 
branch '3.5':
bpo-30387: Fix warning in test_threading (#1634) (#1637)
https://github.com/python/cpython/commit/f5633e02433a81a6d0f14fc1c3294e752f4ac1a3


--

___
Python tracker 

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



[issue30387] warning of threading_cleanup in test_threading

2017-05-17 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 44944b602af23712d7119801183cdc6e202e4f76 by Victor Stinner in 
branch '3.6':
bpo-30387: Fix warning in test_threading (#1634) (#1636)
https://github.com/python/cpython/commit/44944b602af23712d7119801183cdc6e202e4f76


--

___
Python tracker 

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



[issue30393] test_readline hangs

2017-05-17 Thread wmayner

New submission from wmayner:

I'm trying to build Python 3.6.1 from source with the `--enable-optimizations` 
configuration option. As I understand it, this entails running and profiling 
all the tests for PGO. When `test_readline` is run, it hangs.

OS: Debian 3.16.43-2 (2017-04-30) x86_64 GNU/Linux

Please let me know what other information I should provide.

--
components: Tests
messages: 293888
nosy: wmayner
priority: normal
severity: normal
status: open
title: test_readline hangs
type: behavior
versions: Python 3.6

___
Python tracker 

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



[issue17560] problem using multiprocessing with really big objects?

2017-05-17 Thread Igor

Changes by Igor :


--
nosy: +i3v

___
Python tracker 

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



[issue29102] Add an id field to PyInterpreterState.

2017-05-17 Thread Eric Snow

Changes by Eric Snow :


--
pull_requests: +1734

___
Python tracker 

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



[issue28411] Eliminate PyInterpreterState.modules.

2017-05-17 Thread Eric Snow

Changes by Eric Snow :


--
pull_requests: +1732

___
Python tracker 

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



[issue29104] Left bracket remains in format string result when '\' preceeds it

2017-05-17 Thread Mariatta Wijaya

Changes by Mariatta Wijaya :


--
stage:  -> patch review

___
Python tracker 

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



[issue29660] Document that print/format_exception ignore etype

2017-05-17 Thread Mariatta Wijaya

Changes by Mariatta Wijaya :


--
stage:  -> patch review

___
Python tracker 

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



[issue29723] 3.6.1rc1 adds the current directory to sys.path when running a subdirectory's __main__.py; previous versions did not

2017-05-17 Thread Eric Snow

Changes by Eric Snow :


--
nosy: +eric.snow

___
Python tracker 

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



[issue30039] Resuming a 'yield from' stack is broken if a signal arrives in the middle

2017-05-17 Thread Yury Selivanov

Yury Selivanov added the comment:


New changeset ab4413a7e9bda95b6fcd517073e2a51dafaa1624 by Yury Selivanov 
(Nathaniel J. Smith) in branch 'master':
bpo-30039: Don't run signal handlers while resuming a yield from stack (#1081)
https://github.com/python/cpython/commit/ab4413a7e9bda95b6fcd517073e2a51dafaa1624


--

___
Python tracker 

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



[issue30318] test_distutils is too verbose on Windows

2017-05-17 Thread STINNER Victor

STINNER Victor added the comment:

> The problem here I think is that distutils itself should only dump 
> stdout/stderr on failure, ...

Hum, I would like to see warnings even if the compilation succeed. So I would 
prefer to only modify test_distutils.

--

___
Python tracker 

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



[issue30318] test_distutils is too verbose on Windows

2017-05-17 Thread Steve Dower

Steve Dower added the comment:

The problem here I think is that distutils itself should only dump 
stdout/stderr on failure, but because of how it spawns processes it never 
actually captures the output from external tools.

We really need to update distutils's spawn() function to use subprocess. That 
would also resolve a handful of other issues.

--

___
Python tracker 

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



[issue30390] Document how to make classes in the C API.

2017-05-17 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The title of this issue is "Document how to make classes in the C API." This 
already is documented.

For documenting the PyClassMethod* names open a new issue.

--
status: open -> closed

___
Python tracker 

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



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

2017-05-17 Thread Xavier de Gaye

Xavier de Gaye added the comment:

> What is the type of st_ino? It's not off_t?

The type of st_ino is unsigned long long as defined in sys/stat.h for x86 and 
off_t is defined in sys/types.h this way;, quoting:

/* This historical accident means that we had a 32-bit off_t on 32-bit 
architectures. */
typedef __kernel_off_t off_t;

There is also a related section in the bionic github repo [1] quoted here:

=
This probably belongs in the NDK documentation rather than here, but these are 
the known ABI bugs in the 32-bit ABI:

time_t is 32-bit. http://b/5819737. In the 64-bit ABI, time_t is 64-bit.

off_t is 32-bit. There is off64_t, and in newer releases there is 
almost-complete support for _FILE_OFFSET_BITS. Unfortunately our stdio 
implementation uses 32-bit offsets and -- worse -- function pointers to 
functions that use 32-bit offsets, so there's no good way to implement the last 
few pieces http://b/24807045. In the 64-bit ABI, off_t is off64_t.

sigset_t is too small on ARM and x86 (but correct on MIPS), so support for 
real-time signals is broken. http://b/5828899 In the 64-bit ABI, sigset_t is 
the correct size for every architecture.
=

I will test your patch on x86 and x86_64 on Android and propose a patch if it 
works.

[1] https://android.googlesource.com/platform/bionic.git/#32_bit-ABI-bugs

--

___
Python tracker 

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



[issue30392] default webbrowser fails on macOS Sierra 10.12.5

2017-05-17 Thread Andrew Jaffe

Changes by Andrew Jaffe :


--
title: default webbrowser not used on macOS Sierra 10.12.5 -> default 
webbrowser fails on macOS Sierra 10.12.5

___
Python tracker 

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



[issue30392] default webbrowser not used on macOS Sierra 10.12.5

2017-05-17 Thread Andrew Jaffe

Andrew Jaffe added the comment:

A few more details:

 - I believe this worked correctly under previous macOS versions (but I don't 
currently have access to any such machines). 
 - This behaviour is identical under 3.6.1 and 2.7.13 (untested elsewhere)
 - Behaviour first noticed under Jupyter notebook -- see 
https://github.com/jupyter/notebook/issues/2438

--

___
Python tracker 

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



[issue30392] default webbrowser not used on macOS Sierra 10.12.5

2017-05-17 Thread Andrew Jaffe

New submission from Andrew Jaffe:

On the newly-released macOS Sierra 10.12.5, the default web browser which is 
meant to returned by webbrowser.get() gives an error. Specifically:

>>> import webbrowser
>>> br = webbrowser.get()
>>> br.open("http://python.org;)
0:33: execution error: "http://python.org; doesn’t understand the “open 
location” message. (-1708)
False

>>> ### but this works
>>> br = webbrowser.get("safari")
>>> br.open("http://python.org;)
True

--

___
Python tracker 

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



[issue30392] default webbrowser not used on macOS Sierra 10.12.5

2017-05-17 Thread Andrew Jaffe

Changes by Andrew Jaffe :


--
title: default webbrowser macOS Sierra 10.12.5 -> default webbrowser not used 
on macOS Sierra 10.12.5

___
Python tracker 

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



[issue30392] default webbrowser macOS Sierra 10.12.5

2017-05-17 Thread Andrew Jaffe

Changes by Andrew Jaffe :


--
components: Library (Lib), macOS
nosy: Andrew.Jaffe, ned.deily, ronaldoussoren
priority: normal
severity: normal
status: open
title: default webbrowser macOS Sierra 10.12.5
type: behavior
versions: Python 2.7, Python 3.6

___
Python tracker 

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



[issue28240] Enhance the timeit module: display average +- std dev instead of minimum

2017-05-17 Thread Jesús Cea Avión

Changes by Jesús Cea Avión :


--
nosy: +jcea

___
Python tracker 

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



[issue30390] Document how to make classes in the C API.

2017-05-17 Thread Decorater

Changes by Decorater :


--
status: closed -> open

___
Python tracker 

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



[issue30390] Document how to make classes in the C API.

2017-05-17 Thread Decorater

Decorater added the comment:

Still it does look the functions lited in the second comment are undocumented.

https://docs.python.org/3/search.html?q=PyClassMethodDescr_Type
https://docs.python.org/3/search.html?q=PyClassMethod_New_keywords=yes=default

However on the last function I did find 1 thing However it was not what I was 
looking for. What I actually was looking for was the args for the 3 functions 
and description on what it does and all that similar to how this function is 
documented:

```
PyObject* PyObject_CallObject(PyObject *callable_object, PyObject *args)
Return value: New reference.
Call a callable Python object callable_object, with arguments given by the 
tuple args. If no arguments are needed, then args may be NULL. Returns the 
result of the call on success, or NULL on failure. This is the equivalent of 
the Python expression callable_object(*args).

```

This is actually the reason why the issue was opened as the functions was not 
documented like this.

--

___
Python tracker 

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



[issue29063] Fixed timemodule compile warnings (gmtoff).

2017-05-17 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +1731

___
Python tracker 

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



[issue29063] Fixed timemodule compile warnings (gmtoff).

2017-05-17 Thread STINNER Victor

Changes by STINNER Victor :


--
title: Fixed timemodule compile warnings. -> Fixed timemodule compile warnings 
(gmtoff).

___
Python tracker 

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



[issue30391] test_socketserver killed after 15 min on AMD64 FreeBSD 10.x Shared 3.6

2017-05-17 Thread STINNER Victor

New submission from STINNER Victor:

http://buildbot.python.org/all/builders/AMD64%20FreeBSD%2010.x%20Shared%203.6/builds/142/steps/test/logs/stdio

...
0:10:10 [396/405] test_pulldom passed -- running: test_socketserver (487 sec)
0:10:11 [397/405] test_dictcomps passed -- running: test_socketserver (488 sec)
0:10:11 [398/405] test_support passed -- running: test_socketserver (488 sec)
0:10:22 [399/405] test_email passed -- running: test_socketserver (499 sec)
0:10:44 [400/405] test_buffer passed -- running: test_socketserver (521 sec), 
test_concurrent_futures (40 sec), test_datetime (49 sec)
0:10:53 [401/405] test_ftplib passed -- running: test_socketserver (530 sec), 
test_concurrent_futures (49 sec), test_datetime (58 sec)
0:10:55 [402/405] test_ucn passed -- running: test_socketserver (532 sec), 
test_concurrent_futures (51 sec), test_datetime (60 sec)
fetching http://www.pythontest.net/unicode/9.0.0/NamedSequences.txt ...
0:11:09 [403/405] test_concurrent_futures passed (65 sec) -- running: 
test_socketserver (546 sec), test_datetime (74 sec)
0:11:16 [404/405] test_datetime passed (81 sec) -- running: test_socketserver 
(553 sec)
running: test_socketserver (583 sec)
running: test_socketserver (613 sec)
running: test_socketserver (643 sec)
running: test_socketserver (673 sec)
running: test_socketserver (703 sec)
running: test_socketserver (733 sec)
running: test_socketserver (763 sec)
running: test_socketserver (793 sec)
running: test_socketserver (823 sec)
running: test_socketserver (853 sec)
running: test_socketserver (883 sec)
0:17:04 [405/405] test_socketserver crashed
Timeout (0:15:00)!
Thread 0x000802006400 (most recent call first):
  File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/threading.py", 
line 295 in wait
  File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/threading.py", 
line 551 in wait
  File 
"/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/test_socketserver.py",
 line 369 in wait_done
  File 
"/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/test_socketserver.py",
 line 341 in __init__
  File 
"/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/test_socketserver.py",
 line 362 in __init__
  File 
"/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/test_socketserver.py",
 line 307 in test_threading_handled
  File 
"/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/unittest/case.py", 
line 601 in run
  File 
"/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/unittest/case.py", 
line 649 in __call__
  File 
"/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/unittest/suite.py", 
line 122 in run
  File 
"/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/unittest/suite.py", 
line 84 in __call__
  File 
"/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/unittest/suite.py", 
line 122 in run
  File 
"/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/unittest/suite.py", 
line 84 in __call__
  File 
"/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/unittest/suite.py", 
line 122 in run
  File 
"/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/unittest/suite.py", 
line 84 in __call__
  File 
"/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/unittest/runner.py", 
line 176 in run
  File 
"/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/support/__init__.py",
 line 1889 in _run_suite
  File 
"/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/support/__init__.py",
 line 1923 in run_unittest
  File 
"/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/libregrtest/runtest.py",
 line 164 in test_runner
  File 
"/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/libregrtest/runtest.py",
 line 165 in runtest_inner
  File 
"/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/libregrtest/runtest.py",
 line 119 in runtest
  File 
"/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/libregrtest/runtest_mp.py",
 line 71 in run_tests_slave
  File 
"/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/libregrtest/main.py",
 line 475 in _main
  File 
"/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/libregrtest/main.py",
 line 468 in main
  File 
"/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/libregrtest/main.py",
 line 532 in main
  File 
"/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/regrtest.py", 
line 46 in _main
  File 
"/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/regrtest.py", 
line 50 in 
  File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/runpy.py", line 
85 in _run_code
  File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/runpy.py", line 
193 in _run_module_as_main
Traceback (most recent call last):
  File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/runpy.py", line 
193, in _run_module_as_main
"__main__", mod_spec)
  File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/runpy.py", line 
85, in 

[issue30387] warning of threading_cleanup in test_threading

2017-05-17 Thread STINNER Victor

STINNER Victor added the comment:

Oh, strange, the test in Python 2.7 doesn't have the bug: see commit 
30a5445b30bb627a64b2d30788f6db58f6db3ae1. Compare it to the code in Python 3: 
commit 9939cc89a4ee54ab50719a597a8b8a0795a691f6.

The warning is already fixed in master. I created backports for 3.5 and 3.6.

--
versions: +Python 3.5, Python 3.6, Python 3.7

___
Python tracker 

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



[issue30357] test_thread should clean threads after each test

2017-05-17 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +1730

___
Python tracker 

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



[issue30387] warning of threading_cleanup in test_threading

2017-05-17 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +1729

___
Python tracker 

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



[issue30149] inspect.signature() doesn't support partialmethod without explicit self parameter

2017-05-17 Thread Yury Selivanov

Yury Selivanov added the comment:


New changeset 378d70642aa1c8de2a53ecb811927faf0388db2d by Yury Selivanov 
(Dong-hee Na) in branch 'master':
bpo-30149: Fix partialmethod without explicit self parameter (#1308)
https://github.com/python/cpython/commit/378d70642aa1c8de2a53ecb811927faf0388db2d


--

___
Python tracker 

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



[issue30387] warning of threading_cleanup in test_threading

2017-05-17 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +1727

___
Python tracker 

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



[issue30357] test_thread should clean threads after each test

2017-05-17 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +1728

___
Python tracker 

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



[issue30387] warning of threading_cleanup in test_threading

2017-05-17 Thread STINNER Victor

STINNER Victor added the comment:


New changeset f8d05b3a24e745ab4a974b891ac1389e2f11ce4d by Victor Stinner in 
branch 'master':
bpo-30387: Fix warning in test_threading (#1634)
https://github.com/python/cpython/commit/f8d05b3a24e745ab4a974b891ac1389e2f11ce4d


--

___
Python tracker 

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



[issue30357] test_thread should clean threads after each test

2017-05-17 Thread STINNER Victor

STINNER Victor added the comment:


New changeset f8d05b3a24e745ab4a974b891ac1389e2f11ce4d by Victor Stinner in 
branch 'master':
bpo-30387: Fix warning in test_threading (#1634)
https://github.com/python/cpython/commit/f8d05b3a24e745ab4a974b891ac1389e2f11ce4d


--

___
Python tracker 

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



[issue29063] Fixed timemodule compile warnings.

2017-05-17 Thread STINNER Victor

STINNER Victor added the comment:

commit 0d659e5614cad512a1940125135b443b3eecb5d7
Author: Victor Stinner 
Date:   Tue Apr 25 01:22:42 2017 +0200

--
pull_requests: +1726

___
Python tracker 

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



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

2017-05-17 Thread STINNER Victor

STINNER Victor added the comment:

Before 0f6d73343d342c106cda2219ebb8a6f0c4bd9b3c, the code used 
PyLong_FromLong((long)st->st_ino), so the change doesn't introduce a regression 
but detected a real bug, right?

> On Android architecture 'x86' at api level 21:
>sizeof(st->st_ino) = 8
> and from the output of configure:
>checking size of off_t... 4
>checking size of long... 4
>checking size of long long... 8

What is the type of st_ino? It's not off_t?

A workaround would be to force the usage unsigned long long on Android, right?

Can you please try the following patch on Android, and propose a PR if it works?

diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index e8c15a9..78b3cb9 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -1927,7 +1927,7 @@ _pystat_fromstructstat(STRUCT_STAT *st)
 return NULL;
 
 PyStructSequence_SET_ITEM(v, 0, PyLong_FromLong((long)st->st_mode));
-#if defined(HAVE_LARGEFILE_SUPPORT) || defined(MS_WINDOWS)
+#if defined(HAVE_LARGEFILE_SUPPORT) || defined(MS_WINDOWS) || 
defined(defined(__ANDROID__))
 Py_BUILD_ASSERT(sizeof(unsigned long long) >= sizeof(st->st_ino));
 PyStructSequence_SET_ITEM(v, 1,
   PyLong_FromUnsignedLongLong(st->st_ino));

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

___
Python tracker 

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



[issue29137] Fix fpectl-induced ABI breakage

2017-05-17 Thread Dima Pasechnik

Dima Pasechnik added the comment:

PS. I would volunteer to fix it and maintain it, assuming I have some modest 
funding to support such an activity. (What precisely "it" should be, is another 
question).

--

___
Python tracker 

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



[issue30387] warning of threading_cleanup in test_threading

2017-05-17 Thread STINNER Victor

STINNER Victor added the comment:

https://github.com/python/cpython/pull/1634 fixes the 
test_is_alive_after_fork() warning on Linux.

--

___
Python tracker 

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



[issue29137] Fix fpectl-induced ABI breakage

2017-05-17 Thread Dima Pasechnik

Dima Pasechnik added the comment:

@njs: to point out that usefulness of this module is not just wishful thinking. 
I just used it to locate, up to the line in a Python extension module written 
in C, a bug in Sagemath (that has perhaps 20 FPU-using extensions, some of them 
as large as numpy).  (Without using it we were pulling out our hair for weeks 
over this)

https://trac.sagemath.org/ticket/22799#comment:103

Thanks goodness that fpectl@FreeBSD is easy to fix by commenting out a couple 
of "fpresetsticky(fpgetsticky());" lines---fpresetsticky() is not available on 
64-bit platforms.
(our primary concern is OSX, where fpectl never worked---fortunately FreeBSD is 
close enough relative...)

--

___
Python tracker 

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



[issue30357] test_thread should clean threads after each test

2017-05-17 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +1725

___
Python tracker 

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



[issue30387] warning of threading_cleanup in test_threading

2017-05-17 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +1724

___
Python tracker 

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



[issue30387] warning of threading_cleanup in test_threading

2017-05-17 Thread STINNER Victor

STINNER Victor added the comment:

Oh wait, I succeeded to reproduce the bug on master. In verbose mode, we even 
get the test name!

test_is_alive_after_fork (test.test_threading.ThreadTests) ... Warning -- 
threading_cleanup() failed to cleanup 0 threads after 3 sec (count: 0, 
dangling: 21)
ok

--

___
Python tracker 

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



[issue30387] warning of threading_cleanup in test_threading

2017-05-17 Thread STINNER Victor

STINNER Victor added the comment:

> Seems related to 79ef7f8e88a4972c4aecf95cfc5cd934f1861e08.

That's bpo-30357.

It's just that before test_threaindg "leaked" tests but there was no warning. 
Getting a warning is a good thing, it means that we have a bug that it must be 
fixed ;-)

--

___
Python tracker 

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



[issue30387] warning of threading_cleanup in test_threading

2017-05-17 Thread STINNER Victor

STINNER Victor added the comment:

What is your OS? On which Python version?

--

___
Python tracker 

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



[issue24254] Make class definition namespace ordered by default

2017-05-17 Thread Jesús Cea Avión

Changes by Jesús Cea Avión :


--
nosy: +jcea

___
Python tracker 

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



[issue30283] [2.7] Backport test_regrtest (partially) on Python 2.7

2017-05-17 Thread STINNER Victor

STINNER Victor added the comment:

Serhiy Storchaka: "Could you add a Misc/NEWS entry about backported regrtest 
features?"

Oh, I don't really consider that regrtest is part of "Python", but sure, I can 
document my changes in NEWS. I reopen the issue to not forget.

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

___
Python tracker 

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



[issue30390] Document how to make classes in the C API.

2017-05-17 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

This is documented. See https://docs.python.org/3/extending/newtypes.html.

--
nosy: +serhiy.storchaka
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue30390] Document how to make classes in the C API.

2017-05-17 Thread Decorater

Decorater added the comment:

Hmm seems that when looking at the exports in python36.dll that the following 
functions seem to not be documented as far as I seen:

PyClassMethodDescr_Type
PyClassMethod_New
PyClassMethod_Type

There might be more functions dealing with classes that are not documented. 
However looking through the whole exports would take to long as there are so 
many.

--

___
Python tracker 

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



[issue30389] distutils._msvccompiler cannot find VS 2017

2017-05-17 Thread Steve Dower

Changes by Steve Dower :


--
pull_requests: +1723

___
Python tracker 

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



[issue30390] Document how to make classes in the C API.

2017-05-17 Thread Decorater

New submission from Decorater:

On the C API, it tells how to make modules, functions, variables, and other 
things, but what about classes?

Like for example if you wanted to make a class with all of the methods having 
to use direct C Code which would then be converted to PyObject *'s for 
returning the information the C Code would normally return.

Not only that but also being able to create class instance variables using the 
C API as well.

Like for example here is an example class (As it would be if it was written in 
python):

class Example:
def __init__(self):
self.data = None  # None being a place holder for now.

def somefunction(self):
# C Code here.
self.data = ret  # return value for the C Code.
return self.data

Yes, there are better ways than writing the return data to the instance 
variable and returning it. That is just an example, I have classes that uses 
them for other things that does not return anything making the instance 
variables be the only way to get the data.

But yeah long story short I think creating classes with the C API should be 
documented if not already, or at least an example of doing one to be added as 
an guide for others wondering how to use the C API to make their own (non 
exception) classes.

--
assignee: docs@python
components: Documentation, Extension Modules
messages: 293863
nosy: Decorater, docs@python
priority: normal
severity: normal
status: open
title: Document how to make classes in the C API.
versions: Python 3.5, Python 3.6, Python 3.7

___
Python tracker 

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



[issue30389] distutils._msvccompiler cannot find VS 2017

2017-05-17 Thread Steve Dower

New submission from Steve Dower:

Visual Studio 2017 (including VC 14.1) cannot be discovered by the old registry 
key method. There is a new method that requires instantiating a COM class and 
querying for all installs, then selecting one.

My pyfindvs library (https://github.com/zooba/pyfindvs) can find a VS 2017 
installation, and I propose porting the core C function into Python so that 
distutils._msvccompiler can use it.

This would be internal and not for public use (except via the normal build_ext 
API).

--
assignee: steve.dower
components: Distutils, Windows
messages: 293862
nosy: dstufft, merwok, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
stage: patch review
status: open
title: distutils._msvccompiler cannot find VS 2017
type: behavior
versions: Python 3.6, Python 3.7

___
Python tracker 

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



[issue29063] Fixed timemodule compile warnings.

2017-05-17 Thread Decorater

Decorater added the comment:

I think the patch that haypo added should help take care of the warning. It 
does however only warned when building for 64 bit.

--

___
Python tracker 

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



[issue28023] python-gdb.py must be updated for the new Python 3.6 compact dict

2017-05-17 Thread Jesús Cea Avión

Changes by Jesús Cea Avión :


--
nosy: +jcea

___
Python tracker 

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



[issue29252] self in classes missinterpreted as a string.

2017-05-17 Thread Decorater

Changes by Decorater :


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

___
Python tracker 

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



[issue27350] Compact and ordered dict

2017-05-17 Thread Jesús Cea Avión

Changes by Jesús Cea Avión :


--
nosy: +jcea

___
Python tracker 

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



[issue29895] Distutils blows up with an incorrect pypirc, should be caught

2017-05-17 Thread Tommy Carpenter

Tommy Carpenter added the comment:

Hi,

I think option B might be best, because the issue was that I didn't know at 
first that the problem was in my .pypirc. I think this stack trace is not the 
most elegant way for the user to figure that out. Maybe catching this and then 
presenting a human readable error to the user would be better.

--

___
Python tracker 

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



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

2017-05-17 Thread Xavier de Gaye

Xavier de Gaye added the comment:

In configure.ac, HAVE_LARGEFILE_SUPPORT is defined if (off_t > long && longlong 
>= off_t) and thus, when it is not defined, it means that off_t <= long (since 
longlong < off_t is false) so an off_t should fit into a long. But on Android 
the size of off_t is different from the size of ino_t so one cannot use the 
value of HAVE_LARGEFILE_SUPPORT to know if an ino_t would fit into an unsigned 
long.

On Android architecture 'x86' at api level 21:
sizeof(st->st_ino) = 8
and from the output of configure:
checking size of off_t... 4
checking size of long... 4
checking size of long long... 8

--

___
Python tracker 

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



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

2017-05-17 Thread Forest Gregg

Changes by Forest Gregg :


--
type:  -> behavior

___
Python tracker 

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



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

2017-05-17 Thread Forest Gregg

New submission from Forest Gregg:

On Mac OS 10.12.4, a large shelve, backed by ndbm, can be created. But when I 
attempt to iterate through the values of the shelve it raises this exception:


  File 
"/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/dedupe/api.py",
 line 281, in _blockData
for block in viewvalues(blocks):
  File 
"/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/_collections_abc.py",
 line 693, in __iter__
for key in self._mapping:
  File 
"/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/shelve.py", 
line 95, in __iter__
for k in self.dict.keys():
SystemError: Negative size passed to PyBytes_FromStringAndSize

I've confirmed that this works with Python 3.6.1. All the Python versions were 
installed from homebrew.

I cannot reproduce on linux on windows machines. I've attached a zip file of 
the ndbm files that python created.

--
components: Library (Lib)
files: ndbm.zip
messages: 293858
nosy: Forest Gregg
priority: normal
severity: normal
status: open
title: ndbm can't iterate through values on OS X
versions: Python 3.5
Added file: http://bugs.python.org/file46872/ndbm.zip

___
Python tracker 

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



[issue30387] warning of threading_cleanup in test_threading

2017-05-17 Thread Xiang Zhang

New submission from Xiang Zhang:

Running test_threading throws a warning now.

./python -m test test_threading
Run tests sequentially
0:00:00 load avg: 0.22 [1/1] test_threading
Warning -- threading_cleanup() failed to cleanup 0 threads after 2 sec (count: 
0, dangling: 21)
1 test OK.

Total duration: 13 sec
Tests result: SUCCESS

Seems related to 79ef7f8e88a4972c4aecf95cfc5cd934f1861e08.

--
components: Tests
messages: 293857
nosy: haypo, xiang.zhang
priority: normal
severity: normal
status: open
title: warning of threading_cleanup in test_threading

___
Python tracker 

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



[issue30386] Add a build infrastructure for Android

2017-05-17 Thread Xavier de Gaye

Changes by Xavier de Gaye :


Added file: http://bugs.python.org/file46871/android-api-24.patch

___
Python tracker 

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



[issue30386] Add a build infrastructure for Android

2017-05-17 Thread Xavier de Gaye

Xavier de Gaye added the comment:

The build system for the x86_64, x86 and armv7 architectures has been tested on 
API 21 and for the x86_64 and arm64 architectures on API 24.  Of these 
combinations of architecture/api, only x86_64 on API 21 builds correctly today, 
the others were building correctly few weeks ago but recent changes in Python 
seem to have broken those builds.

To fix this temporarily:
* Build the 32 bits architectures (x86 and armv7) with the attached 
issue29619.patch. This is a hack, the problem will be fixed in issue 29619.
* Build on API 24 with the attached android-api-24.patch. This is another hack, 
I will enter a new issue for those problems which are of a kind that is 
recurrent with the NDK: a function implemented in libc and whose declaration is 
missing in the NDK headers, a problem that is supposed to be fixed by 
UnifiedHeaders.

--
keywords: +patch
Added file: http://bugs.python.org/file46870/issue29619.patch

___
Python tracker 

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



[issue30376] Curses documentation refers to incorrect type

2017-05-17 Thread Berker Peksag

Changes by Berker Peksag :


--
pull_requests: +1721

___
Python tracker 

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



[issue30386] Add a build infrastructure for Android

2017-05-17 Thread Xavier de Gaye

Changes by Xavier de Gaye :


--
pull_requests: +1720

___
Python tracker 

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



[issue24960] Can't use lib2to3 with embeddable zip file.

2017-05-17 Thread Kirk Sayre

Kirk Sayre added the comment:

Here is a more robust version of my local fix for this problem.

--
Added file: http://bugs.python.org/file46869/pgen.py

___
Python tracker 

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



[issue30301] multiprocessing: AttributeError: 'SimpleQueue' object has no attribute '_poll'

2017-05-17 Thread Xiang Zhang

Changes by Xiang Zhang :


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

___
Python tracker 

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



[issue30301] multiprocessing: AttributeError: 'SimpleQueue' object has no attribute '_poll'

2017-05-17 Thread Xiang Zhang

Xiang Zhang added the comment:


New changeset 43d4c0329e2348540a3a16ac61b3032f04eefd34 by Xiang Zhang in branch 
'3.6':
bpo-30301: Fix AttributeError when using SimpleQueue.empty() (#1601) (#1628)
https://github.com/python/cpython/commit/43d4c0329e2348540a3a16ac61b3032f04eefd34


--

___
Python tracker 

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



  1   2   >