Re: [Python-Dev] Show DeprecationWarning in debug mode?

2017-11-17 Thread Serhiy Storchaka
18.11.17 03:22, Victor Stinner пише: I noticed that Python not only hides DeprecationWarning, but also PendingDeprecationWarning and ImportWarning by default. While I understand why we decided to hide these warnings to users for a Python compiled in release mode, why are they hidden in Python deb

Re: [Python-Dev] Make the stable API-ABI usable

2017-11-17 Thread Serhiy Storchaka
18.11.17 03:05, Victor Stinner пише: tl; dr I propose to extend the existing "stable API" to make it almost as complete as the current API. For example, add back PyTuple_GET_ITEM() to be stable API, but it becomes a function call rather than a macro. The final question is if it's not too late to

Re: [Python-Dev] Python initialization and embedded Python

2017-11-17 Thread Serhiy Storchaka
18.11.17 02:01, Victor Stinner пише: Many global variables used by the "Python runtime" were move to a new single "_PyRuntime" variable (big structure made of sub-structures). See Include/internal/pystate.h. A side effect of moving variables from random files into header files is that it's not m

[Python-Dev] Show DeprecationWarning in debug mode?

2017-11-17 Thread Victor Stinner
Hi, I noticed that Python not only hides DeprecationWarning, but also PendingDeprecationWarning and ImportWarning by default. While I understand why we decided to hide these warnings to users for a Python compiled in release mode, why are they hidden in Python debug builds? I'm asking the questio

[Python-Dev] Make the stable API-ABI usable

2017-11-17 Thread Victor Stinner
Hi, tl; dr I propose to extend the existing "stable API" to make it almost as complete as the current API. For example, add back PyTuple_GET_ITEM() to be stable API, but it becomes a function call rather than a macro. The final question is if it's not too late to iterate on an implementation of th

Re: [Python-Dev] Python initialization and embedded Python

2017-11-17 Thread Steve Dower
On 17Nov2017 1601, Victor Stinner wrote: In short, it means that using the "Python runtime" before it's initialized by _PyRuntime_Initialize() is now likely to crash. For example, calling PyMem_RawMalloc(), before calling _PyRuntime_Initialize(), now calls the function NULL: dereference a NULL po

[Python-Dev] Python initialization and embedded Python

2017-11-17 Thread Victor Stinner
Hi, The CPython internals evolved during Python 3.7 cycle. I would like to know if we broke the C API or not. Nick Coghlan and Eric Snow are working on cleaning up the Python initialization with the "on going" PEP 432: https://www.python.org/dev/peps/pep-0432/ Many global variables used by the "

Re: [Python-Dev] Clarify the compatibility policy of lib2to3.

2017-11-17 Thread Guido van Rossum
On Fri, Nov 17, 2017 at 8:56 AM, Dong-hee Na wrote: > Few days ago, I submitted a patch(https://github.com/ > python/cpython/pull/4417) which updates2to3 converts > `operator.isCallable(obj)` to `isinstance(obj, collections.abc.Callable)`. > > This was Serhiy Storchaka’s idea(https://bugs.python.

Re: [Python-Dev] Python possible vulnerabilities in concurrency

2017-11-17 Thread Steve Dower
On 15Nov2017 2053, Guido van Rossum wrote: On Wed, Nov 15, 2017 at 6:50 PM, Guido van Rossum > wrote: So far I learned one thing from the report. They use the term "vulnerabilities" liberally, defining it essentially as "bug": All programming languages contain con

[Python-Dev] Summary of Python tracker Issues

2017-11-17 Thread Python tracker
ACTIVITY SUMMARY (2017-11-10 - 2017-11-17) Python tracker at https://bugs.python.org/ To view or respond to any of the issues listed below, click on the issue. Do NOT respond to this message. Issues counts and deltas: open6261 (+14) closed 37553 (+46) total 43814 (+60) Open issues wi

[Python-Dev] Clarify the compatibility policy of lib2to3.

2017-11-17 Thread Dong-hee Na
Hi, Few days ago, I submitted a patch(https://github.com/python/cpython/pull/4417) which updates2to3 converts `operator.isCallable(obj)` to `isinstance(obj, collections.abc.Callable)`. This was Serhiy Storchaka’s idea(https://bugs.python.org/issue32046) and I agree with his idea since `callab

Re: [Python-Dev] unittest isolation and warnings

2017-11-17 Thread Brett Cannon
Tests are not isolated from the warnings system, so things will leak out. Your best option is to use the context manager in the warnings module to temporarily make all warnings raise exceptions and test for the exception (I'm at the airport, hence why I don't know the name of the context manager; t

Re: [Python-Dev] Python possible vulnerabilities in concurrency

2017-11-17 Thread Koos Zevenhoven
On Fri, Nov 17, 2017 at 3:40 PM, Koos Zevenhoven wrote: > On Thu, Nov 16, 2017 at 6:53 AM, Guido van Rossum > wrote: > >> On Wed, Nov 15, 2017 at 6:50 PM, Guido van Rossum >> wrote: >>> >>> >>> Actually it linked to http://standards.iso.org/ittf/ >>> PubliclyAvailableStandards/index.html from w

Re: [Python-Dev] Python possible vulnerabilities in concurrency

2017-11-17 Thread Koos Zevenhoven
On Thu, Nov 16, 2017 at 6:53 AM, Guido van Rossum wrote: > On Wed, Nov 15, 2017 at 6:50 PM, Guido van Rossum > wrote: >> >> >> Actually it linked to http://standards.iso.org/ittf/ >> PubliclyAvailableStandards/index.html from which I managed to download >> what looks like the complete c061457_IS

[Python-Dev] unittest isolation and warnings

2017-11-17 Thread Christian Tismer
Hi guys, when writing tests, I suddenly discovered that unittest is not isolated to warnings. Example: One of my tests emits warnings when a certain condition is met. Instead of reporting the error immediately, it uses warnings, and at the end of the test, an error is produced if there were warni