[issue33590] sched.enter priority has no impact on execution

2018-05-20 Thread sahilmn

New submission from sahilmn :

`sched.enter` doesn't work as expected. If two events are scheduled with the 
same delay, then their order of execution seems to be dictated by the order of 
`enter` statements for the events instead of the priority order.

Ref attached file with example code. `sched.enterabs` works as expected.

--
files: sched.enter.bug.py
messages: 317215
nosy: sahilmn
priority: normal
severity: normal
status: open
title: sched.enter priority has no impact on execution
versions: Python 3.6
Added file: https://bugs.python.org/file47609/sched.enter.bug.py

___
Python tracker 

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



[issue29428] Doctest documentation unclear about multi-line fixtures

2018-05-20 Thread Carol Willing

Carol Willing  added the comment:

I've closed the associated PR https://github.com/python/cpython/pull/45 with a 
recommendation to resubmit a smaller, more atomic PR if desired.

--
nosy: +willingc
resolution:  -> rejected
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue33589] Remove dummy member in GCHead

2018-05-20 Thread INADA Naoki

New submission from INADA Naoki :

https://github.com/python/cpython/commit/e348c8d154cf6342c79d627ebfe89dfe9de23817

> We can probably get rid of the double and this union hack all together today.
> That is a slightly more invasive change that can be left for later.

Can we do it for now (Python 3.8)?

--
components: Interpreter Core
messages: 317212
nosy: inada.naoki, pitrou
priority: normal
severity: normal
status: open
title: Remove dummy member in GCHead
versions: Python 3.8

___
Python tracker 

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



[issue33583] PyObject_GC_Resize() doesn't relink GCHead

2018-05-20 Thread INADA Naoki

Change by INADA Naoki :


--
assignee:  -> docs@python
components: +Documentation
nosy: +docs@python
versions: +Python 2.7, Python 3.6, 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



[issue33583] PyObject_GC_Resize() doesn't relink GCHead

2018-05-20 Thread INADA Naoki

Change by INADA Naoki :


--
keywords: +patch
pull_requests: +6670
stage:  -> patch review

___
Python tracker 

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



[issue26103] Contradiction in definition of "data descriptor" between (dotted lookup behavior/datamodel documentation) and (inspect lib/descriptor how-to)

2018-05-20 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 4054b172ab59054715a2aaf4979bd84ac23e3ada by Serhiy Storchaka 
(Aaron Hall, MBA) in branch 'master':
bpo-26103: Fix inspect.isdatadescriptor() and a data descriptor definition. 
(GH-1959)
https://github.com/python/cpython/commit/4054b172ab59054715a2aaf4979bd84ac23e3ada


--

___
Python tracker 

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



[issue32411] Idlelib.browser: stop sorting dicts created by pyclbr

2018-05-20 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

I should mention that using Treeview could mean not using pyclbr.Instead, 
we might extract the parsing loop and modify it to build tree nodes as 
functions and classes are encountered.

--

___
Python tracker 

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



[issue31868] Null pointer dereference in ndb.ndbm get when used with a default value.

2018-05-20 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

I forgot about this issue and have fixed this bug in a new issue33383.

--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Crash in the get() method a single argument in dbm.ndbm

___
Python tracker 

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



[issue33383] Crash in the get() method a single argument in dbm.ndbm

2018-05-20 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Thank you for reminder Zackery. I forgot about that issue!

--

___
Python tracker 

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



[issue32411] Idlelib.browser: stop sorting dicts created by pyclbr

2018-05-20 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

The patch is trivial, and I assume that the test change is adequate, but I want 
to put this issue on hold for the present because
a) the performance gain is minuscule (the code cleanup is worth a bit more);
b) I am reluctant to backport something to 3.6 that depends on an unofficial 
implementation change, but not doing so will make backports of changes in this 
area not automatic;
c) I think I want to switch the browsers to ttk.Treeview, I hope before 3.6 
goes off maintenance, and I expect that doing so will change this area of the 
code, and possibly the line being changed.

'The present' ends when 3.6 maintenance ends in 6 months or at least the module 
browser is patched, whichever is first.

--
stage: test needed -> patch review
versions: +Python 3.8

___
Python tracker 

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



[issue33588] Unicode function arguments aren't preserved

2018-05-20 Thread Steven D'Aprano

Steven D'Aprano  added the comment:

This does seem to be a normalisation issue:

py> unicodedata.normalize('NFKC', 'ϵαγϕ') == ''.join(func.__code__.co_varnames)
True

so I'm closing this as not a bug.

Mike, thank you for copying and pasting the relevant text into the bug report, 
but for future reference, there is no need to duplicate that information with a 
redundant screen shots of text for bug report. (Unless you are reporting a 
specifically visual bug e.g. a display problem with the turtle module.) The 
content of screen shots cannot be searched for, or copied and pasted, and they 
make it difficult for the blind and visually impaired who use screen readers.

--
nosy: +steven.daprano
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



[issue33542] _ipconfig_getnode incorrectly selects a DUID as a MAC address

2018-05-20 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset ea9a0994cd0f4bd37799b045c34097eb21662b3d by Serhiy Storchaka in 
branch '2.7':
[2.7] bpo-33542: Ignore DUID in uuid.get_node on Windows. (GH-6922) (GH-7015)
https://github.com/python/cpython/commit/ea9a0994cd0f4bd37799b045c34097eb21662b3d


--

___
Python tracker 

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



[issue33580] Make binary/text file glossary entries follow most common "see also" style

2018-05-20 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 4ecdc1110df211686a4406ba666a7f8106e0f618 by Serhiy Storchaka 
(Miss Islington (bot)) in branch '3.7':
bpo-33580: Make binary/text file glossary entries follow most common "see also" 
style. (GH-6991) (GH-7012)
https://github.com/python/cpython/commit/4ecdc1110df211686a4406ba666a7f8106e0f618


--

___
Python tracker 

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



[issue33588] Unicode function arguments aren't preserved

2018-05-20 Thread Mat Leonard

Mat Leonard  added the comment:

Ah great, then I just need to do something
like unicodedata.normalize('NFKC', 'Ω'). Thanks!

On Sun, May 20, 2018 at 2:59 PM Eric V. Smith 
wrote:

>
> Eric V. Smith  added the comment:
>
> I think you're seeing identifier normalization. See this SO question for a
> description of the issue:
> https://stackoverflow.com/questions/34097193/identifier-normalization-why-is-the-micro-sign-converted-into-the-greek-letter
>
> --
> nosy: +eric.smith
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue33588] Unicode function arguments aren't preserved

2018-05-20 Thread Eric V. Smith

Eric V. Smith  added the comment:

I think you're seeing identifier normalization. See this SO question for a 
description of the issue: 
https://stackoverflow.com/questions/34097193/identifier-normalization-why-is-the-micro-sign-converted-into-the-greek-letter

--
nosy: +eric.smith

___
Python tracker 

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



[issue33588] Unicode function arguments aren't preserved

2018-05-20 Thread Mat Leonard

New submission from Mat Leonard :

Unicode symbols used as function arguments aren't preserved in the variable 
names available from .__code__.co_varnames. Example shown below.

def func(ϵ, α, γ, ϕ):
pass

varnames = func.__code__.co_varnames
print(varnames)
print('ϵ' == varnames[0])
print('α' == varnames[1])
print('γ' == varnames[2])
print('ϕ' == varnames[3])

>> ('ε', 'α', 'γ', 'φ')
>> False
>> True
>> True
>> False

I wrote some code dependent on using function arguments obtained from 
.__code__.co_varnames in a dictionary. Since the unicode arguments aren't 
preserved from defining the function and .__code__.co_varnames, the lookup in 
the dictionary fails.

Looks like same thing happens with the inspect module (maybe 
.__code__.co_varnames comes from inspect)

inspect.signature(func)
>> 

--
components: Unicode
files: Screen Shot 2018-05-20 at 2.32.05 PM.png
messages: 317201
nosy: ezio.melotti, mcleonard, vstinner
priority: normal
severity: normal
status: open
title: Unicode function arguments aren't preserved
type: behavior
versions: Python 3.6
Added file: https://bugs.python.org/file47608/Screen Shot 2018-05-20 at 2.32.05 
PM.png

___
Python tracker 

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



[issue33565] strange tracemalloc results

2018-05-20 Thread Alexander Mohr

Alexander Mohr  added the comment:

here's another problem, if I change that function signature to:
def test(s3_client):
try:
method = getattr(s3_client, sys.argv[1])
method(Bucket='archpi.dabase.com', Key='doesnotexist')
except botocore.exceptions.ClientError as e:
if e.response['ResponseMetadata']['HTTPStatusCode'] != 404:
raise 

print('.', end='', flush=True)

the print happens every time and the raise does not ever get hit, yet the raise 
line is still marked as the top "leak" (unfreed blocks).  It's really strange.  
Furthermore the second top "leak" is this stack:
  File "/tmp/Python-3.6.5/Lib/sre_compile.py", line 439
return prefix, prefix_skip, False
  File "/tmp/Python-3.6.5/Lib/sre_compile.py", line 498
prefix, prefix_skip, got_all = _get_literal_prefix(pattern)
  File "/tmp/Python-3.6.5/Lib/sre_compile.py", line 548
_compile_info(code, p, flags)


which doesn't make sense either, why would the return line be marked as having 
allocated anything?

and btw I did change the implementation to start early, and then compare 
differences between a snapshot at iter 20 and iter 100 and the same holds true 
as I stated, there should logically be no difference between starting it later, 
or starting in the beginning and comparing two snapshots as all what you're 
doing in either cases is comparing two

--

___
Python tracker 

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



[issue33579] calendar.timegm not always an inverse of time.gmtime

2018-05-20 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

Well, even in non-POSIX mode timegm and gmtime are the inverse of one another 
in BSD.  The problem that you see stems from the fact that time.gmtime is 
implemented as a call to the namesake C function while calendar.timegm is 
implemented in pure Python. It would be reasonable to bring some consistency to 
this situation.

--

___
Python tracker 

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



[issue33565] strange tracemalloc results

2018-05-20 Thread Alexander Mohr

Alexander Mohr  added the comment:

actually it does show in 3.5.2, it doesn't show when using get_object, but it 
does when using head_object, and they both throw the same exception, so weird.

--

___
Python tracker 

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



[issue33579] calendar.timegm not always an inverse of time.gmtime

2018-05-20 Thread Eitan Adler

Eitan Adler  added the comment:

FTR this was entirely self-inflicted: I had a setting which explicitly asked 
for non-posix gmtime.

That said, leaving this open for the same reasons as above.

--

___
Python tracker 

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



[issue32262] Fix linting errors in asyncio code; use f-strings consistently

2018-05-20 Thread Christian Heimes

Christian Heimes  added the comment:


New changeset b85115ed4c5d4e80ab818b44401e71299de9e9a5 by Christian Heimes 
(Miss Islington (bot)) in branch '3.7':
[3.7] bpo-32262: Fix typo in f-string (GH-7016)
https://github.com/python/cpython/commit/b85115ed4c5d4e80ab818b44401e71299de9e9a5


--

___
Python tracker 

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



[issue33565] strange tracemalloc results

2018-05-20 Thread Alexander Mohr

Alexander Mohr  added the comment:

so based on my last comment I just realized we could easily see if something 
was amiss by comparing results from python 3.5.2 to 3.6.5 and low and behold 
the callstack in question does not appear in the tracemalloc results from 3.5.2.

--

___
Python tracker 

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



[issue32262] Fix linting errors in asyncio code; use f-strings consistently

2018-05-20 Thread miss-islington

Change by miss-islington :


--
pull_requests: +6669

___
Python tracker 

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



[issue32262] Fix linting errors in asyncio code; use f-strings consistently

2018-05-20 Thread Christian Heimes

Christian Heimes  added the comment:


New changeset d361e99868a9eaa7ffce9341e1207705dbb66b50 by Christian Heimes in 
branch 'master':
bpo-32262: Fix typo in f-string (GH-7016)
https://github.com/python/cpython/commit/d361e99868a9eaa7ffce9341e1207705dbb66b50


--
nosy: +christian.heimes

___
Python tracker 

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



[issue33383] Crash in the get() method a single argument in dbm.ndbm

2018-05-20 Thread Zackery Spytz

Zackery Spytz  added the comment:

There was already an open issue for this (#31868).

--
nosy: +ZackerySpytz

___
Python tracker 

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



[issue23860] Failure to check return value from lseek() in Modules/mmapmodule.c

2018-05-20 Thread Zackery Spytz

Change by Zackery Spytz :


--
nosy: +ZackerySpytz
versions: +Python 3.8 -Python 3.4, Python 3.5

___
Python tracker 

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



[issue33541] Remove private and apparently unused __pad function

2018-05-20 Thread Alexander Belopolsky

Change by Alexander Belopolsky :


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



[issue23860] Failure to check return value from lseek() in Modules/mmapmodule.c

2018-05-20 Thread Zackery Spytz

Change by Zackery Spytz :


--
pull_requests: +6668

___
Python tracker 

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



[issue33541] Remove private and apparently unused __pad function

2018-05-20 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:


New changeset 89a25ce4fdb9c2a1a59d8cbfc498a2614b98e9ae by Alexander Belopolsky 
(Mario Corchero) in branch 'master':
bpo-33541: Remove unused __pad function (GH-4377)
https://github.com/python/cpython/commit/89a25ce4fdb9c2a1a59d8cbfc498a2614b98e9ae


--

___
Python tracker 

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



[issue33579] calendar.timegm not always an inverse of time.gmtime

2018-05-20 Thread Eitan Adler

Eitan Adler  added the comment:

Relevant conversation: 
https://lists.freebsd.org/pipermail/freebsd-standards/2018-May/003714.html

--

___
Python tracker 

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



[issue33579] calendar.timegm not always an inverse of time.gmtime

2018-05-20 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

I was able to reproduce this issue on Linux as follows

>>> import time, calendar, os
>>> os.environ['TZ'] = 'right/UTC'  # "right" timezones account for leap seconds
>>> time.tzset()
>>> calendar.timegm(time.gmtime(1234567899))
1234567875

This confirms Martin's insight that on the OP's system gmtime accounts for leap 
seconds.

There has been a general trend in Python to replace calls to system dependent 
functions in the time module with system independent reimplementations.  It is 
certainly possible to reimplement time.gmtime, but someone should champion this 
idea on python-dev.

--
assignee:  -> belopolsky
stage:  -> needs patch
type: behavior -> enhancement
versions: +Python 3.8

___
Python tracker 

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



[issue33587] inspect.getsource performs unnecessary filesystem stat call which is ignored in some circumstances

2018-05-20 Thread Pankaj Pandey

Pankaj Pandey  added the comment:

Here's the patch performance difference before and after the patch:

Before:

Sun May 20 21:42:32 2018prof1.stat

 1188991 function calls (1188851 primitive calls) in 4.821 seconds

   Ordered by: cumulative time

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
 18/10.0060.0004.8244.824 {built-in method builtins.exec}
10.0000.0004.8244.824 inspect_stack_perf.py:1()
10.0010.0014.7904.790 
inspect_stack_perf.py:22(load_nodes)
  4210.0010.0004.7870.011 inspect_stack_perf.py:5(__init__)
  4210.0010.0004.7860.011 
C:\Users\ppandey\AppData\Local\Continuum\Anaconda3\lib\inspect.py:1492(stack)
  4210.0110.0004.7850.011 
C:\Users\ppandey\AppData\Local\Continuum\Anaconda3\lib\inspect.py:1464(getouterframes)
 46300.0310.0004.7700.001 
C:\Users\ppandey\AppData\Local\Continuum\Anaconda3\lib\inspect.py:1425(getframeinfo)
  4200.0010.0004.7390.011 inspect_stack_perf.py:9(add_child)
139944.1590.0004.1590.000 {built-in method nt.stat}
 46300.0420.0003.2230.001 
C:\Users\ppandey\AppData\Local\Continuum\Anaconda3\lib\inspect.py:760(findsource)
 93220.0430.0002.9600.000 
C:\Users\ppandey\AppData\Local\Continuum\Anaconda3\lib\inspect.py:680(getsourcefile)
 93220.0110.0002.8320.000 
C:\Users\ppandey\AppData\Local\Continuum\Anaconda3\lib\genericpath.py:16(exists)
 46300.0160.0001.3390.000 
C:\Users\ppandey\AppData\Local\Continuum\Anaconda3\lib\linecache.py:53(checkcache)
 46300.0970.0000.3640.000 
C:\Users\ppandey\AppData\Local\Continuum\Anaconda3\lib\inspect.py:714(getmodule)
 46920.0080.0000.1350.000 
C:\Users\ppandey\AppData\Local\Continuum\Anaconda3\lib\inspect.py:702(getabsfile)
 47540.0080.0000.0910.000 
C:\Users\ppandey\AppData\Local\Continuum\Anaconda3\lib\ntpath.py:538(abspath)
 47540.0360.0000.0740.000 
C:\Users\ppandey\AppData\Local\Continuum\Anaconda3\lib\ntpath.py:471(normpath)
   1626000.0710.0000.0710.000 {built-in method builtins.hasattr}



After the patch:

Sun May 20 21:39:44 2018prof2.stat

 2639991 function calls (2639727 primitive calls) in 2.841 seconds

   Ordered by: cumulative time

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
 18/10.0050.0002.8442.844 {built-in method builtins.exec}
10.0000.0002.8442.844 inspect_stack_perf.py:1()
10.0010.0012.8142.814 
inspect_stack_perf.py:22(load_nodes)
  4210.0010.0002.8120.007 inspect_stack_perf.py:5(__init__)
  4210.0010.0002.8110.007 
C:\Users\ppandey\AppData\Local\Continuum\Anaconda3\lib\inspect.py:1492(stack)
  4210.0100.0002.8100.007 
C:\Users\ppandey\AppData\Local\Continuum\Anaconda3\lib\inspect.py:1464(getouterframes)
  4200.0010.0002.8020.007 inspect_stack_perf.py:9(add_child)
 46300.0290.0002.7950.001 
C:\Users\ppandey\AppData\Local\Continuum\Anaconda3\lib\inspect.py:1425(getframeinfo)
 46300.0400.0002.3800.001 
C:\Users\ppandey\AppData\Local\Continuum\Anaconda3\lib\inspect.py:760(findsource)
 46741.6310.0001.6310.000 {built-in method nt.stat}
 46300.0140.0001.6300.000 
C:\Users\ppandey\AppData\Local\Continuum\Anaconda3\lib\linecache.py:53(checkcache)
13952/138900.2810.0000.9070.000 
C:\Users\ppandey\AppData\Local\Continuum\Anaconda3\lib\inspect.py:714(getmodule)
9322/92600.0380.0000.7030.000 
C:\Users\ppandey\AppData\Local\Continuum\Anaconda3\lib\inspect.py:680(getsourcefile)
139520.0180.0000.2590.000 
C:\Users\ppandey\AppData\Local\Continuum\Anaconda3\lib\inspect.py:702(getabsfile)
140140.0170.0000.2150.000 
C:\Users\ppandey\AppData\Local\Continuum\Anaconda3\lib\ntpath.py:538(abspath)
   4781660.1770.0000.1770.000 {built-in method builtins.hasattr}


Total runtime reduced from 4.8 s to 2.8 s, and the major difference can be seen 
in the `nt.stat` call. This is on a machine with SSD. In workplace where python 
is installed in cluster on nfs, I'm sure the performance is worse.

--

___
Python tracker 

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



[issue33321] Add a Linux clang ubsan undefined behavior sanitizer buildbot

2018-05-20 Thread Gregory P. Smith

Change by Gregory P. Smith :


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



[issue33321] Add a Linux clang ubsan undefined behavior sanitizer buildbot

2018-05-20 Thread Gregory P. Smith

Gregory P. Smith  added the comment:

A buildbot is up and running:
  http://buildbot.python.org/all/#/builders?tags=%2Bubsan

in order to see the errors though, you have to manually string search for 
"runtime error" in the giant test logs stdout.

At the moment, Modules/_ctypes/_ctypes.c dominates the error lists with 
misaligned access problems - I suggest filtering that out and looking for the 
others to start with for anyone working on these issues.

--

___
Python tracker 

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



[issue25457] json dump fails for mixed-type keys when sort_keys is specified

2018-05-20 Thread Aaron Hall

Aaron Hall  added the comment:

Now that dicts are sortable, does that make the sort_keys argument redundant?

Should this bug be changed to "won't fix"?

--
nosy: +Aaron Hall

___
Python tracker 

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



[issue33587] inspect.getsource performs unnecessary filesystem stat call which is ignored in some circumstances

2018-05-20 Thread Pankaj Pandey

New submission from Pankaj Pandey :

The specific os.path.exists() call is shown here: 
https://github.com/python/cpython/pull/6805

If the filename is already in linecache or the module has a PEP 302 loader, 
then the os.path.exists() call is ignored. Hence it is better to call it only 
if its value is needed.

Attached a very simple case which shows the impact of the change:

--
files: inspect_stack_perf.py
messages: 317186
nosy: Pankaj Pandey
priority: normal
pull_requests: 6667
severity: normal
status: open
title: inspect.getsource performs unnecessary filesystem stat call which is 
ignored in some circumstances
Added file: https://bugs.python.org/file47607/inspect_stack_perf.py

___
Python tracker 

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



[issue33468] Add try-finally contextlib.contextmanager example

2018-05-20 Thread Petr Viktorin

Change by Petr Viktorin :


--
nosy: +petr.viktorin

___
Python tracker 

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



[issue33528] os.getentropy support

2018-05-20 Thread David Carlier

Change by David Carlier :


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

___
Python tracker 

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



[issue33586] 2.7.15 missing release notes on download page

2018-05-20 Thread Eric N. Vander Weele

New submission from Eric N. Vander Weele :

When visiting https://www.python.org/downloads/ and attempting to look at the 
2.7.15 release notes, the 'Release Notes' link on the far right of the table, 
it resolves to https://www.python.org/downloads/.

--
assignee: docs@python
components: Documentation
messages: 317185
nosy: docs@python, ericvw
priority: normal
severity: normal
status: open
title: 2.7.15 missing release notes on download page
versions: Python 2.7

___
Python tracker 

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



[issue29640] _PyThreadState_Init and fork race leads to inconsistent key list

2018-05-20 Thread Petr Viktorin

Petr Viktorin  added the comment:

pthread is not generally compatible with int, so it can't be used with Python 
2's API.
This was changed in py3 with PEP 539, which however makes it so that the old 
TLS API is only available if PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT.

--

___
Python tracker 

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



[issue33579] calendar.timegm not always an inverse of time.gmtime

2018-05-20 Thread Eitan Adler

Eitan Adler  added the comment:

Thanks! I've confirmed this is the case on my system and will be starting a 
conversation about fixing it.

In the meantime I am leaving this bug open since we may want to detect this 
case in python and correct for it.

--

___
Python tracker 

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



[issue33580] Make binary/text file glossary entries follow most common "see also" style

2018-05-20 Thread miss-islington

miss-islington  added the comment:


New changeset 983e9653e0584b65a6ec66543ce1631f888aa285 by Miss Islington (bot) 
in branch '3.6':
bpo-33580: Make binary/text file glossary entries follow most common "see also" 
style. (GH-6991)
https://github.com/python/cpython/commit/983e9653e0584b65a6ec66543ce1631f888aa285


--
nosy: +miss-islington

___
Python tracker 

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



[issue32262] Fix linting errors in asyncio code; use f-strings consistently

2018-05-20 Thread Christian Heimes

Change by Christian Heimes :


--
pull_requests: +

___
Python tracker 

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



[issue33542] _ipconfig_getnode incorrectly selects a DUID as a MAC address

2018-05-20 Thread miss-islington

miss-islington  added the comment:


New changeset 073eca39a55b86ec7dd7a437ac0c910751a60ace by Miss Islington (bot) 
in branch '3.7':
bpo-33542: Ignore DUID in uuid.get_node on Windows. (GH-6922)
https://github.com/python/cpython/commit/073eca39a55b86ec7dd7a437ac0c910751a60ace


--
nosy: +miss-islington

___
Python tracker 

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



[issue30940] Documentation for round() is incorrect.

2018-05-20 Thread miss-islington

miss-islington  added the comment:


New changeset 82c9adb3f94e5d889f03205d03a76a5ff0928531 by Miss Islington (bot) 
in branch '3.6':
bpo-30940: Updating round() docs. (GH-6342)
https://github.com/python/cpython/commit/82c9adb3f94e5d889f03205d03a76a5ff0928531


--
nosy: +miss-islington

___
Python tracker 

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



[issue30940] Documentation for round() is incorrect.

2018-05-20 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 736e3b32194b52b1779ce88a2c13862f0f913a7a by Serhiy Storchaka 
(Miss Islington (bot)) in branch '3.7':
bpo-30940: Updating round() docs. (GH-6342) (GH-7009)
https://github.com/python/cpython/commit/736e3b32194b52b1779ce88a2c13862f0f913a7a


--

___
Python tracker 

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



[issue33542] _ipconfig_getnode incorrectly selects a DUID as a MAC address

2018-05-20 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
pull_requests: +6665

___
Python tracker 

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



[issue33542] _ipconfig_getnode incorrectly selects a DUID as a MAC address

2018-05-20 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
pull_requests: +6664

___
Python tracker 

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



[issue33580] Make binary/text file glossary entries follow most common "see also" style

2018-05-20 Thread miss-islington

Change by miss-islington :


--
pull_requests: +6663

___
Python tracker 

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



[issue33580] Make binary/text file glossary entries follow most common "see also" style

2018-05-20 Thread miss-islington

Change by miss-islington :


--
pull_requests: +6662

___
Python tracker 

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



[issue33580] Make binary/text file glossary entries follow most common "see also" style

2018-05-20 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 0c4be82890858f874ff2158b0fcfdb8f261569c0 by Serhiy Storchaka 
(Andrés Delfino) in branch 'master':
bpo-33580: Make binary/text file glossary entries follow most common "see also" 
style. (GH-6991)
https://github.com/python/cpython/commit/0c4be82890858f874ff2158b0fcfdb8f261569c0


--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue26819] _ProactorReadPipeTransport pause_reading()/resume_reading() broken if called before any read is perfored

2018-05-20 Thread Guido van Rossum

Change by Guido van Rossum :


--
nosy:  -gvanrossum

___
Python tracker 

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



[issue33475] Fix converting AST expression to string and optimize parenthesis

2018-05-20 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset b32f8897eafcf335f9e9899c5e622a0b27679437 by Serhiy Storchaka in 
branch '3.7':
[3.7] bpo-33475: Fix and improve converting annotations to strings. (GH-6774). 
(GH-6927)
https://github.com/python/cpython/commit/b32f8897eafcf335f9e9899c5e622a0b27679437


--

___
Python tracker 

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



[issue28167] remove platform.linux_distribution()

2018-05-20 Thread Petr Viktorin

Petr Viktorin  added the comment:

Thanks for closing that one.

--

___
Python tracker 

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



[issue33585] re.sub calls repl function one time too many for catch-all regex

2018-05-20 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

This change is documented in the subsection "Changes in the Python API" of the 
section "Porting to Python 3.7".

--

___
Python tracker 

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



[issue33542] _ipconfig_getnode incorrectly selects a DUID as a MAC address

2018-05-20 Thread miss-islington

Change by miss-islington :


--
pull_requests: +6661

___
Python tracker 

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



[issue33542] _ipconfig_getnode incorrectly selects a DUID as a MAC address

2018-05-20 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset c66c342cb42ab8a4527ddfe3a5086bc06316 by Serhiy Storchaka 
(CtrlZvi) in branch 'master':
bpo-33542: Ignore DUID in uuid.get_node on Windows. (GH-6922)
https://github.com/python/cpython/commit/c66c342cb42ab8a4527ddfe3a5086bc06316


--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue30940] Documentation for round() is incorrect.

2018-05-20 Thread miss-islington

Change by miss-islington :


--
pull_requests: +6660

___
Python tracker 

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



[issue30940] Documentation for round() is incorrect.

2018-05-20 Thread miss-islington

Change by miss-islington :


--
pull_requests: +6659

___
Python tracker 

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



[issue30940] Documentation for round() is incorrect.

2018-05-20 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 900c48dba3f3eb8fb03ea766a5646f81c3bf3e9c by Serhiy Storchaka 
(Lisa Roach) in branch 'master':
bpo-30940: Updating round() docs. (GH-6342)
https://github.com/python/cpython/commit/900c48dba3f3eb8fb03ea766a5646f81c3bf3e9c


--

___
Python tracker 

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



[issue33584] Fix several minor bugs in asyncio

2018-05-20 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



[issue33584] Fix several minor bugs in asyncio

2018-05-20 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 52d1741c954448cd9ce3f705402e88211b8d4136 by Serhiy Storchaka 
(Miss Islington (bot)) in branch '3.7':
bpo-33584: Fix several minor bugs in asyncio. (GH-7003) (GH-7005)
https://github.com/python/cpython/commit/52d1741c954448cd9ce3f705402e88211b8d4136


--

___
Python tracker 

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



[issue33584] Fix several minor bugs in asyncio

2018-05-20 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 49418f6df7a234243a470260e1b59e9e4c0e4768 by Serhiy Storchaka in 
branch '3.6':
[3.6] bpo-33584: Fix several minor bugs in asyncio. (GH-7003) (#7006)
https://github.com/python/cpython/commit/49418f6df7a234243a470260e1b59e9e4c0e4768


--

___
Python tracker 

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



[issue33585] re.sub calls repl function one time too many for catch-all regex

2018-05-20 Thread Ville Skyttä

Ville Skyttä  added the comment:

Oh, I see, sorry about the noise, then. (Only looked at the "Improved Modules" 
-> re section in the what's new, thus missed the doc.)

--

___
Python tracker 

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



[issue33584] Fix several minor bugs in asyncio

2018-05-20 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
pull_requests: +6658

___
Python tracker 

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



[issue33585] re.sub calls repl function one time too many for catch-all regex

2018-05-20 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

This is expected behavior and documented change in 3.7. The pattern ".*" can 
match an empty string, and it matches an empty string at the end of line. This 
behavior is consistent with the behavior of re.finditer() and with the behavior 
of all regular expression implementations in other programming languages. 
Actually it was an old bug in re.sub() that has been fixed in 3.7.

Compare, in 3.6:

>>> list(re.finditer('.*', 'foo'))
[<_sre.SRE_Match object; span=(0, 3), match='foo'>, <_sre.SRE_Match object; 
span=(3, 3), match=''>]
>>> re.sub('.*', lambda m: repr(m), 'foo')
"<_sre.SRE_Match object; span=(0, 3), match='foo'>"

In 3.7:

>>> list(re.finditer('.*', 'foo'))
[, ]
>>> re.sub('.*', lambda m: repr(m), 'foo')
""

If you don't want to find an empty string, change you patter so that it will 
not match an empty string: ".+".

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



[issue33585] re.sub calls repl function one time too many for catch-all regex

2018-05-20 Thread Ville Skyttä

Ville Skyttä  added the comment:

Right, it's not limited to repl functions.

Python 3.6.3:
$ python -c 'import re;print(re.sub(".*", "X", "foo"))'
X

Python 3.7.0b4+:
$ python -c 'import re;print(re.sub(".*", "X", "foo"))'
XX

Poking serhiy.storchaka who according to the release notes, seems to have done 
quite a bit of work on re in 3.7.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue33584] Fix several minor bugs in asyncio

2018-05-20 Thread miss-islington

Change by miss-islington :


--
pull_requests: +6657

___
Python tracker 

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



[issue33584] Fix several minor bugs in asyncio

2018-05-20 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 6655354afcd116c27486bb5ba1dfa50b369d8d85 by Serhiy Storchaka in 
branch 'master':
bpo-33584: Fix several minor bugs in asyncio. (GH-7003)
https://github.com/python/cpython/commit/6655354afcd116c27486bb5ba1dfa50b369d8d85


--

___
Python tracker 

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



[issue33585] re.sub calls repl function one time too many for catch-all regex

2018-05-20 Thread Ville Skyttä

Change by Ville Skyttä :


--
components: +Regular Expressions
nosy: +ezio.melotti, mrabarnett

___
Python tracker 

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



[issue33585] re.sub calls repl function one time too many for catch-all regex

2018-05-20 Thread Ville Skyttä

New submission from Ville Skyttä :

(I'm fairly certain that the title doesn't describe the actual underlying issue 
all that well, however it is what I'm seeing so going with that for now.)

Compared to Python 3.6, 3.7 appears to call the repl function for re.sub one 
time too many, when given a catch-all regex. The extra call is made with a 
match consisting of an empty string. I think this is quite unexpected, and 
think it's a bug that I hope could be fixed before 3.7 is out.

Demonstration code:

import re
def repl(match):
print(f"Called with match '{match.group(0)}'")
re.sub(".*", repl, "foo")

3.6.3 produces the expected output:

Called with match 'foo'

3.7.0b4+ (current git) demonstrates the extra call:

Called with match 'foo'
Called with match ''

--
messages: 317166
nosy: scop
priority: normal
severity: normal
status: open
title: re.sub calls repl function one time too many for catch-all regex
type: behavior
versions: Python 3.7

___
Python tracker 

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



[issue33476] String index out of range in get_group(), email/_header_value_parser.py

2018-05-20 Thread Enrique Perez-Terron

Enrique Perez-Terron  added the comment:

Unsure how to issue a "PR" (Problem Report?) with a test case.

Here is my best effort:

Create a file "email.eml" in the current directory, as attached.
(The contents were lifted from RFC2822 section A.1.3, but I deleted the ";" at 
the end of the "To" header. The file has CRLF line endings.)

Then run the following test program (It appears that I can only attach one file 
to this ).

$ cat test-bug.py
from email.policy import default
import email

with open('email.eml', 'rb') as f:
msg = email.message_from_binary_file(f, policy=default)
toheader = msg['To']
for addr in toheader.addresses:
print(addr)

#
# Output without the fix:

$ python3.6.5 test-bug.py
Traceback (most recent call last):
  File "test-bug.py", line 6, in 
toheader = msg['To']
  File "C:\Program Files\Python36\lib\email\message.py", line 391, in 
__getitem__
return self.get(name)
  File "C:\Program Files\Python36\lib\email\message.py", line 471, in get
return self.policy.header_fetch_parse(k, v)
  File "C:\Program Files\Python36\lib\email\policy.py", line 162, in 
header_fetch_parse
return self.header_factory(name, value)
  File "C:\Program Files\Python36\lib\email\headerregistry.py", line 589, in 
__call__
return self[name](name, value)
  File "C:\Program Files\Python36\lib\email\headerregistry.py", line 197, in 
__new__
cls.parse(value, kwds)
  File "C:\Program Files\Python36\lib\email\headerregistry.py", line 340, in 
parse
kwds['parse_tree'] = address_list = cls.value_parser(value)
  File "C:\Program Files\Python36\lib\email\headerregistry.py", line 331, in 
value_parser
address_list, value = parser.get_address_list(value)
  File "C:\Program Files\Python36\lib\email\_header_value_parser.py", line 
1931, in get_address_list
token, value = get_address(value)
  File "C:\Program Files\Python36\lib\email\_header_value_parser.py", line 
1908, in get_address
token, value = get_group(value)
  File "C:\Program Files\Python36\lib\email\_header_value_parser.py", line 
1879, in get_group
if value[0] != ';':
IndexError: string index out of range

#-
# Output with the fix:

$ test-bug.py
Chris Jones 
j...@where.test
John 

--
Added file: https://bugs.python.org/file47606/email.eml

___
Python tracker 

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



[issue28167] remove platform.linux_distribution()

2018-05-20 Thread Berker Peksag

Change by Berker Peksag :


--
pull_requests:  -6650

___
Python tracker 

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



[issue26819] _ProactorReadPipeTransport pause_reading()/resume_reading() broken if called before any read is perfored

2018-05-20 Thread miss-islington

miss-islington  added the comment:


New changeset 28ea38b97b2bfbde9f387a8b90b02d05b93c895c by Miss Islington (bot) 
in branch '3.7':
bpo-26819: Prevent proactor double read on resume (GH-6921)
https://github.com/python/cpython/commit/28ea38b97b2bfbde9f387a8b90b02d05b93c895c


--
nosy: +miss-islington

___
Python tracker 

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



[issue33583] PyObject_GC_Resize() doesn't relink GCHead

2018-05-20 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

We can add a check that the object is not tracked and raise a SystemError 
otherwise. Maybe only in the debug build if it affects performance.

--

___
Python tracker 

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



[issue33500] Python TKinter for Mac on latest 2.7.15 still extremely slow vs Windows

2018-05-20 Thread Ronald Oussoren

Ronald Oussoren  added the comment:

Another note: we also prefer relatively small samples, the code in search.zip 
is quite large.

The reason to want a small example for this issue is that this would make it 
easier to check if the problem is on the Python side or on the Tk side (e.g., 
this might just be a problem in the macOS port for Tcl/Tk and therefore not 
something we can fix in the tkinter codebase).

---

And as this an issue involving Tkinter on macOS:

* What version of macOS are you using? "Is fully patched" the latest High 
Sierra?

* Which variant of the Python 2.7.15 installer did you use? 

  There are two different ones: a 32-bit/64-bit installer 
  and a 64-bit only installer.

* Did you install ActiveState Tcl/Tk (check if there is a Tk.framework
  in /Library/Frameworks)? If so, which version?

--

___
Python tracker 

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



[issue26819] _ProactorReadPipeTransport pause_reading()/resume_reading() broken if called before any read is perfored

2018-05-20 Thread miss-islington

Change by miss-islington :


--
pull_requests: +6656

___
Python tracker 

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



[issue26819] _ProactorReadPipeTransport pause_reading()/resume_reading() broken if called before any read is perfored

2018-05-20 Thread Andrew Svetlov

Andrew Svetlov  added the comment:


New changeset 4151061855b571bf8a7579daa7875b8e243057b9 by Andrew Svetlov 
(CtrlZvi) in branch 'master':
bpo-26819: Prevent proactor double read on resume (#6921)
https://github.com/python/cpython/commit/4151061855b571bf8a7579daa7875b8e243057b9


--
nosy: +asvetlov

___
Python tracker 

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



[issue33584] Fix several minor bugs in asyncio

2018-05-20 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
keywords: +patch
pull_requests: +6655
stage:  -> patch review

___
Python tracker 

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



[issue33584] Fix several minor bugs in asyncio

2018-05-20 Thread Serhiy Storchaka

New submission from Serhiy Storchaka :

* get_future_loop() silenced all exceptions raised when look up the get_loop 
attribute, not just an AttributeError.

* enter_task() silenced all exceptions raised when look up the current task, 
not just a KeyError.

* repr() was called for a borrowed link in enter_task() and task_step_impl().

* str() was used instead of repr() in formatting one error message.

* There where few reference leaks.

--
components: Extension Modules, asyncio
messages: 317160
nosy: asvetlov, serhiy.storchaka, yselivanov
priority: normal
severity: normal
status: open
title: Fix several minor bugs in asyncio
type: behavior
versions: Python 3.6, 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



[issue33583] PyObject_GC_Resize() doesn't relink GCHead

2018-05-20 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

I think we can simply document it.  I don't think anyone has silently buggy 
code, since it would probably cause a crash as soon as the chain of objects is 
walked.

If we want to fix PyObject_GC_Resize(), we should check that benchmarks are 
unaffected.

--
nosy: +pitrou, serhiy.storchaka

___
Python tracker 

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



[issue33583] PyObject_GC_Resize() doesn't relink GCHead

2018-05-20 Thread INADA Naoki

New submission from INADA Naoki :

https://github.com/python/cpython/blob/master/Modules/gcmodule.c#L1750-L1763

PyObject_GC_Resize() calls PyObject_REALLOC(), which can change object's 
address.
But it doesn't relinking:

 g->gc.gc_prev->gc.gc_next = g
 g->gc.gc_next->gc.gc_prev = g

So this API can't be used for tracked object.
In CPython code, all callers use this API for non tracked objects.

But if some extension module author used this API for tracked objects, it will 
cause hard to debug behavior.

Which should we do?

1. Add relinking to PyObject_GC_Resize()
2. Add note in the document

If 1, should we backport it to 3.7 and 3.6?

--
components: Interpreter Core
messages: 317158
nosy: inada.naoki
priority: normal
severity: normal
status: open
title: PyObject_GC_Resize() doesn't relink GCHead
type: behavior

___
Python tracker 

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



[issue23722] During metaclass.__init__, super() of the constructed class does not work

2018-05-20 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