[issue31756] subprocess.run should alias universal_newlines to text

2017-10-22 Thread Wolfgang Maier

Change by Wolfgang Maier :


--
nosy: +wolma

___
Python tracker 

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



[issue9842] Document ... used in recursive repr of containers

2017-10-22 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Since the appearance of reprs is not guaranteed.  I don't think this should be 
documented (because doing so makes it a guaranteed behavior).  In fact, the 
appearance has changed over time from ... to  [...] in and may change at some 
point to <...> so that it can't be confused with an actual Ellipsis object.  At 
best this should be a FAQ entry or we can defer to behaviors that are 
documented and guaranteed (such as reprlib.recursive_repr() and its default 
fillvalue).  

I concur with David Murray that the Ellipsis object should be indexed and 
cross-referenced.

--
nosy: +rhettinger

___
Python tracker 

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



[issue28292] Make Calendar.itermonthdates() behave consistently in edge cases

2017-10-22 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

Let me look into this.  It's been a while ...

--

___
Python tracker 

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



[issue31803] time.clock() should emit a DeprecationWarning

2017-10-22 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Yes, it is time.process_time(). This was the cause of adding two new functions 
time.perf_counter() and time.process_time() and deprecating (in the 
documentation only) time.clock(). On Windows time.clock() does include time 
elapsed during sleep, on non-Windows it doesn't. time.clock() should be 
replaced with the one of these functions, depending on the purpose of its use. 
Only the user knows for what purposes it uses time.clock() and what is the 
correct replacement.

--

___
Python tracker 

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



[issue28224] Compilation warnings on Windows: export 'PyInit_xx' specified multiple times

2017-10-22 Thread Stefan Krah

Stefan Krah  added the comment:

I know I closed #20166 myself, but could we revisit this?

I'm now in favor of telling people to fix their modules.

--
nosy: +skrah
status: closed -> open

___
Python tracker 

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



[issue31835] _PyFunction_FastCallDict and _PyFunction_FastCallKeywords: fast path not used

2017-10-22 Thread Antoine Pitrou

Change by Antoine Pitrou :


--
nosy: +haypo
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



[issue30744] Local variable assignment is broken when combined with threads + tracing + closures

2017-10-22 Thread Nick Coghlan

Nick Coghlan  added the comment:

No, as locals() never returns the write-through proxy in the latest version of 
the PEP - it only ever returns the dynamic snapshot namespace (retrieving it 
from the proxy if necessary).

To get access to the write-through proxy in Python level code, you have to 
access frame.f_locals directly (which trace functions will do by necessity, 
since that's the only way they have to get at the function locals).

--

___
Python tracker 

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



[issue31841] Several methods of collections.UserString do not return instances of UserString or its subclasses

2017-10-22 Thread Dmitry Kazakov

New submission from Dmitry Kazakov :

A few of the methods of collections.UserString return objects of type str when 
one would expect instances of UserString or a subclass. Here's an example for 
UserString.join:

>>> s = UserString(', ').join(['a', 'b', 'c']); print(repr(s), type(s))
'a, b, c' 

This *looks* like a bug to me, but since I was unable to find similar bug 
reports, and this behaviour has existed for years, I'm not too sure.

Same holds for UserString.format and UserString.format_map, which were added 
recently (issue 22189):

>>> s = UserString('{}').format(1); print(repr(s), type(s))
'1' 

At least, this output is inconsistent with %-based formatting:

>>> s = UserString('%d') % 1; print(repr(s), type(s))
'1' 

--
components: Library (Lib)
messages: 304761
nosy: vaultah
priority: normal
severity: normal
status: open
title: Several methods of collections.UserString do not return instances of 
UserString or its subclasses
type: behavior

___
Python tracker 

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



[issue31831] EmailMessage.add_attachment(filename="long or spécial") crashes or produces invalid output

2017-10-22 Thread R. David Murray

R. David Murray  added the comment:

Great, thank you for that research.  And yes, that's exactly why __str__ uses 
utf8=True, the "picture" of the message is much more readable.  I will commit 
that PR soon.

--

___
Python tracker 

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



[issue31828] Support Py_tss_NEEDS_INIT outside of static initialisation

2017-10-22 Thread Masayuki Yamamoto

Masayuki Yamamoto  added the comment:

Or Py_tss_NEEDS_INIT is removed from the C API document to become a private 
feature; in other words, the Python interpreter will recommend that the static 
allocation for the TSS key shouldn't be used in the API client codes except for 
the interpreter core and built-in modules. (okay, I know it's an unfair 
suggestion)

BTW, it's my mistake which the word "default value" for Py_tss_NEEDS_INIT, 
actually it makes more sense "initializer". I'd like to fix the document and 
the PEP, would I open the PR with this issue?

--

___
Python tracker 

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



[issue31836] test_code_module fails after test_idle

2017-10-22 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

On the PR, Serhiy asks "Wouldn't be better to restore sys.ps1 in test_idle if 
it is changed here?"

Aside from the fact that, as far as I know, it is not sanely possible to do so, 
I think it a bug for a test to be unnecessarily fragile.  Both ps1 and ps2 are 
set when Python is in interactive mode.  IDLE is only (partially) imitating 
Python's shell when it sets sys.ps1.

The premise of #25588 is that tests should accommodate sys.stdout and 
sys.stderr being None to the extent possible.  I think the same applies to 
sys.ps1/2 being set.  Indeed, as I reported on #31761, in msg304298, 9 days 
ago, test_code_module tests test_ps1 and test_ps2 failed when I ran '>>> import 
test.autotest' in a *Python* shell.  I did not understand the reason for the 
failures then, but if I had investigated, I should hope that I would have 
submitted the same PR, which fixes this autotest failure.

--

___
Python tracker 

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



[issue31838] Python 3.4 supported SSL version

2017-10-22 Thread Mauro Fontana

Change by Mauro Fontana :


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



[issue31838] Python 3.4 supported SSL version

2017-10-22 Thread Mauro Fontana

Mauro Fontana  added the comment:

Hi Christian

Great! Thanks for the information.

I apologize if this was trivial, just wanted to make sure.

Cheers,

--

___
Python tracker 

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



[issue31752] Assertion failure in timedelta() in case of bad __divmod__

2017-10-22 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Unpatched Python should crash in debug build and can raise SystemError in 
release build.

I can't reproduce a crash on Windows after the patch.

--

___
Python tracker 

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



[issue25612] nested try..excepts don't work correctly for generators

2017-10-22 Thread Mark Shannon

Mark Shannon  added the comment:

Thanks Serhiy for spotting that.

'raise' should raise the same exception as sys.exc_info() returns.
I'll update the PR.

--
nosy: +Mark.Shannon

___
Python tracker 

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



[issue30744] Local variable assignment is broken when combined with threads + tracing + closures

2017-10-22 Thread Nick Coghlan

Nick Coghlan  added the comment:

When I rejected that approach previously, it hadn't occurred to me yet that the 
write-through proxy could write through to both the frame state *and* the 
regular dynamic snapshot returned by locals().

The current design came from asking myself "What if the proxied reads always 
came from the snapshot, just like they do now, but writes went to *both* 
places?".

So far I haven't found any fundamental problems with the approach, but I also 
haven't implemented it yet - I've only read through all the places in the code 
where I think I'm going to have to make changes in order to get it to work.

--

___
Python tracker 

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



[issue31803] time.clock() should emit a DeprecationWarning

2017-10-22 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

On non-Windows platforms clock() returns the processor time, perf_counter() 
does include time elapsed during sleep.

>>> import time
>>> start = time.clock(); time.sleep(1); print(time.clock() - start)
9.7001374e-05
>>> start = time.perf_counter(); time.sleep(1); print(time.perf_counter() - 
>>> start)
1.000714950998372

--

___
Python tracker 

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



[issue31803] time.clock() should emit a DeprecationWarning

2017-10-22 Thread Marc-Andre Lemburg

Marc-Andre Lemburg  added the comment:

On 22.10.2017 15:14, Serhiy Storchaka wrote:
> 
> Serhiy Storchaka  added the comment:
> 
> On non-Windows platforms clock() returns the processor time, perf_counter() 
> does include time elapsed during sleep.
> 
 import time
 start = time.clock(); time.sleep(1); print(time.clock() - start)
> 9.7001374e-05
 start = time.perf_counter(); time.sleep(1); print(time.perf_counter() - 
 start)
> 1.000714950998372

Thanks for pointing that out. I didn't know.

Is there a different clock with similar accuracy we can use
to only count CPU time on Unix ?

--

___
Python tracker 

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



[issue31626] Writing in freed memory in _PyMem_DebugRawRealloc() after shrinking a memory block

2017-10-22 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Ping.

--

___
Python tracker 

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



[issue31572] Avoid suppressing all exceptions in PyObject_HasAttr()

2017-10-22 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 04e36af9b88cd5e80fc818e51d46f07252a2ff3f by Serhiy Storchaka in 
branch 'master':
bpo-31572: Get rid of using _PyObject_HasAttrId() in pickle. (#3729)
https://github.com/python/cpython/commit/04e36af9b88cd5e80fc818e51d46f07252a2ff3f


--

___
Python tracker 

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



[issue30744] Local variable assignment is broken when combined with threads + tracing + closures

2017-10-22 Thread Nick Coghlan

Nick Coghlan  added the comment:

I rewrote the PEP based on the latest iteration of the design concept: 
https://github.com/python/peps/commit/9a8e590a523bdeed0598084a0782fb07fc15dfc0

(That initial commit has some minor errors in it that I've already fixed, so 
check the latest version in the repo if you spot anything else - if I'd thought 
it through properly, I would have submitted the update as a PR, so folks had a 
place to more easily make line-by-line comments)

I genuinely like this version, and I think it should be reasonably 
straightforward to implement (given that types.MappingProxyType already exists).

--

___
Python tracker 

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



[issue31840] `ImportError` is` raised` only when `python -m unittest discover` is given

2017-10-22 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Run

python -m unittest discover --start-directory pkg --top-level-directory .

By default the top level directory is the same as the start directory (i.e. 
pkg).

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



[issue26765] Factor out common bytes and bytearray implementation

2017-10-22 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue16700] Document that bytes OS API can returns unusable results on Windows

2017-10-22 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


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



[issue16700] Document that bytes OS API can returns unusable results on Windows

2017-10-22 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

This is now 2.7 only issue.

--

___
Python tracker 

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



[issue28197] range.index mismatch with documentation

2017-10-22 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
stage:  -> needs patch

___
Python tracker 

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



[issue31840] `ImportError` is` raised` only when `python -m unittest discover` is given

2017-10-22 Thread Hiroki “h2” Horiuchi

New submission from Hiroki “h2” Horiuchi :

Create a package `pkg`. Put `test.py` there. Write `none = None` in 
`pkg/__init__.py`.
In the directory containing `pkg/`, `python [23] -m unittest pkg.test` will 
terminate normally, but `python [23] -m unittest discover pkg` will raise 
`ImportError`. The phenomenon is the same in macOS Sierra, Debian 9.0, Windows 
7. I do not think this is a very kind behavior.
Thank you.

--
components: Library (Lib), Tests, Windows, macOS
files: test.py
messages: 304729
nosy: Hiroki “h2” Horiuchi, ned.deily, paul.moore, ronaldoussoren, steve.dower, 
tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: `ImportError` is` raised` only when `python -m unittest discover` is 
given
type: behavior
versions: Python 2.7, Python 3.6
Added file: https://bugs.python.org/file47230/test.py

___
Python tracker 

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



[issue28022] SSL releated deprecation for 3.6

2017-10-22 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Shouldn't this issue be closed?

Since SSL context arguments are not supported in 2.7, the deprecated arguments 
can't be removed until EOL of 2.7.

--

___
Python tracker 

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



[issue24567] random.choice IndexError due to double-rounding

2017-10-22 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Do you mind to create a pull request Raymond?

--
components: +Library (Lib)
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



[issue28292] Make Calendar.itermonthdates() behave consistently in edge cases

2017-10-22 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Do you mind to create a pull request Alexander?

--
components: +Library (Lib)
stage: test needed -> needs patch

___
Python tracker 

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



[issue28326] multiprocessing.Process depends on sys.stdout being open

2017-10-22 Thread Antoine Pitrou

Change by Antoine Pitrou :


--
pull_requests: +4043

___
Python tracker 

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



[issue31815] Make itertools iterators interruptible

2017-10-22 Thread Koos Zevenhoven

Koos Zevenhoven  added the comment:

For the interactive user who uses an interactive environment such as the repl 
or a Jupyter notebook, the situation is a little different from "CPython as 
programming language runtime".

The docs say a KeyboardInterrupt is "Raised when the user hits the interrupt 
key (normally Control-C or Delete). During execution, a check for interrupts is 
made regularly.". I suppose there's some ambiguity in what "regularly" means 
there ;). 

But regardless of whether anyone bothers to read that part of the docs, Ctrl-C 
or an interrupt button not working can feel like a correctness issue for 
someone that's using an interactive Python environment *as an application* in 
daily work. Python gives you the impression that you can always interrupt 
anything if it turns out to take too much time. And I remember that being one 
of the points that made me move away from matlab, which at that time had 
problems with interrupting computations.

--

___
Python tracker 

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



[issue28326] multiprocessing.Process depends on sys.stdout being open

2017-10-22 Thread Antoine Pitrou

Antoine Pitrou  added the comment:


New changeset daeefd2e049b74340307481112a39f77de0f4769 by Antoine Pitrou in 
branch 'master':
bpo-28326: Fix multiprocessing.Process when stdout and/or stderr is closed or 
None. (#4073)
https://github.com/python/cpython/commit/daeefd2e049b74340307481112a39f77de0f4769


--

___
Python tracker 

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



[issue28326] multiprocessing.Process depends on sys.stdout being open

2017-10-22 Thread Antoine Pitrou

Change by Antoine Pitrou :


--
pull_requests: +4045

___
Python tracker 

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



[issue28416] defining persistent_id in _pickle.Pickler subclass causes reference cycle

2017-10-22 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka
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



[issue28326] multiprocessing.Process depends on sys.stdout being open

2017-10-22 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

This is now fixed in 3.6 and 3.7.  Closing!

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



[issue28326] multiprocessing.Process depends on sys.stdout being open

2017-10-22 Thread Antoine Pitrou

Antoine Pitrou  added the comment:


New changeset 34ef6da8f5fb03b83268bd35b77fb2183c748b70 by Antoine Pitrou in 
branch '3.6':
[3.6] bpo-28326: Fix multiprocessing.Process when stdout and/or stderr is 
closed or None. (GH-4073).  (#4075)
https://github.com/python/cpython/commit/34ef6da8f5fb03b83268bd35b77fb2183c748b70


--

___
Python tracker 

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



[issue28286] gzip guessing of mode is ambiguous

2017-10-22 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
pull_requests: +4044

___
Python tracker 

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



[issue31838] Python 3.4 supported SSL version

2017-10-22 Thread Christian Heimes

Christian Heimes  added the comment:

You are correct, Python 3.4 does not support OpenSSL 1.1 and will never support 
it.

The last bug fix release of Python 3.4 was 3.4.4 in 2015-12-20. 3.4.5 and newer 
are security fix releases that only contain critical security updates. OpenSSL 
1.1.0 was released 2016-08-25, about 9 months after Python 3.4 reached 
security-only mode.

We have a repository for Windows source dependencies: 
https://github.com/python/cpython-source-deps. It's not meant for general 
consumption.

--

___
Python tracker 

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



[issue28286] gzip guessing of mode is ambiguous

2017-10-22 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset bcbdd2f8db396c3f0ec9186162b39b5a34effa0e by Serhiy Storchaka in 
branch 'master':
bpo-28286: Add tests for the mode argument of GzipFile. (#4074)
https://github.com/python/cpython/commit/bcbdd2f8db396c3f0ec9186162b39b5a34effa0e


--

___
Python tracker 

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



[issue28286] gzip guessing of mode is ambiguous

2017-10-22 Thread Roundup Robot

Change by Roundup Robot :


--
pull_requests: +4046

___
Python tracker 

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



[issue31653] Don't release the GIL if we can acquire a multiprocessing semaphore immediately

2017-10-22 Thread Antoine Pitrou

Change by Antoine Pitrou :


--
keywords: +patch
pull_requests: +4048
stage: needs patch -> patch review

___
Python tracker 

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



[issue28286] gzip guessing of mode is ambiguous

2017-10-22 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
pull_requests: +4047

___
Python tracker 

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



[issue31653] Don't release the GIL if we can acquire a multiprocessing semaphore immediately

2017-10-22 Thread Antoine Pitrou

Antoine Pitrou  added the comment:


New changeset c872d39d324cd6f1a71b73e10406bbaed192d35f by Antoine Pitrou in 
branch 'master':
bpo-31653: Don't release the GIL if we can acquire a multiprocessing semaphore 
immediately (#4078)
https://github.com/python/cpython/commit/c872d39d324cd6f1a71b73e10406bbaed192d35f


--

___
Python tracker 

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



[issue31653] Don't release the GIL if we can acquire a multiprocessing semaphore immediately

2017-10-22 Thread Antoine Pitrou

Change by Antoine Pitrou :


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



[issue28286] gzip guessing of mode is ambiguous

2017-10-22 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 251de30935490a702b0a365f1e9bea696b39c016 by Serhiy Storchaka 
(Miss Islington (bot)) in branch '3.6':
bpo-28286: Add tests for the mode argument of GzipFile. (GH-4074) (#4076)
https://github.com/python/cpython/commit/251de30935490a702b0a365f1e9bea696b39c016


--

___
Python tracker 

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



[issue28286] gzip guessing of mode is ambiguous

2017-10-22 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset f7d19b0464cb89ec696affbad9fd7e7c94456eaf by Serhiy Storchaka in 
branch '2.7':
[2.7] bpo-28286: Add tests for the mode argument of GzipFile. (GH-4074). (#4077)
https://github.com/python/cpython/commit/f7d19b0464cb89ec696affbad9fd7e7c94456eaf


--

___
Python tracker 

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



[issue30744] Local variable assignment is broken when combined with threads + tracing + closures

2017-10-22 Thread Xavier de Gaye

Xavier de Gaye  added the comment:

Nick, in msg304388 you wrote "[allow] immediate write-through from trace 
functions". The latest iteration of PEP 558 says instead:

"tracing mode: the way the interpreter behaves when a trace hook has been 
registered..."

and also says:

"As long as the process remains in tracing mode, then __setitem__ and 
__delitem__ operations on the proxy will affect not only the dynamic snapshot, 
but also the corresponding fast local or cell reference on the underlying 
frame."

So write-through is allowed by the current PEP outside a trace function. Does 
not this change in some cases the behavior of code that updates the mapping 
returned by locals() when tracing mode is active from its standard behavior 
when there is no tracing ?

--

___
Python tracker 

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



[issue31839] datetime: add method to parse isoformat() output

2017-10-22 Thread SilentGhost

Change by SilentGhost :


--
nosy: +belopolsky
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



[issue31803] time.clock() should emit a DeprecationWarning

2017-10-22 Thread Marc-Andre Lemburg

Marc-Andre Lemburg  added the comment:

On 20.10.2017 19:46, Serhiy Storchaka wrote:
> 
> This will break a code that depends on the current behavior on non-Windows 
> platforms. And this will contradict the expectation of non-Windows 
> programmers. If change the behavior of clock() on non-Windows platforms, it 
> should be done only after the period of emitting FutureWarning.

Could you explain which behavior is changed by this on non-Windows
platforms ?

time.clock() only switches to a more accurate clock. That's pretty
much it. Which clock it used on which platform was platform
dependent anyway, so there's no real change in behavior.

For benchmarking and other measurements, time.time() was recommended
on Unix and time.clock() on Windows. time.clock() never good
resolution on Unix, so the situation only improves by using
a more accurate clock.

--

___
Python tracker 

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



[issue14465] xml.etree.ElementTree: add feature to prettify XML output

2017-10-22 Thread Wolfgang Maier

Change by Wolfgang Maier :


--
nosy: +wolma

___
Python tracker 

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



[issue31843] sqlite3.connect() should accept PathLike objects

2017-10-22 Thread Allen Li

New submission from Allen Li :

sqlite3.connect() should accept PathLike objects (objects that implement 
__fspath__)

--
messages: 304773
nosy: Allen Li
priority: normal
severity: normal
status: open
title: sqlite3.connect() should accept PathLike objects
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



[issue31843] sqlite3.connect() should accept PathLike objects

2017-10-22 Thread Allen Li

Change by Allen Li :


--
type:  -> enhancement

___
Python tracker 

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



[issue31828] Support Py_tss_NEEDS_INIT outside of static initialisation

2017-10-22 Thread Nick Coghlan

Nick Coghlan  added the comment:

For the wording fix, since it's just a trivial docs update, we can go ahead and 
fix it without an issue reference from the PRs.

As far as the API goes, I do want to support "static Py_tss_t my_tss_key = 
Py_tss_NEEDS_INIT;" in third party extension modules, which is what the current 
API gives us.

The question is whether there's a reasonable compiler independent way to also 
support struct *assignment*, in addition to initialisation.

--

___
Python tracker 

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



[issue31826] Misleading __version__ attribute of modules in standard library

2017-10-22 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

+1 for removing __version__ on all stdlib modules which are not externally 
maintained.

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



[issue31572] Avoid suppressing all exceptions in PyObject_HasAttr()

2017-10-22 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> The only solution of this problem is getting rid of PyObject_HasAttr() if 
> favor of PyObject_GetAttr().

I don't understand why.  Why not fix PyObject_HasAttr() like hasattr() was?

--
nosy: +pitrou

___
Python tracker 

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



[issue31826] Misleading __version__ attribute of modules in standard library

2017-10-22 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

I would support just removing the version attributes for csv and re.

--
nosy: +ncoghlan, rhettinger

___
Python tracker 

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




[issue31822] Document that urllib.parse.{Defrag, Split, Parse}Result are namedtuples

2017-10-22 Thread Raymond Hettinger

Change by Raymond Hettinger :


--
assignee: docs@python -> lisroach
nosy: +lisroach

___
Python tracker 

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



[issue25612] nested try..excepts don't work correctly for generators

2017-10-22 Thread Antoine Pitrou

Antoine Pitrou  added the comment:


New changeset ae3087c6382011c47db82fea4d05f8bbf514265d by Antoine Pitrou (Mark 
Shannon) in branch 'master':
Move exc state to generator. Fixes bpo-25612 (#1773)
https://github.com/python/cpython/commit/ae3087c6382011c47db82fea4d05f8bbf514265d


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



[issue28292] Make Calendar.itermonthdates() behave consistently in edge cases

2017-10-22 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

> 1. Raise OverflowError at both ends (revert issue15421patch). The method 
> becomes unusable for two extreme months.

The issue 15421 patch was committed in 85710a40e7e9eab86060bedc3762ccf9ca8d26ca.

--

___
Python tracker 

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



[issue31756] subprocess.run should alias universal_newlines to text

2017-10-22 Thread Wolfgang Maier

Change by Wolfgang Maier :


--
nosy:  -wolma

___
Python tracker 

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



[issue31842] pathlib: "Incorrect function" during resolve()

2017-10-22 Thread Erik Aronesty

Change by Erik Aronesty :


--
components: +Windows
nosy: +paul.moore, steve.dower, tim.golden, zach.ware

___
Python tracker 

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



[issue31842] pathlib: "Incorrect function" during resolve()

2017-10-22 Thread Erik Aronesty

New submission from Erik Aronesty :

When strict is "false", pathlib should not fail if the network share is 
inaccessible.  It should, as documented, catch the exception and continue with 
as much of the path as it has.



>>> pathlib.Path("v:").resolve()
Traceback (most recent call last):
  File "", line 1, in 
  File "C:\Users\erik\AppData\Local\Programs\Python\Python36\lib\pathlib.py", 
line 1119, in resolve
s = self._flavour.resolve(self, strict=strict)
  File "C:\Users\erik\AppData\Local\Programs\Python\Python36\lib\pathlib.py", 
line 193, in resolve
s = self._ext_to_normal(_getfinalpathname(s))
OSError: [WinError 1] Incorrect function: 'v:'

--
messages: 304767
nosy: earonesty2
priority: normal
severity: normal
status: open
title: pathlib: "Incorrect function" during resolve()
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



[issue31756] subprocess.run should alias universal_newlines to text

2017-10-22 Thread Gregory P. Smith

Gregory P. Smith  added the comment:


New changeset 7fed7bd8bb628f0f09c6011871a4ce68afb41b18 by Gregory P. Smith 
(andyclegg) in branch 'master':
bpo-31756: subprocess.run should alias universal_newlines to text (#4049)
https://github.com/python/cpython/commit/7fed7bd8bb628f0f09c6011871a4ce68afb41b18


--

___
Python tracker 

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



[issue28286] gzip guessing of mode is ambiguous

2017-10-22 Thread Wolfgang Maier

Change by Wolfgang Maier :


--
nosy: +wolma

___
Python tracker 

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



[issue25612] nested try..excepts don't work correctly for generators

2017-10-22 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Thank you Mark for the fix!

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



[issue31756] subprocess.run should alias universal_newlines to text

2017-10-22 Thread Gregory P. Smith

Change by Gregory P. Smith :


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

___
Python tracker 

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



[issue28292] Make Calendar.itermonthdates() behave consistently in edge cases

2017-10-22 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

I submitted PR 4079. Serhiy, please review the logic and if this matches what 
we discussed a year ago, I will add the docs and NEWS entries.

--

___
Python tracker 

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



[issue31739] socket.close recommended but not demonstrated in same-page example code

2017-10-22 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Lisa, would you care to wrap this one up?

--
assignee: docs@python -> lisroach
nosy: +lisroach, rhettinger

___
Python tracker 

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



[issue20825] containment test for "ip_network in ip_network"

2017-10-22 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

This is now in 3.7.  Thanks to everyone who contributed!

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.7 -Python 3.8

___
Python tracker 

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



[issue20825] containment test for "ip_network in ip_network"

2017-10-22 Thread Antoine Pitrou

Antoine Pitrou  added the comment:


New changeset 91dc64ba3f51100540b2ab6c6cd72c3bb18a6d49 by Antoine Pitrou 
(Cheryl Sabella) in branch 'master':
bpo-20825: Containment test for ip_network in ip_network.
https://github.com/python/cpython/commit/91dc64ba3f51100540b2ab6c6cd72c3bb18a6d49


--

___
Python tracker 

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



[issue31826] Misleading __version__ attribute of modules in standard library

2017-10-22 Thread Nick Coghlan

Nick Coghlan  added the comment:

+1 from me for dropping these, and noting which modules were affected in the 
Porting section of the 3.7 What's New (I'd be surprised if anyone was depending 
on them existing, but it doesn't hurt to mention it, and may help if someone is 
trying to figure out what changed)

--

___
Python tracker 

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



[issue31833] Compile fail on gentoo for MIPS CPU of loongson 2f

2017-10-22 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

You should try running with strace to see which system call failed:

$ strace ./python -c "import _multiprocessing"

--
nosy: +pitrou

___
Python tracker 

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



[issue28292] Make Calendar.itermonthdates() behave consistently in edge cases

2017-10-22 Thread Alexander Belopolsky

Change by Alexander Belopolsky :


--
keywords: +patch
pull_requests: +4049
stage: needs patch -> patch review

___
Python tracker 

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