[issue32612] pathlib.(Pure)WindowsPaths can compare equal but refer to different files

2018-01-22 Thread benrg

benrg  added the comment:

This bug is about paths that compare *equal*, but refer to *different* files. I 
agree that the opposite is not much of a problem (and I said so in the original 
comment).

The reason I classified this as a security bug is that Python scripts using 
pathlib on Windows could be vulnerable in certain cases to an attacker that can 
choose file names. For example, the order in which paths are added to a set or 
dict could affect which of two files is seen by the script. If different parts 
of the script add files in different orders - which would normally be safe - 
the result could be similar to a TOCTTOU race.

I don't disagree that "doing a good enough job of case folding is better than 
ignoring it." I just think that pathlib should not case-fold strings that 
Windows filesystems don't.

--
nosy: +pitrou
type: enhancement -> security

___
Python tracker 

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



[issue32633] Warnings from test_asyncio.test_tasks.SetMethodsTest

2018-01-22 Thread Nathaniel Smith

Change by Nathaniel Smith :


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

___
Python tracker 

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



[issue32633] Warnings from test_asyncio.test_tasks.SetMethodsTest

2018-01-22 Thread Nathaniel Smith

New submission from Nathaniel Smith :

The test_asyncio tests are generating some warnings:

0:00:00 load avg: 2.14 [1/1] test_asyncio.test_tasks
/home/njs/src/cpython/Lib/test/test_asyncio/test_tasks.py:100: RuntimeWarning: 
coroutine 'SetMethodsTest.test_set_exception_causes_invalid_state..foo' 
was never awaited
  gc.collect()
/home/njs/src/cpython/Lib/test/test_asyncio/test_tasks.py:100: RuntimeWarning: 
coroutine 'SetMethodsTest.test_set_result_causes_invalid_state..foo' 
was never awaited
  gc.collect()
/home/njs/src/cpython/Lib/test/test_asyncio/test_tasks.py:100: RuntimeWarning: 
coroutine 'SetMethodsTest.test_set_exception_causes_invalid_state..foo' 
was never awaited
  gc.collect()
/home/njs/src/cpython/Lib/test/test_asyncio/test_tasks.py:100: RuntimeWarning: 
coroutine 'SetMethodsTest.test_set_result_causes_invalid_state..foo' 
was never awaited
  gc.collect()
1 test OK.

It looks like these have been here for a while. Easy to fix though.

--
components: Tests, asyncio
messages: 310478
nosy: asvetlov, giampaolo.rodola, njs, yselivanov
priority: normal
severity: normal
status: open
title: Warnings from test_asyncio.test_tasks.SetMethodsTest
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



[issue30491] Add a lightweight mechanism for detecting un-awaited coroutine objects

2018-01-22 Thread Nathaniel Smith

Change by Nathaniel Smith :


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

___
Python tracker 

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



[issue32612] pathlib.(Pure)WindowsPaths can compare equal but refer to different files

2018-01-22 Thread Steve Dower

Steve Dower  added the comment:

Arguably, a WindowsPath instance only represents the *path* and not the file 
located by the path. So the programmer has to take just as much responsibility 
as if they were using plain strings, except there are some conveniences added 
to make those strings easier to manage.

I don't see anything in the docs suggesting that a Path instances have 
file-identity (that is, two Path objects are always equal if they refer to the 
same file). Even the "resolve()" method doesn't pretend to get the exact 
filename.

The best option for true comparison is to use stat() and compare st_inode and 
st_dev. Lacking that, doing a good enough job of case folding is better than 
ignoring it, as most workarounds are likely to do a worse job (e.g., they won't 
even correct for "A"=="B\..\A", let alone casing).

If you have a specific suggestion for how comparison could be improved here 
without having to go to kernel mode, feel free to make it. Unfortunately, your 
two suggestions here are not workable.

(And yes, PurePosixPath and "import posixpath" are the right way to handle 
case-sensitive paths explicitly, which is why they're available on all 
platforms.)

--
type: security -> enhancement
versions: +Python 3.8 -Python 3.4, Python 3.5, Python 3.6

___
Python tracker 

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



[issue32632] Mock does not create deepcopy of mutable args

2018-01-22 Thread Sergey

New submission from Sergey :

MagicMock allows to check parameters of calls by using "assert_has_calls". 
However it fails if argument has a mutable type and was changed in-place before 
the second call.

The example is provided in attached file.

In "func1" value in "data" changes for each iteration and as result:
call_args_list contains two same calls.
In "func2" variable "data" generates by function "get_dict" and in this case 
call_args_list contains correct values.

Obviously it happens because class _Call 
(https://github.com/python/cpython/blob/3.5/Lib/unittest/mock.py#L1929) does 
not create a deepcopy of call args/kwargs.

Will it be correct to add deep_copy logic in mock.py ? or may be it's wrong to 
use logic like in "func1"? 
I see only one disadvantage of using deepcopy: it will become slower.

--
components: Tests
files: test.py
messages: 310476
nosy: michael.foord, skraynev
priority: normal
severity: normal
status: open
title: Mock does not create deepcopy of mutable args
versions: Python 3.5
Added file: https://bugs.python.org/file47401/test.py

___
Python tracker 

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



[issue27099] IDLE: turn built-in extensions into regular modules

2018-01-22 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

These patches were first released with the 3.6.3 release candidate.  Nothing 
was changed for 3.6.4.  Rechecking the changes to autocomplete.py in PR 2494, 
the only expected effect, after the followup in #31488, PR 3612, is that 
changes to the popup wait time should take effect immediately instead of 
sometime later.  I considered making this happen for the 'extension' features, 
as with with other features, a type of bugfix.

If you have an issue with completions, other than those listed in #27609, 
please open a new issue.

I know zzdummy is listed.  An explanation that it is there for testing and 
example should have been added to the [Help] buttom text for the extension tab. 
 I opened #32631 for this and possible changes to zzdummy.py.

--

___
Python tracker 

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



[issue32436] Implement PEP 567

2018-01-22 Thread Yury Selivanov

Yury Selivanov  added the comment:


New changeset 83c8675edb4fe278c5d930f7865977a5d3c7168a by Yury Selivanov in 
branch 'master':
bpo-32436: Remove a redundant assert (#5275)
https://github.com/python/cpython/commit/83c8675edb4fe278c5d930f7865977a5d3c7168a


--

___
Python tracker 

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



[issue32630] Migrate decimal to use PEP 567 context variables

2018-01-22 Thread Yury Selivanov

Change by Yury Selivanov :


--
keywords: +patch
pull_requests: +5122

___
Python tracker 

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



[issue32631] IDLE: revise zzdummy.py

2018-01-22 Thread Terry J. Reedy

New submission from Terry J. Reedy :

zzdummy.py is needed for properly testing the extension mechanism.  It is 
intended to provide an example extension for users to follow.  When completed, 
enabled, and invoked, it will prefix every line of a window with some text, or 
remove the prefix from every line.  It would be even better to make it respect 
selections, as other format options do.

Needed: more comments, including what it does when enabled; docstring for 
z_in_event; uncomment z_in_event; code for z_out_event.

Should the extension have a different name? ZzTestExample? ZzIgnoreThis?  
Changing an extension name would normally be a bad idea, as it would disable 
any customizations.  But I think we could do it for this one if desired.

The default insertion text could be more informative: for instance, 'ignore 
this' or 'see-doc' or #ignore#.  The last would make it a configurable 
comment/uncomment.  Normally, changing a default is a no-no, as it can mess up 
user configurations.  But since the current text is inoperative, this should 
not matter here.

The menu defs are commented out because enabling the extension currently has no 
effect, so the menu entries would be useless.

***There should be help text for the extension tab explaining the presence and 
operation of the extension.  (This should have  been done already.)

Extension tests, last revised in #31480, will likely need more changes.

--
assignee: terry.reedy
components: IDLE
messages: 310473
nosy: terry.reedy
priority: normal
severity: normal
stage: needs patch
status: open
title: IDLE: revise zzdummy.py
type: behavior
versions: Python 3.6, Python 3.7

___
Python tracker 

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



[issue32630] Migrate decimal to use PEP 567 context variables

2018-01-22 Thread Yury Selivanov

New submission from Yury Selivanov :

PEP 567 allows decimal to be safely used in async/await code.

I couldn't observe any performance impact by the proposed PR.  The PR doesn't 
modify decimal context behaviour: instead of using a thread-local storage it 
now uses a context variable.

--
components: Library (Lib)
messages: 310472
nosy: gvanrossum, inada.naoki, skrah, vstinner, yselivanov
priority: normal
severity: normal
stage: patch review
status: open
title: Migrate decimal to use PEP 567 context variables
type: enhancement
versions: Python 3.7

___
Python tracker 

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



[issue32629] PyImport_ImportModule occasionally cause access violation

2018-01-22 Thread Jack Branson

New submission from Jack Branson :

I found that calling PyImport_ImportModule frequently may cause access 
violation error.

here is call stack:

00 0354f610 67d01605 0001 0020 007f python36!_PyObject_Alloc+0x5e 
[c:\build\cpython36\objects\obmalloc.c @ 1258]
01 (Inline)     python36!PyObject_Malloc+0x18 
[c:\build\cpython36\objects\obmalloc.c @ 479]
02 0354f638 67d18070 0008 007f 67e541e0 python36!PyUnicode_New+0xf5 
[c:\build\cpython36\objects\unicodeobject.c @ 1281]
03 0354f654 67d0963a 0354f69c 0008 007f 
python36!_PyUnicodeWriter_PrepareInternal+0x60 
[c:\build\cpython36\objects\unicodeobject.c @ 13534]
04 0354f6c0 67d02a66 67e541e0 0008  
python36!PyUnicode_DecodeUTF8Stateful+0xca 
[c:\build\cpython36\objects\unicodeobject.c @ 5034]
05 0354f6e4 67d59183 67e541e0 02a09db8 02a09de0 
python36!PyUnicode_FromString+0x46 [c:\build\cpython36\objects\unicodeobject.c 
@ 2077]
06 (Inline)     
python36!PyImport_ImportModuleLevel+0xa [c:\build\cpython36\python\import.c @ 
1652]
07 0354f704 67d5878f 02a09de0 02a09db8 02a09dd0 python36!PyImport_Import+0xe3 
[c:\build\cpython36\python\import.c @ 1732]
08 0354f718 00478639 02a09dd0 7651129a  
python36!PyImport_ImportModule+0x1f [c:\build\cpython36\python\import.c @ 1257]

pointer bp's value is 0x0001, which is NULL + 1. In this case, `assert(bp 
!= NULL)` will not let application crash for assert failure, and application 
will continue run until the line `pool->freeblock = *(block **)bp` which is 
defrencing bp, causes access violation.

0:009> .frame 0
00 0354f610 67d01605 python36!_PyObject_Alloc+0x5e 
[c:\build\cpython36\objects\obmalloc.c @ 1258]
0:009> r
eax=67ecfeb8 ebx=0021 ecx=02a09000 edx= esi=0001 edi=0001
eip=67cdda4e esp=0354f5f8 ebp=0354f610 iopl=0 nv up ei pl nz na pe cy
cs=0023  ss=002b  ds=002b  es=002b  fs=0053  gs=002b efl=00010207
python36!_PyObject_Alloc+0x5e:
67cdda4e 8b06mov eax,dword ptr [esi]  ds:002b:0001=
0:009> dv
 use_calloc = 0n0
  nelem = 1
 elsize = 
 nbytes = 0x21
   pool = 0x02a09000
   size = 4
   next = 0x67ecfeb8
 bp = 0x0001 "--- memory read error at address 0x0001 ---"
 result = 
  usable_arenas = 


/*
 * There is a used pool for this size class.
 * Pick up the head block of its free list.
 */
++pool->ref.count;
bp = pool->freeblock;
assert(bp != NULL);
if ((pool->freeblock = *(block **)bp) != NULL) {
UNLOCK();
if (use_calloc)
memset(bp, 0, nbytes);
return (void *)bp;
}
/*

--
components: ctypes
messages: 310471
nosy: Jack Branson
priority: normal
severity: normal
status: open
title: PyImport_ImportModule occasionally cause access violation
type: crash
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



[issue28716] Fractions instantiation revisited

2018-01-22 Thread Stefan Behnel

Stefan Behnel  added the comment:

Not sure if it's relevant for this specific change, but here's a benchmark that 
you could use for Fractions: issue22458

--
nosy: +scoder

___
Python tracker 

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



[issue32296] Implement asyncio._get_running_loop() and get_event_loop() in C

2018-01-22 Thread Yury Selivanov

Change by Yury Selivanov :


--
pull_requests: +5121

___
Python tracker 

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



[issue31860] IDLE: Make font sample editable

2018-01-22 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Postscript: I read a week or so ago that a new Windows 10 font chooser will 
have this feature.  There was not much detail and I believe it is currently 
only part of the Preview package.

--

___
Python tracker 

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



[issue32628] Add configurable DirectoryIndex to http.server

2018-01-22 Thread Erik Paulson

New submission from Erik Paulson :

In http.server and SimpleHTTPRequestHandler - the send_head function is 
hard-coded to treat index.html and index.htm as files to return in a directory 
- if neither of those files are present, it lists the directory. 

It would be very nice to be able to specify other files to use as a directory 
index, similar to the DirectoryIndex directive from Apache.

I think it'd be straight forward to add some kind of list you could set, just 
like you can modify extensions_map to include other types of MIME types. 

Would it be OK to just add a directory_index list with index.html and index.htm 
on by default that people could do like
Handler.directory_index.append("index.htmlx") in their setup? Or would such an 
API be better with some kind of helper?

--
components: Library (Lib)
messages: 310468
nosy: epaulson
priority: normal
severity: normal
status: open
title: Add configurable DirectoryIndex to http.server
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



[issue27099] IDLE: turn built-in extensions into regular modules

2018-01-22 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Leaving this as closed.  Just wanted to note that it was a rough upgrade to 
3.6.4 because of this backport.

--
status: open -> closed

___
Python tracker 

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



[issue27099] IDLE: turn built-in extensions into regular modules

2018-01-22 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

I don't think this should have been backported to 3.6.

This week, I'm teaching a class in Python3.6 and tab completion seems to be 
broken for everyone from a fresh install of 3.6.4 directly from www.python.org. 
 Also, the extension tab now shows ZzDummy.

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

___
Python tracker 

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



[issue32436] Implement PEP 567

2018-01-22 Thread Yury Selivanov

Change by Yury Selivanov :


--
pull_requests: +5120

___
Python tracker 

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



[issue32627] Header dependent _uuid build failure on Fedora 27

2018-01-22 Thread Nick Coghlan

Nick Coghlan  added the comment:

(Reducing priority since "sudo dnf remove uuid-devel" is a straightforward 
workaround)

--
priority: normal -> low

___
Python tracker 

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




[issue32102] Add "capture_output=True" option to subprocess.run

2018-01-22 Thread bbayles

Change by bbayles :


--
nosy: +bbayles

___
Python tracker 

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



[issue32502] uuid1() fails if only 64-bit interface addresses are available

2018-01-22 Thread bbayles

Change by bbayles :


--
nosy: +bbayles

___
Python tracker 

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



[issue32304] Upload failed (400): Digests do not match on .tar.gz ending with x0d binary code

2018-01-22 Thread bbayles

Change by bbayles :


--
nosy: +bbayles

___
Python tracker 

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



[issue32513] dataclasses: make it easier to use user-supplied special methods

2018-01-22 Thread Nick Coghlan

Nick Coghlan  added the comment:

I'd be fine with that recommendation (since `@dataclass(order=False)` and 
`@total_ordering` will compose without any problems), but in that case I'd 
suggest having "order=True" + any of the ordering methods result in an 
exception (as you've proposed for frozen=True and the methods that it needs to 
override).

--

___
Python tracker 

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



[issue32513] dataclasses: make it easier to use user-supplied special methods

2018-01-22 Thread Eric V. Smith

Eric V. Smith  added the comment:

Rather than re-implementing (and maintaining) functools.total_ordering 
semantics, I'd rather advise them to specify order=False and just use 
functools.total_ordering. It's an odd use case for dataclasses, anyway.

--

___
Python tracker 

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



[issue32513] dataclasses: make it easier to use user-supplied special methods

2018-01-22 Thread Nick Coghlan

Nick Coghlan  added the comment:

For the ordering operators, my only question would be whether or not I can rely 
on them to act like functools.total_ordering: if I supply __eq__ and one of the 
ordering operators (e.g. __lt__), will dataclasses make sure the other three 
ordering operators are consistent with those base methods? Or will it bypass 
them and act directly on the underlying fields?

My suggestion would be to say that if any of __lt__, __le__, __gt__ or __ge__ 
are defined, then data classes will implicitly generate the other methods based 
on functools.total_ordering semantics, and will only reference the underlying 
fields directly if *none* of them are defined. Otherwise I can see folks 
defining a single method like "__lt__", and being surprised when they end up 
with inconsistent comparison behaviour.

--
nosy: +ncoghlan

___
Python tracker 

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



[issue32620] [3.5] Travis CI fails on Python 3.5 with "pyenv: version `3.5' not installed"

2018-01-22 Thread Nick Coghlan

Change by Nick Coghlan :


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

___
Python tracker 

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



[issue31568] Configure thinks it finds python3.5 but doesn't

2018-01-22 Thread Nick Coghlan

Change by Nick Coghlan :


--
pull_requests: +5119

___
Python tracker 

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



[issue32620] [3.5] Travis CI fails on Python 3.5 with "pyenv: version `3.5' not installed"

2018-01-22 Thread Nick Coghlan

Nick Coghlan  added the comment:

I removed the snippet entirely from 
https://github.com/python/cpython/pull/5201, and while Travis didn't pass, it 
failed due to test suite failures, not anything environmental.

--
nosy: +ncoghlan

___
Python tracker 

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



[issue32627] Header dependent _uuid build failure on Fedora 27

2018-01-22 Thread Nick Coghlan

Nick Coghlan  added the comment:

Reverting my previous commit doesn't fix the problem: if both uuid-devel and 
libuuid-devel are installed, then it reports that the necessary bits to build 
_uuid weren't found, without even attempting to compile it at all.

--

___
Python tracker 

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



[issue32627] Header dependent _uuid build failure on Fedora 27

2018-01-22 Thread Nick Coghlan

New submission from Nick Coghlan :

I'm hitting a build failure relating to the new _uuid module on Fedora 27:

==
building '_uuid' extension
gcc -pthread -fPIC -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 
-Wall -Wstrict-prototypes -std=c99 -Wextra -Wno-unused-result 
-Wno-unused-parameter -Wno-missing-field-initializers 
-Werror=implicit-function-declaration -I./Include -I. -I/usr/local/include 
-I/home/ncoghlan/devel/cpython/Include -I/home/ncoghlan/devel/cpython -c 
/home/ncoghlan/devel/cpython/Modules/_uuidmodule.c -o 
build/temp.linux-x86_64-3.7/home/ncoghlan/devel/cpython/Modules/_uuidmodule.o
In file included from /home/ncoghlan/devel/cpython/Modules/_uuidmodule.c:8:0:
/usr/include/uuid.h:94:24: error: conflicting types for ‘uuid_t’
 typedef struct uuid_st uuid_t;
^~
In file included from /home/ncoghlan/devel/cpython/Modules/_uuidmodule.c:5:0:
/usr/include/uuid/uuid.h:44:23: note: previous declaration of ‘uuid_t’ was here
 typedef unsigned char uuid_t[16];
   ^~
In file included from /home/ncoghlan/devel/cpython/Modules/_uuidmodule.c:8:0:
/usr/include/uuid.h:107:22: error: conflicting types for ‘uuid_compare’
 extern uuid_rc_t uuid_compare  (const uuid_t  *_uuid, const uuid_t 
*_uuid2, int *_result);
  ^~~~
In file included from /home/ncoghlan/devel/cpython/Modules/_uuidmodule.c:5:0:
/usr/include/uuid/uuid.h:73:12: note: previous declaration of ‘uuid_compare’ 
was here
 extern int uuid_compare(const uuid_t uu1, const uuid_t uu2);
^~~~
/home/ncoghlan/devel/cpython/Modules/_uuidmodule.c: In function 
‘py_uuid_generate_time_safe’:
/home/ncoghlan/devel/cpython/Modules/_uuidmodule.c:15:12: error: storage size 
of ‘uuid’ isn’t known
 uuid_t uuid;
^~~~
/home/ncoghlan/devel/cpython/Modules/_uuidmodule.c:15:12: warning: unused 
variable ‘uuid’ [-Wunused-variable]
/home/ncoghlan/devel/cpython/Modules/_uuidmodule.c:29:1: warning: control 
reaches end of non-void function [-Wreturn-type]
 }
 ^
==

>From my initial investigation, I think the issue may be related to my previous 
>attempt to fix this in 
>https://github.com/python/cpython/commit/53efbf3977a44e382397e7994a2524b4f8c9d053#diff-2eeaed663bd0d25b7e608891384b7298
> and the fact that there are *two* "uuid.h" headers available in the Fedora 
>repos:

* /usr/include/uuid.h (provided by uuid-devel)
* /usr/include/uuid/uuid.h (provided by libuuid-devel)

Right now, the build works if you have "libuuid-devel" installed, but do *not* 
have "uuid-devel" installed.

With both installed, neither installed, or only uuid-devel installed, the build 
will fail, but the exact errors reported will vary. (There's also a distinct 
set of compile errors you can get if you forget to rerun configure after 
installing the additional headers)

Reverting my previous commit (and replacing it with a comment saying we're 
specifically looking for "uuid/uuid.h", not "uuid.h") may be enough to handle 
the case where both are installed.

--
messages: 310459
nosy: christian.heimes, ncoghlan, vstinner
priority: normal
severity: normal
stage: needs patch
status: open
title: Header dependent _uuid build failure on Fedora 27
type: compile error
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



[issue32436] Implement PEP 567

2018-01-22 Thread Yury Selivanov

Yury Selivanov  added the comment:

This one: https://github.com/python/cpython/pull/5273? I've left a comment with 
some questions there. Are there any other urgent PRs?

The main PEP 567 PR has been merged already, btw.

--

___
Python tracker 

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



[issue32436] Implement PEP 567

2018-01-22 Thread Guido van Rossum

Guido van Rossum  added the comment:

While you're waiting for code review maybe you can review some other PR?
(Lukasz mentioned that Serhiy seems very busy.)

--

___
Python tracker 

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



[issue32616] Significant performance problems with Python 2.7 built with clang 3.x or 4.x

2018-01-22 Thread Tim Smith

Change by Tim Smith :


--
nosy: +tdsmith

___
Python tracker 

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



[issue32436] Implement PEP 567

2018-01-22 Thread Yury Selivanov

Yury Selivanov  added the comment:

I'll try to find some time after beta-1.  Right now have a few other issues 
that I have to finish (and also create a PR to make decimal use PEP 567).

--

___
Python tracker 

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



[issue32436] Implement PEP 567

2018-01-22 Thread Guido van Rossum

Guido van Rossum  added the comment:

Hopefully sooner?

--

___
Python tracker 

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



[issue31368] Support asynchronous, non-blocking buffered reads (RWF_NONBLOCK)

2018-01-22 Thread STINNER Victor

STINNER Victor  added the comment:

Explanation for myself.

https://kernelnewbies.org/Linux_4.14#Asynchronous_buffered_I.2FO_support

"In this release, the preadv2(2) syscall with RWF_NONBLOCK will let userspace 
applications bypass enqueuing operation in the threadpool if it's already 
available in the pagecache."

For applications using a thread pool, like the aiofiles does for asyncio, 
preadv2() allows to bypass the thread pool which is obviously faster. If the 
read block, just uses thread pool as currently done.

Same rationale for pwritev2().

--
nosy: +vstinner

___
Python tracker 

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



[issue31333] Implement ABCMeta in C

2018-01-22 Thread Ivan Levkivskyi

Change by Ivan Levkivskyi :


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

___
Python tracker 

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



[issue32590] Proposal: add an "ensure(arg)" builtin for parameter validation

2018-01-22 Thread Nick Coghlan

Nick Coghlan  added the comment:

I agreed that this idea isn't really baked enough for an RFE yet, so I'm 
marking this as "postponed" for now.

The main requirement for getting it back out of "postponed" state would be 
having someone that's sufficiently interested to write a PEP and wrangle some 
related python-ideas threads.

--
resolution:  -> postponed
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



[issue32607] After Python Installation Error

2018-01-22 Thread Pablo Galindo Salgado

Change by Pablo Galindo Salgado :


--
components: +Windows
nosy: +paul.moore, steve.dower, tim.golden, zach.ware
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



[issue32436] Implement PEP 567

2018-01-22 Thread Yury Selivanov

Yury Selivanov  added the comment:

I'll keep the issue open -- a documentation for the new APIs will be merged in 
a separate PR in a couple of months.

--

___
Python tracker 

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



[issue32436] Implement PEP 567

2018-01-22 Thread Yury Selivanov

New submission from Yury Selivanov :


New changeset f23746a934177c48eff754411aba54c31d6be2f0 by Yury Selivanov in 
branch 'master':
bpo-32436: Implement PEP 567 (#5027)
https://github.com/python/cpython/commit/f23746a934177c48eff754411aba54c31d6be2f0


--

___
Python tracker 

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



[issue28980] ResourceWarning when imorting antigravity in 3.6

2018-01-22 Thread Ivan Levkivskyi

Ivan Levkivskyi  added the comment:

I have not seen this for quite some time so I'm closing this as fixed.

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



[issue32493] UUID Module - FreeBSD build failure

2018-01-22 Thread Michael Felt

Michael Felt  added the comment:

On 1/17/2018 11:16 AM, David CARLIER wrote:
> David CARLIER  added the comment:
>
> Might comes from uuid1 function itself ... e.g. line 704 not setting version 
> "field".
IMHO: for uuid1 - the version number should be in the 16 bytes filled by 
uuid_create. The implementation of uuid4() in uuid.py "has to" specify 
the attribute by setting the UUID version attribute to 4, so that when 
an uuid4 instance gets asked it's version it says 4. A random number 
gives no such guarantee.

Taking a hint from the FreeBSD man page for uuid_create() - that says it 
provides a DCE 1.1 RPC implementation - I found this link:
http://pubs.opengroup.org/onlinepubs/9629399/apdxa.htm

Therein:

The timestamp is a 60 bit value. For UUID version 1, this is represented 
by Coordinated Universal Time (UTC) as a count of 100-nanosecond 
intervals since 00:00:00.00, 15 October 1582 (the date of Gregorian 
reform to the Christian calendar).

The version number is multiplexed in the 4 most significant bits of the 
*time_hi_and_version* field. UUID version Field 
 
lists currently defined versions of the UUID.

Again - a random number is not likely to correctly set the 4 most significant 
bits - so another way is needed to make an instance it is version 4.
IMHO - the output of uuid_create should satisfy the needs of uuid version 1.

>
> --
> nosy: +David CARLIER2
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue32604] Expose the subinterpreters C-API in Python for testing use.

2018-01-22 Thread Ned Deily

Ned Deily  added the comment:

@Eric, given the breadth of change introduced in the PR (including adding a new 
extension), I think it would be best if at all possible to get it in for beta 1 
if we can resolve the review comments in time.  If necessary and if there are 
no objections from other core developers, I would be willing to consider making 
an exception and allowing it into beta 2 as long as it remains a private 
interface. If it looks like it won't be in releasable shape by then, I think 
you should hold off for 3.8; doing otherwise would be unfair to others and to 
our downstream beta users / testers, for example, even if it is private, adding 
a new extension and setup.py changes potentially affect downstream packagers.

--

___
Python tracker 

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



[issue32626] Subscript unpacking raises SyntaxError

2018-01-22 Thread Ben Burrill

New submission from Ben Burrill :

PEP 448 defines unpacking generalizations for tuples.  However, this does not 
currently work for subscripted tuples that are not delimited by parentheses.

Current behavior (Tested on 3.6/3.7a4):
>>> class Subscriptable:
... def __getitem__(self, item):
... return item
...
>>> ss = Subscriptable()
>>> 
>>> 1, 2, 3
(1, 2, 3)
>>> ss[1, 2, 3]
(1, 2, 3)
>>> *range(5), 42
(0, 1, 2, 3, 4, 42)
>>> ss[*range(5), 42]  # This should be the same as above
  File "", line 1
ss[*range(5), 42]
   ^
SyntaxError: invalid syntax
>>> ss[(*range(5), 42)]  # Workaround
(0, 1, 2, 3, 4, 42)

--
components: Interpreter Core
messages: 310447
nosy: Ben Burrill
priority: normal
severity: normal
status: open
title: Subscript unpacking raises SyntaxError
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



[issue22872] multiprocessing.Queue raises AssertionError

2018-01-22 Thread Jason Qian

Change by Jason Qian :


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



[issue32615] Inconsistent behavior if globals is a dict subclass

2018-01-22 Thread ppperry

Change by ppperry :


--
type:  -> behavior

___
Python tracker 

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



[issue22499] [SSL: BAD_WRITE_RETRY] bad write retry in _ssl.c:1636

2018-01-22 Thread Xavier G. Domingo

Change by Xavier G. Domingo :


--
nosy: +xgdomingo

___
Python tracker 

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



[issue31122] SSLContext.wrap_socket() throws OSError with errno == 0

2018-01-22 Thread Xavier G. Domingo

Change by Xavier G. Domingo :


--
nosy: +xgdomingo

___
Python tracker 

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



[issue32625] Update the dis module documentation to reflect switch to wordcode

2018-01-22 Thread Alexander Belopolsky

Change by Alexander Belopolsky :


--
nosy: +vstinner

___
Python tracker 

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



[issue20767] Some python extensions can't be compiled with clang 3.4

2018-01-22 Thread Stefan Krah

Stefan Krah  added the comment:

Well, they had ample time to articulate themselves. :)

--

___
Python tracker 

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



[issue32597] Bad detection of clang

2018-01-22 Thread Stefan Krah

Change by Stefan Krah :


--
nosy:  -skrah

___
Python tracker 

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



[issue29344] sock_recv not detected a coroutine

2018-01-22 Thread Yury Selivanov

Yury Selivanov  added the comment:

They have been documented as coroutines and were returning futures since Python 
3.4. I believe we can keep the status quo especially if only one user 
complained about it during the last 5 years.

--

___
Python tracker 

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



[issue29240] PEP 540: Add a new UTF-8 mode

2018-01-22 Thread STINNER Victor

STINNER Victor  added the comment:

I partially reverted the commit 7ed7aead9503102d2ed316175f198104e0cd674c: on 
Android, UTF-8 is now always used, again. Paul Peny (aka pmpp) confirmed me 
that my commit broke Python on Android, at least with API 19 (locales don't 
work properly before API 21).

--

___
Python tracker 

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



[issue29240] PEP 540: Add a new UTF-8 mode

2018-01-22 Thread STINNER Victor

STINNER Victor  added the comment:


New changeset 9089a265918754d95e105a7c4c409ac9352c87bb by Victor Stinner in 
branch 'master':
bpo-29240: PyUnicode_DecodeLocale() uses UTF-8 on Android (#5272)
https://github.com/python/cpython/commit/9089a265918754d95e105a7c4c409ac9352c87bb


--

___
Python tracker 

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



[issue29344] sock_recv not detected a coroutine

2018-01-22 Thread Berker Peksag

Berker Peksag  added the comment:

Well, the current status quo has already confused a user (see msg286011)

> (so that people don't write code that expects them to be not coroutines in 
> 3.6)

Even if people expect these methods to be coroutines, two functions of the 
asyncio public API (iscoroutinefunction() and iscoroutine()) disagree with them 
as described in msg286011.

In similar scenarios, we've always keep the code as is and clarified the docs 
in stable releases, then changed the code behave as documented in master.

--

___
Python tracker 

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



[issue32625] Update the dis module documentation to reflect switch to wordcode

2018-01-22 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

There is an uncommitted update for the EXTENDED_ARG opcode documentation 
attached to issue 27095 as mkfu4.patch by Demur Rumed.

--
nosy: +Demur Rumed

___
Python tracker 

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



[issue32625] Update the dis module documentation to reflect switch to wordcode

2018-01-22 Thread Alexander Belopolsky

New submission from Alexander Belopolsky :

A switch to wordcode is implemented in Python 3.6, but the documentation in the 
dis module was mostly left unchanged.  See issue 26647, msg266388 and issue 
27095, msg268389.

--
assignee: docs@python
components: Documentation
messages: 310440
nosy: belopolsky, docs@python
priority: normal
severity: normal
stage: needs patch
status: open
title: Update the dis module documentation to reflect switch to wordcode
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



[issue32624] Implement WriteTransport.is_protocol_paused()

2018-01-22 Thread Andrew Svetlov

New submission from Andrew Svetlov :

The method should return True is write is suspended

--
components: asyncio
messages: 310439
nosy: asvetlov, yselivanov
priority: normal
severity: normal
status: open
title: Implement WriteTransport.is_protocol_paused()
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



[issue26647] ceval: use Wordcode, 16-bit bytecode

2018-01-22 Thread Alexander Belopolsky

Change by Alexander Belopolsky :


--
components: +Interpreter Core -Documentation
stage: needs patch -> resolved

___
Python tracker 

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



[issue20767] Some python extensions can't be compiled with clang 3.4

2018-01-22 Thread STINNER Victor

STINNER Victor  added the comment:

> I guess the FreeBSD people are happy with the solution.

According to the discussion on https://github.com/python/cpython/pull/5233 : 
some FreeBSD people are unhappy :-)

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

___
Python tracker 

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



[issue32593] Drop support of FreeBSD 9 and older in Python 3.7

2018-01-22 Thread STINNER Victor

STINNER Victor  added the comment:

For the PR 5233 : I suggest to continue the discussion on bpo-20767. This PR is 
unrelated to this issue (drop support for old FreeBSDs).

--

___
Python tracker 

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



[issue32593] Drop support of FreeBSD 9 and older in Python 3.7

2018-01-22 Thread STINNER Victor

Change by STINNER Victor :


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



[issue32593] Drop support of FreeBSD 9 and older in Python 3.7

2018-01-22 Thread STINNER Victor

STINNER Victor  added the comment:


New changeset 13ff24582c99dfb439b1af7295b401415e7eb05b by Victor Stinner in 
branch 'master':
bpo-32593: Drop FreeBSD 9 and older support (#5232)
https://github.com/python/cpython/commit/13ff24582c99dfb439b1af7295b401415e7eb05b


--

___
Python tracker 

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



[issue29344] sock_recv not detected a coroutine

2018-01-22 Thread Yury Selivanov

Yury Selivanov  added the comment:

Since we made them coroutines in 3.7, I'd prefer to keep the 3.6 documentation 
as is (so that people don't write code that expects them to be not coroutines 
in 3.6).

Please let's keep the current status quo.

--

___
Python tracker 

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



[issue29344] sock_recv not detected a coroutine

2018-01-22 Thread Berker Peksag

Berker Peksag  added the comment:

> We only fixed it in 3.7 and the doc was updated.  3.6 stays as is.

I'm not talking about fixing code in 3.6. In 3.6, sock_* methods still 
documented as coroutines but they are normal functions:

* 
https://docs.python.org/3.6/library/asyncio-eventloop.html#low-level-socket-operations
* 
https://github.com/python/cpython/blob/4002d5dbf4c058bbf2462f9f5dea057956d1caff/Doc/library/asyncio-eventloop.rst#low-level-socket-operations
* 
https://github.com/python/cpython/blob/4002d5dbf4c058bbf2462f9f5dea057956d1caff/Lib/asyncio/selector_events.py#L354

3.6 documentation still needs to be fixed. See my patch.

--

___
Python tracker 

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



[issue32623] Resize dict on del/pop

2018-01-22 Thread STINNER Victor

STINNER Victor  added the comment:

Note: It was recently discussed if "del dict[key]" should keep the insertion 
order. If I understood correctly: yes, the order must be preserved on deletion.

https://mail.python.org/pipermail/python-dev/2017-November/150142.html

--

___
Python tracker 

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



[issue31179] Speed-up dict.copy() up to 5.5 times.

2018-01-22 Thread Yury Selivanov

Change by Yury Selivanov :


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



[issue31179] Speed-up dict.copy() up to 5.5 times.

2018-01-22 Thread Yury Selivanov

Yury Selivanov  added the comment:


New changeset b0a7a037b8fde56b62f886d5188bced7776777b4 by Yury Selivanov in 
branch 'master':
bpo-31179: Make dict.copy() up to 5.5 times faster. (#3067)
https://github.com/python/cpython/commit/b0a7a037b8fde56b62f886d5188bced7776777b4


--

___
Python tracker 

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



[issue29240] PEP 540: Add a new UTF-8 mode

2018-01-22 Thread STINNER Victor

Change by STINNER Victor :


--
pull_requests: +5116

___
Python tracker 

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



[issue29344] sock_recv not detected a coroutine

2018-01-22 Thread Berker Peksag

Berker Peksag  added the comment:

Andrew, shouldn't we fix 3.6 documentation? sock_* methods still documented as 
coroutines.

--

___
Python tracker 

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



[issue29344] sock_recv not detected a coroutine

2018-01-22 Thread Yury Selivanov

Yury Selivanov  added the comment:

> Andrew, shouldn't we fix 3.6 documentation? sock_* methods still documented 
> as coroutines.

We only fixed it in 3.7 and the doc was updated.  3.6 stays as is.

--

___
Python tracker 

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



[issue32607] After Python Installation Error

2018-01-22 Thread Shrivatsa Hosabettu

Shrivatsa Hosabettu  added the comment:

Hi,

 Thanks for the information. I re-installed Python and Django again and the 
problem is resolved.

Now when I run the command py -E -S I got the below message and python is 
running fine.

3.6.4 (v3.6.4:d48eceb, Dec 19 2017, 06:04:45) [MSC v.1900 32 bit (Intel)]

you can mark this as closed.

--

___
Python tracker 

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



[issue31179] Speed-up dict.copy() up to 5.5 times.

2018-01-22 Thread Yury Selivanov

Yury Selivanov  added the comment:

Victor: done; https://bugs.python.org/issue32623

--

___
Python tracker 

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



[issue32623] Resize dict on del/pop

2018-01-22 Thread Yury Selivanov

New submission from Yury Selivanov :

We should investigate whether we want dicts to compact themselves on del/pop 
operations.  Currently we have to rely on workarounds to have compactable 
dict.copy (see issue 31179) etc.

--
components: Interpreter Core
messages: 310427
nosy: inada.naoki, serhiy.storchaka, vstinner, yselivanov
priority: normal
severity: normal
status: open
title: Resize dict on del/pop
type: 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



[issue31179] Speed-up dict.copy() up to 5.5 times.

2018-01-22 Thread STINNER Victor

STINNER Victor  added the comment:

Yury: Would you mind to open an issue to investigate why dict are not 
compatected automatically?

--

___
Python tracker 

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



[issue31801] vars() manipulation encounters problems with Enum

2018-01-22 Thread Ethan Furman

Ethan Furman  added the comment:


New changeset a4b1bb4801f7a941ff9e86b96da539be1c288833 by Ethan Furman in 
branch 'master':
bpo-31801:  Enum:  add _ignore_ as class option (#5237)
https://github.com/python/cpython/commit/a4b1bb4801f7a941ff9e86b96da539be1c288833


--

___
Python tracker 

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



[issue32616] Significant performance problems with Python 2.7 built with clang 3.x or 4.x

2018-01-22 Thread Zhiming Wang

Zhiming Wang  added the comment:

My benchmarks above do contain py37 (master) stats.

--

___
Python tracker 

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



[issue32616] Significant performance problems with Python 2.7 built with clang 3.x or 4.x

2018-01-22 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

Has anyone done the same analysis with Python 3.6 or 3.7?

--
nosy: +barry

___
Python tracker 

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



[issue32622] Implement loop.sendfile

2018-01-22 Thread Andrew Svetlov

Change by Andrew Svetlov :


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

___
Python tracker 

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



[issue32622] Implement loop.sendfile

2018-01-22 Thread Andrew Svetlov

Change by Andrew Svetlov :


--
components: asyncio
nosy: asvetlov, yselivanov
priority: normal
severity: normal
status: open
title: Implement loop.sendfile
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



[issue32621] Problem of consistence in collection.abc documentation

2018-01-22 Thread Yahya Abou Imran

New submission from Yahya Abou Imran :

Opened after https://github.com/python/cpython/pull/5270 was closed.

Here:

https://docs.python.org/3/library/collections.abc.html

Some abstract methods are inherited from a superclass.
Most of the time the name of the method is mentioned in the subclass.

For example:

Collection inherit from Sized, Iterable and Contains.
But __len__, __iter__ and __contains__ are mentioned, even if they are 
inherited.

Mapping inherits from Collection, but __len__ and __iter__ appears in the table

There is one exception: Coroutine.
It inherits from Awaitable but we don't see __await__.

What would we do? Let all appear or not?

--
messages: 310422
nosy: yahya-abou-imran
priority: normal
severity: normal
status: open
title: Problem of consistence in collection.abc documentation
type: enhancement
versions: Python 3.6, Python 3.7

___
Python tracker 

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



[issue32616] Significant performance problems with Python 2.7 built with clang 3.x or 4.x

2018-01-22 Thread Pablo Galindo Salgado

Change by Pablo Galindo Salgado :


--
components: +Interpreter Core
type:  -> performance

___
Python tracker 

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



[issue32472] Mention of __await__ missing in Coroutine Abstract Methods

2018-01-22 Thread Yury Selivanov

Yury Selivanov  added the comment:

+1 to what Andres said.

--
nosy: +yselivanov
resolution:  -> not a bug
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



[issue32472] Mention of __await__ missing in Coroutine Abstract Methods

2018-01-22 Thread Yahya Abou Imran

Change by Yahya Abou Imran :


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

___
Python tracker 

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



[issue27815] Make SSL suppress_ragged_eofs default more secure

2018-01-22 Thread Christian Heimes

Christian Heimes  added the comment:

For example an invalid host name should invalidate the session until #31399 is 
resolved. Any TLS protocol violation should also invalidate the session. If 
somebody messes with the connection or the TLS protocol encounters a problem 
during MAC validation, the connection must be considered as tainted.

Some exception may be fine. IMO it's still safer hard-close the connection on 
any exceptions.

I agree with you. Let's not guess and ask some experts. I'm having meetings 
with security engineers from GnuTLS and NSS next week. I'll ask them.

--

___
Python tracker 

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



[issue27815] Make SSL suppress_ragged_eofs default more secure

2018-01-22 Thread Nathaniel Smith

Nathaniel Smith  added the comment:

Why would an exception inside 'with ssl_sock' have anything to do with the 
validity of the session shared secret?

I mean, maybe it does, but I *really* don't think we should be waving our hands 
and guessing about this stuff.

--

___
Python tracker 

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



[issue27815] Make SSL suppress_ragged_eofs default more secure

2018-01-22 Thread Christian Heimes

Christian Heimes  added the comment:

Perhaps a hard close is the right thing when SSLSocket.__exit__ encounters an 
exception?

--

___
Python tracker 

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



[issue32513] dataclasses: make it easier to use user-supplied special methods

2018-01-22 Thread Eric V. Smith

Eric V. Smith  added the comment:

The discussion on python-dev was that your ??? box would be "no": if the user 
supplied __repr__, they obviously meant for dataclass() to not provide one.

I can't see why the user would say repr=True ("I want dataclass() to add 
__repr__"), but then provide a __repr__ and get an exception. That looks like 
the only functionality added by your repr=True row over the proposal. Where 
your proposal uses repr=None for the "no", "yes" row, mine uses repr=True.

It's not like there's action at a distance here: the user is writing the class. 
Especially since base classes are ignored. 

I'm ignoring make_dataclasses(), where the user is dynamically creating a class 
and maybe a __repr__ snuck in. But I don't care so much about that case.

I do think your ascii tables are a good way of explaining this. Thanks! (Now I 
need a 3D version for eq, frozen, hash!)

--

___
Python tracker 

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



[issue32620] [3.5] Travis CI fails on Python 3.5 with "pyenv: version `3.5' not installed"

2018-01-22 Thread STINNER Victor

New submission from STINNER Victor :

My workaround for bpo-31568 is causing new issues on Python 3.5.

Output:
---
0.03s$ pyenv global system 3.5
pyenv: version `3.5' not installed
---

Extract of Python 3.5 .travis.yml:
---
  before_install:
# work around https://github.com/travis-ci/travis-ci/issues/8363
- pyenv global system 3.5
---

=> https://github.com/travis-ci/travis-ci/issues/8363

This workaround was added by me:
---
commit 70c630a7316f9f6063557786442e3c56502fe8ea
Author: Victor Stinner 
Date:   Sun Sep 24 15:45:00 2017 -0700

bpo-31568, Travis CI: Fix python3.5 (#3737)

Works around Travis CI bug about the python3.5 binary:
https://github.com/travis-ci/travis-ci/issues/8363
---

Without the workaround, running "python3.5" on Travis CI failed with "pyenv: 
python3.5: command not found".

Extract of Larry Hastings's email:
---

I have three PRs for Python 3.5.5rc1:

https://github.com/python/cpython/pull/4656
https://github.com/python/cpython/pull/5197
https://github.com/python/cpython/pull/5201

I can't merge them because Travis CI is unhappy.  All three CI tests fail in 
the same way, reporting this error:

The command "pyenv global system 3.5" failed and exited with 1 during .
---
https://mail.python.org/pipermail/python-committers/2018-January/005135.html

--
components: Tests
messages: 310416
nosy: vstinner
priority: normal
severity: normal
status: open
title: [3.5] Travis CI fails on Python 3.5 with "pyenv: version `3.5' not 
installed"
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



[issue27815] Make SSL suppress_ragged_eofs default more secure

2018-01-22 Thread STINNER Victor

STINNER Victor  added the comment:

I don't know well, Cheryl's PR wasn't added to this issue: 
https://github.com/python/cpython/pull/5266

--
pull_requests: +5113
stage:  -> patch review

___
Python tracker 

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



[issue32619] multiplication error

2018-01-22 Thread Steven D'Aprano

Steven D'Aprano  added the comment:

This is not a bug, it is a FAQ to do with the properties of binary floating 
point numbers.


https://docs.python.org/3/faq/design.html#why-are-floating-point-calculations-so-inaccurate

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



[issue27815] Make SSL suppress_ragged_eofs default more secure

2018-01-22 Thread Nathaniel Smith

Nathaniel Smith  added the comment:

It doesn't help that Python spells SSL_shutdown as "unwrap".

I think in practice basically the only two things you want are unidirectional 
shutdown, or "soft" shutdown. Bidirectional shutdown has some extremely 
theoretical uses, and we have to provide it anyway because it's in the API 
already. I don't know of any reason to ever use "hard" shutdown, though I'd be 
interested to hear of them.

--

___
Python tracker 

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



[issue32266] test_pathlib fails if current path has junctions

2018-01-22 Thread Larry Hastings

Larry Hastings  added the comment:

Python 3.4 and 3.5 are in "security fixes only" mode.  This is a minor bugfix, 
so it's too late to accept it into 3.4 and 3.5.

--
nosy: +larry
versions:  -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



[issue32072] Issues with binary plists

2018-01-22 Thread Larry Hastings

Larry Hastings  added the comment:


New changeset c59731d92dc73111d224876f1caa064097aad786 by larryhastings (Serhiy 
Storchaka) in branch '3.4':
[3.4] bpo-32072: Fix issues with binary plists. (GH-4455) (#4658)
https://github.com/python/cpython/commit/c59731d92dc73111d224876f1caa064097aad786


--

___
Python tracker 

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



[issue27815] Make SSL suppress_ragged_eofs default more secure

2018-01-22 Thread Christian Heimes

Christian Heimes  added the comment:

You have to tell OpenSSL that a hard-close is expected and fine. If you just 
SSL_free() the SSL connection, then OpenSSL removes the session from the 
SSL_CTX's session cache. It assumes that something went wrong and defaults to 
secure defaults. "Wrong" doesn't necessarily mean that an attacker has 
compromised a connection.

In order to flag a session as valid, you have to SSL_set_quiet_shutdown(ssl, 
1), SSL_shutdown(ssl), SSL_free(ss). With quiet shutdown set, SSL_shutdown() 
neither sends nor waits for any data.

One-way shutdown with non-blocking trick is evil. Cool hack :)

 SSLSocket and SSLObject should really support different shutdown modes, e.g. 
s.shutdown(mode=0) for quiet, mode=1 for unidirectional and mode=2 for 
bidirectional.

--

___
Python tracker 

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



[issue32589] Statistics as a result from timeit

2018-01-22 Thread Matthias Gilch

Change by Matthias Gilch :


--
resolution:  -> rejected
stage: patch review -> resolved
status:  -> closed

___
Python tracker 

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



[issue32589] Statistics as a result from timeit

2018-01-22 Thread Matthias Gilch

Matthias Gilch  added the comment:

Steven: Thanks for the advice. Next time I'll follow it
Victor: I'll look into perf 

I see that there are maybe problems and agree that we can close the issue and 
the PR.

--

___
Python tracker 

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



[issue27815] Make SSL suppress_ragged_eofs default more secure

2018-01-22 Thread Nathaniel Smith

Nathaniel Smith  added the comment:

@Christian: I'm surprised and somewhat dismayed to hear that OpenSSL 
invalidates sessions on hard close -- that hasn't been part of the spec since 
2006 when TLS 1.1 came out. I'm not a cryptographer, but the spec explicitly 
allows keeping the session, and I can't think of any particular reason why a 
network closure should imply that the secret material associated with the 
session has been compromised.

FWIW trio currently implements bidirectional mode (await ssl_stream.unwrap()),  
unidirectional mode (default for await ssl_stream.aclose()), and 
what-I-thought-was-quiet-but-apparently-is-hard (await ssl_stream.aclose() if 
the stream has the https_compatible=True flag set, or if a call to aclose() 
times out) [1]. I guess I should make that last one soft [2]. You actually can 
do all these things with the current ssl module, but it's extremely tricky and 
confusing. In particular, the way you do 'unidirectional' is to put the socket 
in non-blocking mode or use SSLObject and then call unwrap(), and when you get 
SSLWantReadError you're done, you can close the socket.

You might also by amused by this comment I left Cory in June and only just 
managed to track down again: 
https://github.com/python-hyper/pep543/issues/2#issuecomment-308900931 (and the 
rest of the thread too, but that comment specifically gets into shutdown 
semantics)

[1] 
https://github.com/python-trio/trio/blob/317020537ecefa9d6c6214c3caf4011ca4cfb564/trio/_ssl.py#L708-L791
[2] https://github.com/python-trio/trio/issues/415

--

___
Python tracker 

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



  1   2   >