[issue33663] Web.py wsgiserver3.py raises TypeError when CSS file is not found

2018-06-01 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

This code was added in issue16088. Taking into account all other uses of 
send_header(), and that len() always returns an integer, seems "int" should be 
replaced with "str".

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



[issue33660] pathlib.Path.resolve() returns path with double slash when resolving a relative path in root directory

2018-06-01 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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



[issue33739] pathlib: Allow ellipsis to appear after "/" to navigate to parent path

2018-06-01 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Note that 'a/b/c/..' is not the same as 'a/b' if 'c' is a link. And since "p / 
..." looks very similar to "p / '..'", it will cause mistakes. "p.parent" is 
more explicit.

AFAIK in cmd.exe on Windows 'a/b/c/...' means 'a/b/c/../..'. This is yet one 
source of confusion.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue21142] Daily/weekly ABI scan?

2018-06-01 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue33721] os.path.exists() ought to return False if pathname contains NUL

2018-06-01 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

In earlier versions NULs in paths caused silent truncating the path, and this 
is considered a vulnerability.

In 2.7 and earlier versions of 3.x a TypeError was raised in os.path.exists(). 
ValueError in this function (and many others) is raised since 3.5, because it 
looks more appropriate.

Similar exceptions are raised perhaps in hundreds functions. It is impossible 
to document them all, and os.path.exists() doesn't look special enough for 
documenting this only for it.

However os.path.exists() is special in the sense that this exception can be 
interpreted as a false value. Since os.path.exists() already catches OSError 
and interprets it as a false result, it is easier to add a ValueError here. I 
don't think this will break much code if add it only in 3.8. This will cover 
also the case of unencodable/undecodable paths ('\udfff', b'\x98').

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue21142] Daily/weekly ABI scan?

2018-06-01 Thread Nick Coghlan


Nick Coghlan  added the comment:

Updated link to the ABI tracker report: 
https://abi-laboratory.pro/tracker/timeline/python/

(The stable ABI report still has a separate entry on 
http://upstream.rosalinux.ru/ but it links to the same report as I've linked 
above)

I'm bumping this based on the 3.7.0 stable ABI break that Christian Tismer 
reported for PyIndex_Check - it's clear that we *need* some form of automated 
testing for the stable ABI, or we're going to continue to see issues like this 
crop up at release time.

(Folks freshly added to the nosy list: I added you either as release managers 
for 3.7+, or else because we've previously talked about the stable ABI and its 
maintainability)

--
nosy: +Christian.Tismer, benjamin.peterson, eric.snow, lukasz.langa, ned.deily, 
petr.viktorin, steve.dower, vstinner

___
Python tracker 

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



[issue33562] Check that the global settings for asyncio are not changed by tests

2018-06-01 Thread Brett Cannon


Change by Brett Cannon :


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



[issue33562] Check that the global settings for asyncio are not changed by tests

2018-06-01 Thread Brett Cannon


Brett Cannon  added the comment:


New changeset 8425de4147eb8d83befbb8ea77516fc764bb4309 by Brett Cannon in 
branch 'master':
bpo-33562: Check the global asyncio event loop policy isn't set after any tests 
(GH-7328)
https://github.com/python/cpython/commit/8425de4147eb8d83befbb8ea77516fc764bb4309


--

___
Python tracker 

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



[issue30654] signal module always overwrites SIGINT on interpreter shutdown

2018-06-01 Thread Benjamin Peterson


Benjamin Peterson  added the comment:

It seems like this only affects embeddings and for embeddings, it's strictly an 
improvement?

--

___
Python tracker 

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



[issue33679] IDLE: Re-enable color configuration for code context

2018-06-01 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
title: IDLE: Configurable color on code context -> IDLE: Re-enable color 
configuration for code context
type: enhancement -> behavior

___
Python tracker 

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



[issue33679] IDLE: Configurable color on code context

2018-06-01 Thread miss-islington


miss-islington  added the comment:


New changeset dd851d6019efe79f67b13d67899afa36b33e10a8 by Miss Islington (bot) 
in branch '3.6':
bpo-33679: IDLE: Re-enable color configuration for code context (GH-7199)
https://github.com/python/cpython/commit/dd851d6019efe79f67b13d67899afa36b33e10a8


--

___
Python tracker 

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



[issue33679] IDLE: Configurable color on code context

2018-06-01 Thread miss-islington


miss-islington  added the comment:


New changeset 4e033c5aa12766b1a4ba90d2184dbf32ef87f06e by Miss Islington (bot) 
in branch '3.7':
bpo-33679: IDLE: Re-enable color configuration for code context (GH-7199)
https://github.com/python/cpython/commit/4e033c5aa12766b1a4ba90d2184dbf32ef87f06e


--
nosy: +miss-islington

___
Python tracker 

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



[issue33709] test.support.FS_NONASCII returns incorrect result in Windows with non-US locale

2018-06-01 Thread Ivan Pozdeev


Ivan Pozdeev  added the comment:

In 3.x, it turns out, this doesn't result in test failures in stock 
configuration.

It does though if PYTHONLEGACYWINDOWSFSENCODING is in system environment.

I was diagnosing failures in 2.x and saw that 3.x has the same logic, so it was 
a no-brainer to replicate the change...

--

___
Python tracker 

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



[issue33679] IDLE: Configurable color on code context

2018-06-01 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset de6516264e793be991f692fdd892707afb9104a7 by Terry Jan Reedy 
(Cheryl Sabella) in branch 'master':
bpo-33679: IDLE: Re-enable color configuration for code context (GH-7199)
https://github.com/python/cpython/commit/de6516264e793be991f692fdd892707afb9104a7


--

___
Python tracker 

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



[issue33679] IDLE: Configurable color on code context

2018-06-01 Thread miss-islington


Change by miss-islington :


--
pull_requests: +6966

___
Python tracker 

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



[issue33679] IDLE: Configurable color on code context

2018-06-01 Thread miss-islington


Change by miss-islington :


--
pull_requests: +6965

___
Python tracker 

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



[issue33615] test__xxsubinterpreters crashed on x86 Gentoo Refleaks 3.x

2018-06-01 Thread Eric Snow


Change by Eric Snow :


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

___
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-06-01 Thread Eric Snow


Eric Snow  added the comment:


New changeset 63799136e6c0491bb5d6f4a234d5a775db3458db by Eric Snow in branch 
'master':
bpo-33615: Re-enable a subinterpreter test. (gh-7251)
https://github.com/python/cpython/commit/63799136e6c0491bb5d6f4a234d5a775db3458db


--

___
Python tracker 

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



[issue33615] test__xxsubinterpreters crashed on x86 Gentoo Refleaks 3.x

2018-06-01 Thread Eric Snow


Eric Snow  added the comment:


New changeset 63799136e6c0491bb5d6f4a234d5a775db3458db by Eric Snow in branch 
'master':
bpo-33615: Re-enable a subinterpreter test. (gh-7251)
https://github.com/python/cpython/commit/63799136e6c0491bb5d6f4a234d5a775db3458db


--

___
Python tracker 

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



[issue33642] IDLE: Use variable number of lines in CodeContext

2018-06-01 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

I am leaving this open until the new behavior is documented, even though it 
might be part of another issue that includes other context changes.

For this issue, I will leave what happens when unzooming unspecific.

--

___
Python tracker 

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



[issue33610] IDLE: Make multiple improvements to CodeContext

2018-06-01 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

I merged 'variable lines' and edited 'colors' to fix the resulting conflicts.  
Travis passed the latter so I expect to merge it also.  To avoid more 
conflicts, you should wait to create the 'alignment' branch until 'colors' is 
merged and pulled into your clone.  (We should continue to keep having two 
pending patches for the same file rare.)

Counter-argument for menu location.  Window has 1 to n top-level window items.  
Options will have just one item without Code Context.  So moving Zoom would 
make things more balanced.

--

___
Python tracker 

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



[issue33642] IDLE: Use variable number of lines in CodeContext

2018-06-01 Thread miss-islington


miss-islington  added the comment:


New changeset a42fe3c67ca86ac08dc6f47af27eed089d35fdd0 by Miss Islington (bot) 
in branch '3.6':
bpo-33642: IDLE: Use variable number of lines in CodeContext. (GH-7106)
https://github.com/python/cpython/commit/a42fe3c67ca86ac08dc6f47af27eed089d35fdd0


--

___
Python tracker 

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



[issue33642] IDLE: Use variable number of lines in CodeContext

2018-06-01 Thread miss-islington


miss-islington  added the comment:


New changeset 0800b6c17a829ecb554d93cba8c97f92b15be52a by Miss Islington (bot) 
in branch '3.7':
bpo-33642: IDLE: Use variable number of lines in CodeContext. (GH-7106)
https://github.com/python/cpython/commit/0800b6c17a829ecb554d93cba8c97f92b15be52a


--
nosy: +miss-islington

___
Python tracker 

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



[issue33642] IDLE: Use variable number of lines in CodeContext

2018-06-01 Thread miss-islington


Change by miss-islington :


--
pull_requests: +6964

___
Python tracker 

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



[issue33642] IDLE: Use variable number of lines in CodeContext

2018-06-01 Thread miss-islington


Change by miss-islington :


--
pull_requests: +6963

___
Python tracker 

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



[issue33642] IDLE: Use variable number of lines in CodeContext

2018-06-01 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset 29996a1c4e8bd6dde6adce2b44d11a0982a47a3a by Terry Jan Reedy 
(Cheryl Sabella) in branch 'master':
bpo-33642: IDLE: Use variable number of lines in CodeContext. (GH-7106)
https://github.com/python/cpython/commit/29996a1c4e8bd6dde6adce2b44d11a0982a47a3a


--

___
Python tracker 

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



[issue33724] test__xxsubinterpreters failed on ARMv7 Ubuntu 3.x

2018-06-01 Thread Eric Snow


Eric Snow  added the comment:

The fix took care of the failures.

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



[issue29235] Allow profile/cProfile to be used as context managers

2018-06-01 Thread Scott Sanderson


Scott Sanderson  added the comment:

I've posted a patch to update the docs to 
https://github.com/python/cpython/pull/7331.

--
nosy: +Scott Sanderson2

___
Python tracker 

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



[issue29235] Allow profile/cProfile to be used as context managers

2018-06-01 Thread Scott Sanderson


Change by Scott Sanderson :


--
pull_requests: +6961

___
Python tracker 

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



[issue33724] test__xxsubinterpreters failed on ARMv7 Ubuntu 3.x

2018-06-01 Thread Eric Snow


Eric Snow  added the comment:


New changeset 6854e803b73ac4d02ba160d514b8a53dd7a62905 by Eric Snow in branch 
'master':
bpo-33724: Use the right format code for int64_t in subinterpreters code. 
(gh-7330)
https://github.com/python/cpython/commit/6854e803b73ac4d02ba160d514b8a53dd7a62905


--

___
Python tracker 

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



[issue33724] test__xxsubinterpreters failed on ARMv7 Ubuntu 3.x

2018-06-01 Thread Eric Snow


Change by Eric Snow :


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

___
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-06-01 Thread Eric Snow


Change by Eric Snow :


--
pull_requests: +6960

___
Python tracker 

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



[issue33739] pathlib: Allow ellipsis to appear after "/" to navigate to parent path

2018-06-01 Thread Yury Selivanov


Change by Yury Selivanov :


--
keywords: +patch
pull_requests: +6958

___
Python tracker 

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



[issue33739] pathlib: Allow ellipsis to appear after "/" to navigate to parent path

2018-06-01 Thread Yury Selivanov


New submission from Yury Selivanov :

We can allow using ... to navigate the "parent" path:

>>> import pathlib
>>> p = pathlib.Path('a/b/c')
>>> p
PosixPath('a/b/c')
>>> p / ...
PosixPath('a/b')
>>> p / ... / ... / 'temp'
PosixPath('a/temp')

The patch is trivial and I think that using "..." instead of ".parent" makes 
code clearer and cuter.

--
components: Library (Lib)
messages: 318468
nosy: brett.cannon, pitrou, yselivanov
priority: normal
severity: normal
stage: patch review
status: open
title: pathlib: Allow ellipsis to appear after "/" to navigate to parent path
type: enhancement

___
Python tracker 

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



[issue33724] test__xxsubinterpreters failed on ARMv7 Ubuntu 3.x

2018-06-01 Thread Eric Snow


Eric Snow  added the comment:

I'm pretty sure at this point that the failures are due to using a %d format 
string for int64_t instead of %lld.  I'll have a PR up shortly.

--

___
Python tracker 

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



[issue33610] IDLE: Make multiple improvements to CodeContext

2018-06-01 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

> That leaves line alignment.  If you are working on it, but don't have a PR 
> ready yet, please say so.

I was going to work on it this weekend, but haven't started yet.

I agree that moving Code Context to the Windows menu makes sense.

--

___
Python tracker 

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



[issue33562] Check that the global settings for asyncio are not changed by tests

2018-06-01 Thread Brett Cannon


Change by Brett Cannon :


--
pull_requests: +6957

___
Python tracker 

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



[issue33738] PyIndex_Check conflicts with PEP 384

2018-06-01 Thread Christian Tismer


Christian Tismer  added the comment:

Yes, sure, I will submit a patch that tries to reach as much
as possible locations that have a similar problem. Of course,
the code will only be turned into functions for the PEP context.

Takes a day because I need to re-learn a bit how to do this :-)
(last patch was 2010, I think... )

-- related personal note - does someone know what happened to Martin?

--

___
Python tracker 

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



[issue33642] IDLE: Use variable number of lines in CodeContext

2018-06-01 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

I see similar behavior on Linux, except after maximizing and then minimizing, 
it seems to stay with option 2.

--

___
Python tracker 

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



[issue33721] os.path.exists() ought to return False if pathname contains NUL

2018-06-01 Thread Eryk Sun


Eryk Sun  added the comment:

It has to be a ValueError since the error is an invalid parameter at the Python 
level. Similarly, in 3.6+ when using bytes paths in Windows, for which Python 
uses UTF-8 as the file-system encoding, os.path.exists() may raise 
UnicodeDecodeError:

>>> try:
... os.path.exists(b'\xc8spam')
... except ValueError as e: err = e
...
>>> err
UnicodeDecodeError('utf-8', b'\xc8spam', 0, 1, 'invalid continuation byte')

There's no practical support for NUL in paths in any OS as far as I know. In 
principle, the native NT API of Windows allows NUL in device names since it 
uses counted strings. However, Python only supports the Windows API, which uses 
null-terminated strings. So, practically speaking, not supporting NUL in paths 
is not an issue.

Here's an example of using an NT device name that contains a NUL character. It 
creates a DOS 'device' named "A\x00B" that targets "C:\\Temp". It's like a 
SUBST drive, but with any device name instead of just a drive-letter name. I 
omitted the ctypes definitions for brevity.

obja = OBJECT_ATTRIBUTES("\\??\\A\x00B")
target = UNICODE_STRING("\\??\\C:\\Temp")
handle = ctypes.c_void_p()
NtCreateSymbolicLinkObject(ctypes.byref(handle), GENERIC_ALL,
ctypes.byref(obja), ctypes.byref(target))

Query the timestamps of the "A\x00B" device: 

info = (ctypes.c_ulonglong * 5)()
NtQueryAttributesFile(ctypes.byref(obja), info)

times = (ctypes.c_int * 4)()
for i in range(4):
RtlTimeToSecondsSince1970(ctypes.byref(info, i*8),
ctypes.byref(times, i*4))

Verify that the creation, last access, and last write times are the same as 
"C:\\Temp":

s = os.stat('C:\\Temp')
times2 = [int(x) for x in (s.st_ctime, s.st_atime, s.st_mtime)]

>>> times[:3] == times2
True

(The fourth timestamp is the change time, which isn't supported in Windows 
Python for legacy reasons that also relate to the bizarre use of st_ctime for 
the creation time, instead of st_birthtime.)

--
nosy: +eryksun

___
Python tracker 

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



[issue33738] PyIndex_Check conflicts with PEP 384

2018-06-01 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Would be nice if you fix as much similar as you can with a single PR.

For performance it makes sense to keep macros if the limited API is not used.

--

___
Python tracker 

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



[issue33738] PyIndex_Check conflicts with PEP 384

2018-06-01 Thread Christian Tismer


Christian Tismer  added the comment:

Ok, I tried to submit a patch (not yet successful),
but as it stands, there are more locations in the code where
this will show up with similar problems.

Should I take care of these all as much as I can,
or is it better to leave it to one of you?

Whatever you prefer is ok. I just want the problem to disappear
in 3.7, because I hate to break the API any longer.

Cheers - Chris

--

___
Python tracker 

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



[issue29235] Allow profile/cProfile to be used as context managers

2018-06-01 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Please add a versionadded or versionchanged directive in the documentation (not 
sure what is more appropriate in this case) and an entry in What's New.

A news entry shouldn't consist of several paragraphs. This will be lost when 
news entries will be merged into a single NEWS file.

--
nosy: +serhiy.storchaka
versions: +Python 3.8 -Python 3.7

___
Python tracker 

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



[issue29235] Allow profile/cProfile to be used as context managers

2018-06-01 Thread Brett Cannon


Brett Cannon  added the comment:


New changeset 2e01b75884892d5aabdaab658fbd17f7a7ccebaa by Brett Cannon (Scott 
Sanderson) in branch 'master':
bpo-29235: Make cProfile.Profile a context manager (GH-6808)
https://github.com/python/cpython/commit/2e01b75884892d5aabdaab658fbd17f7a7ccebaa


--
nosy: +brett.cannon

___
Python tracker 

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



[issue33738] PyIndex_Check conflicts with PEP 384

2018-06-01 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Seems PyIter_Check and PySequence_ITEM have the same problem. And maybe more.

--

___
Python tracker 

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



[issue33734] asyncio/ssl: Fix AttributeError, increase default handshake timeout

2018-06-01 Thread Hynek Schlawack


Hynek Schlawack  added the comment:

> Previous timeout was effectively infinite.

Oi, well then 60s are an improvement indeed. :)

--

___
Python tracker 

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



[issue31215] Add version changed notes for OpenSSL 1.1.0 compatibility

2018-06-01 Thread Mayank Singhal


Mayank Singhal <17mayanksing...@gmail.com> added the comment:

Hey, I'll take this up.

--
nosy: +storymode7

___
Python tracker 

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



[issue33650] asyncio: Prohibit adding a signal handler for SIGCHLD

2018-06-01 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

Some people may have reasons to do that (for example: they write their own 
subprocess implementation). I suggest emitting a warning rather than forbidding 
it.

--
nosy: +pitrou

___
Python tracker 

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



[issue33650] asyncio: Prohibit adding a signal handler for SIGCHLD

2018-06-01 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
title: Prohibit adding a signal handler for SIGCHLD -> asyncio: Prohibit adding 
a signal handler for SIGCHLD

___
Python tracker 

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



[issue33663] Web.py wsgiserver3.py raises TypeError when CSS file is not found

2018-06-01 Thread Ned Deily


Change by Ned Deily :


--
keywords: +easy
nosy: +orsenthil
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



[issue33650] Prohibit adding a signal handler for SIGCHLD

2018-06-01 Thread Yury Selivanov


Yury Selivanov  added the comment:

To clarify this ticket: I'm talking about prohibiting 
`loop.add_signal_handler(SIGCHLD)` as it would break child processes watchers 
that asyncio installs. In other words, setting a custom SIGCHLD breaks asyncio 
internals.

We can allow user-set SIGCHLD signals if we add some code to make sure that 
'add_signal_handler(SIGCHLD)' delivers the signal to *both* asyncio internals 
and user code.  But I'm not sure if there's a valid use case for listening for 
SIGCHLD for user code at all.

For now, I disabled SIGCHLD in uvloop, let's see if people complain.

--

___
Python tracker 

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



[issue33661] urllib may leak sensitive HTTP headers to a third-party web site

2018-06-01 Thread Ivan Pozdeev


Ivan Pozdeev  added the comment:

It's not about "convincing" me or anyone else. It's about showing how this will 
be a strict improvement.

I showed that the HTTP RFC allows apps to rely on the fact that they are 
receiving all the headers. So filtering them arbitrarily violates the HTTP 
standard -- while the whole purpose of `urllib` is to conform to it (or it 
would not be able to reliably talk to HTTP servers).

So, your suggestion is a disaster rather than improvement.

--

___
Python tracker 

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



[issue33650] Prohibit adding a signal handler for SIGCHLD

2018-06-01 Thread Ned Deily


Change by Ned Deily :


--
nosy: +gregory.p.smith

___
Python tracker 

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



[issue33660] pathlib.Path.resolve() returns path with double slash when resolving a relative path in root directory

2018-06-01 Thread Andres Ayala


Andres Ayala  added the comment:

Script to reproduce:

import os
import pathlib

# Change to the Root directory
os.chdir('/')

# Create a relative path object.
p = pathlib.Path('spam')
print(p.resolve())


Expected output:
/span

Incorrect output
//span

--
Added file: https://bugs.python.org/file47630/plbug.py

___
Python tracker 

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



[issue33737] Multiprocessing not working

2018-06-01 Thread Ned Deily


Ned Deily  added the comment:

Puneet, sorry but this bug tracker is for reporting issues found with the 
Python language and its implementation, not for help with programming problems. 
 Please see the Help page on python.org for suggestions on getting help:

https://www.python.org/about/help/

--
nosy: +ned.deily
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



[issue33737] Multiprocessing not working

2018-06-01 Thread Puneet Singh


Puneet Singh  added the comment:

Can anyone help me in solving this problem ??

--
Added file: https://bugs.python.org/file47629/Prog.py

___
Python tracker 

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



[issue33738] PyIndex_Check conflicts with PEP 384

2018-06-01 Thread Ned Deily


Ned Deily  added the comment:

This is not a security issue so a change would not be applicable to the 3.4 or 
3.5 branches, currently in security-fix-only mode.

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



[issue33719] Test failures on Python 3.7 beta 5 and Windows 10

2018-06-01 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

I ran py -3.7 -m test -j11 -uall
I saw test_marshal fail with fatal exception.
I saw test_tools and test_site fail as below.

C:\Users\Terry>py -3.7 -X utf8 -m test  test_pkg
0:00:00 [1/1] test_pkg
1 test OK.

 test_tools failed -- running: test_io (103 sec), test_largefile (100 sec), 
test_multiprocessing_spawn (88 sec), test_mmap (91 sec), test_tokenize (43 sec)
Usage: 2to3 [options] file|dir ...

regrtest.py: error: no such option: --slaveargs
test test_tools failed -- Traceback (most recent call last):
  File "C:\Programs\Python37\lib\optparse.py", line 1387, in parse_args
stop = self._process_args(largs, rargs, values)
  File "C:\Programs\Python37\lib\optparse.py", line 1427, in _process_args
self._process_long_opt(rargs, values)
  File "C:\Programs\Python37\lib\optparse.py", line 1480, in _process_long_opt
opt = self._match_long_opt(opt)
  File "C:\Programs\Python37\lib\optparse.py", line 1465, in _match_long_opt
return _match_abbrev(opt, self._long_opt)
  File "C:\Programs\Python37\lib\optparse.py", line 1670, in _match_abbrev
raise BadOptionError(s)
optparse.BadOptionError: no such option: --slaveargs

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Programs\Python37\lib\test\test_tools\test_sundry.py", line 36, in 
test_sundry
import_tool(name)
  File "C:\Programs\Python37\lib\test\test_tools\__init__.py", line 21, in 
import_tool
return importlib.import_module(toolname)
  File "C:\Programs\Python37\lib\importlib\__init__.py", line 127, in 
import_module
return _bootstrap._gcd_import(name[level:], package, level)
  File "", line 1006, in _gcd_import
  File "", line 983, in _find_and_load
  File "", line 967, in _find_and_load_unlocked
  File "", line 677, in _load_unlocked
  File "", line 728, in exec_module
  File "", line 219, in _call_with_frames_removed
  File "C:\Programs\Python37\Tools\scripts\2to3.py", line 5, in 
sys.exit(main("lib2to3.fixes"))
  File "C:\Programs\Python37\lib\lib2to3\main.py", line 179, in main
options, args = parser.parse_args(args)
  File "C:\Programs\Python37\lib\optparse.py", line 1389, in parse_args
self.error(str(err))
  File "C:\Programs\Python37\lib\optparse.py", line 1569, in error
self.exit(2, "%s: error: %s\n" % (self.get_prog_name(), msg))
  File "C:\Programs\Python37\lib\optparse.py", line 1559, in exit
sys.exit(status)
SystemExit: 2



test test_site failed -- Traceback (most recent call last):
  File "C:\Programs\Python37\lib\test\test_site.py", line 487, in 
test_startup_imports
self.assertFalse(modules.intersection(collection_mods), stderr)
AssertionError: {'heapq', 'types', 'functools', 'keyword', 'operator', 
'reprlib', 'collections'} is not false : import _frozen_importlib # frozen
import _imp # builtin
import '_thread' # 
import '_warnings' # 
import '_weakref' # 
# installing zipimport hook
import 'zipimport' # 
# installed zipimport hook
import '_frozen_importlib_external' # 
import '_io' # 
import 'marshal' # 
import 'nt' # 
import _thread # previously loaded ('_thread')
import '_thread' # 
import _weakref # previously loaded ('_weakref')
import '_weakref' # 
import 'winreg' # 
# C:\Programs\Python37\lib\encodings\__pycache__\__init__.cpython-37.pyc 
matches C:\Programs\Python37\lib\encodings\__init__.py
# code object from 
'C:\\Programs\\Python37\\lib\\encodings\\__pycache__\\__init__.cpython-37.pyc'
# C:\Programs\Python37\lib\__pycache__\codecs.cpython-37.pyc matches 
C:\Programs\Python37\lib\codecs.py
# code object from 
'C:\\Programs\\Python37\\lib\\__pycache__\\codecs.cpython-37.pyc'
import '_codecs' # 
import 'codecs' # <_frozen_importlib_external.SourceFileLoader object at 
0x0252BCB943C8>
# C:\Programs\Python37\lib\encodings\__pycache__\aliases.cpython-37.pyc matches 
C:\Programs\Python37\lib\encodings\aliases.py
# code object from 
'C:\\Programs\\Python37\\lib\\encodings\\__pycache__\\aliases.cpython-37.pyc'
import 'encodings.aliases' # <_frozen_importlib_external.SourceFileLoader 
object at 0x0252BCBA9EF0>
import 'encodings' # <_frozen_importlib_external.SourceFileLoader object at 
0x0252BCB88710>
# C:\Programs\Python37\lib\encodings\__pycache__\utf_8.cpython-37.pyc matches 
C:\Programs\Python37\lib\encodings\utf_8.py
# code object from 
'C:\\Programs\\Python37\\lib\\encodings\\__pycache__\\utf_8.cpython-37.pyc'
import 'encodings.utf_8' # <_frozen_importlib_external.SourceFileLoader object 
at 0x0252BCBBBF98>
import '_signal' # 
# C:\Programs\Python37\lib\encodings\__pycache__\latin_1.cpython-37.pyc matches 
C:\Programs\Python37\lib\encodings\latin_1.py
# code object from 
'C:\\Programs\\Python37\\lib\\encodings\\__pycache__\\latin_1.cpython-37.pyc'
import 'encodings.latin_1' # <_frozen_importlib_external.SourceFileLoader 
object at 0x0252BCBBD400>
# C:\Programs\Python37\lib\__pycache__\io.cpython-37.pyc matches 
C:\Programs\Python37\lib\io.py
# code object 

[issue32519] venv API docs - symlinks default incorrect

2018-06-01 Thread Vinay Sajip


Vinay Sajip  added the comment:


New changeset 1df877caad584135263ef94d83a28251e162e643 by Vinay Sajip (Miss 
Islington (bot)) in branch '3.6':
bpo-32519: Removed misleading sentence from EnvBuilder documentation. (GH-7296) 
(GH-7299)
https://github.com/python/cpython/commit/1df877caad584135263ef94d83a28251e162e643


--

___
Python tracker 

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



[issue32519] venv API docs - symlinks default incorrect

2018-06-01 Thread Vinay Sajip


Vinay Sajip  added the comment:


New changeset 283e12f91db1a5290f2ddbddee406797fec39d2e by Vinay Sajip (Miss 
Islington (bot)) in branch '3.7':
bpo-32519: Removed misleading sentence from EnvBuilder documentation. (GH-7296) 
(#7300)
https://github.com/python/cpython/commit/283e12f91db1a5290f2ddbddee406797fec39d2e


--

___
Python tracker 

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



[issue33400] logging.Formatter does not default to ISO8601 date format

2018-06-01 Thread Vinay Sajip


Vinay Sajip  added the comment:


New changeset 461ad598d12eba7754181402e00bb7cfc7f1d9cf by Vinay Sajip (Miss 
Islington (bot)) in branch '3.6':
bpo-33400: Removed references to RFC3339 and ISO8601 from the logging 
documentation. (GH-7297) (GH-7303)
https://github.com/python/cpython/commit/461ad598d12eba7754181402e00bb7cfc7f1d9cf


--

___
Python tracker 

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



[issue33400] logging.Formatter does not default to ISO8601 date format

2018-06-01 Thread Vinay Sajip


Vinay Sajip  added the comment:


New changeset 4b6691e40f004bf3a08b1843620f5f6028d2b79d by Vinay Sajip (Miss 
Islington (bot)) in branch '3.7':
bpo-33400: Removed references to RFC3339 and ISO8601 from the logging 
documentation. (GH-7297) (GH-7302)
https://github.com/python/cpython/commit/4b6691e40f004bf3a08b1843620f5f6028d2b79d


--

___
Python tracker 

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



[issue33724] test__xxsubinterpreters failed on ARMv7 Ubuntu 3.x

2018-06-01 Thread Eric Snow


Eric Snow  added the comment:

Okay, apparently this is only happening on 2 of the buildbots from bpo-33615:

ARMv7 Ubuntu 3.x
PPC64 AIX 3.x

Judging by the failures I'm guessing that it's something related to handling of 
int64_t.  I'm looking into it.

--
assignee:  -> eric.snow

___
Python tracker 

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



[issue33720] test_marshal: crash in Python 3.7b5 on Windows 10

2018-06-01 Thread Steve Dower


Steve Dower  added the comment:

FYI, I posted the problem at 
https://developercommunity.visualstudio.com/content/problem/265778/pgo-generates-large-stack-frame.html
 (I _think_ it's public).

Until then, it's probably best to reduce the recursion limit. Going to a depth 
of 1000 seems okay, and it certainly seems less bad than disabling 
optimisations.

--

___
Python tracker 

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



[issue33532] test_multiprocessing_forkserver: TestIgnoreEINTR.test_ignore() fails on Travis CI

2018-06-01 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 64e538bc703e423a04ab435c4eab6b950b8aef7e by Victor Stinner in 
branch '3.6':
bpo-33532: Fix test_multiprocessing_forkserver.test_ignore() (GH-7322)
https://github.com/python/cpython/commit/64e538bc703e423a04ab435c4eab6b950b8aef7e


--

___
Python tracker 

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



[issue33718] Enhance regrtest: meta-ticket for multiple changes

2018-06-01 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 137e80346ff65ad917f733d9b077e530a4797ec5 by Victor Stinner in 
branch '3.6':
bpo-33718: Update regrtest from master (GH-7325)
https://github.com/python/cpython/commit/137e80346ff65ad917f733d9b077e530a4797ec5


--

___
Python tracker 

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



[issue31238] pydoc: ServerThread.stop() leaves a dangling thread

2018-06-01 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset f3297433e309e9591eaa3f36e1d7887e9d0620d7 by Victor Stinner in 
branch '3.6':
bpo-31238: pydoc ServerThread.stop() now joins itself (GH-3151) (GH-7324)
https://github.com/python/cpython/commit/f3297433e309e9591eaa3f36e1d7887e9d0620d7


--

___
Python tracker 

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



[issue33532] test_multiprocessing_forkserver: TestIgnoreEINTR.test_ignore() fails on Travis CI

2018-06-01 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 1d4be0a65f66c2eecefb8b8bd4d115a82fa61067 by Victor Stinner in 
branch '2.7':
bpo-33532: Fix test_multiprocessing_forkserver.test_ignore() (GH-7323)
https://github.com/python/cpython/commit/1d4be0a65f66c2eecefb8b8bd4d115a82fa61067


--

___
Python tracker 

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



[issue20886] Disabling logging to ~/.python_history is not simple enough

2018-06-01 Thread Jesse Paul Ogle


Jesse Paul Ogle  added the comment:

Greetings, I came across this issue while looking into XDG Base Directory 
Specification. This issue is only tagged with version 3.4, but the underlying 
issue (not being able to change the history file / size through environment 
variables) appears to still exist in the definiton of enablerlcompleter() in 
Lib/site.py for master. I may be wrong about that.

Tag 3.4:
https://github.com/python/cpython/blob/3.4/Lib/site.py#L423

Tag 3.7.0b5 (latest as of writing)
https://github.com/python/cpython/blob/v3.7.0b5/Lib/site.py#L436


This seems to me like a fairly straight forward fix. I made the change by 
copying enablercompleter() to a startup.py file and changing that line to the 
following:

if 'PYTHONHISTFILE' in os.environ:
history = os.path.expanduser(os.environ['PYTHONHISTFILE'])
elif 'XDG_DATA_HOME' in os.environ:
history = 
os.path.join(os.path.expanduser(os.environ['XDG_DATA_HOME']),
   'python', 'python_history')
else:
history = os.path.join(os.path.expanduser('~'),
   '.python_history')

history = os.path.abspath(history)
_dir, _ = os.path.split(history)
os.makedirs(_dir, exist_ok=True)

This enables specifying the history file via PYTHONHISTFILE or using 
XDG_DATA_HOME. XDG_DATA_HOME is convenient but not necessary as PYTHONHISTFILE 
would at least provide a work around. One could disable logging by setting 
PYTHONHISTFILE=/dev/null or whatever it is on Windows.

I apologize for not providing a patch but I have literally no idea where to 
start for that. I assume addition of environment variables requires iterating 
on the mailing list first?

--
nosy: +jesse.p.ogle

___
Python tracker 

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



[issue33738] PyIndex_Check conflicts with PEP 384

2018-06-01 Thread Christian Tismer


Change by Christian Tismer :


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

___
Python tracker 

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



[issue33738] PyIndex_Check conflicts with PEP 384

2018-06-01 Thread Ned Deily


Change by Ned Deily :


--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue33665] tkinter.ttk.Scrollbar.fraction() is inaccurate, or at least inconsistent compared to the non ttk version

2018-06-01 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Please post the code you used to test this.

--
nosy: +serhiy.storchaka, terry.reedy
stage:  -> needs patch
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



[issue33738] PyIndex_Check conflicts with PEP 384

2018-06-01 Thread Christian Tismer


New submission from Christian Tismer :

The file number.rst on python 3.6 says

"""
.. c:function:: int PyIndex_Check(PyObject *o)

   Returns ``1`` if *o* is an index integer (has the nb_index slot of the
   tp_as_number structure filled in), and ``0`` otherwise.
"""

But in reality, this is a macro:

"""
#define PyIndex_Check(obj) \
   ((obj)->ob_type->tp_as_number != NULL && \
(obj)->ob_type->tp_as_number->nb_index != NULL)
"""

But such a macro does not work with the limited API, since
non-heaptypes cannot use PyType_GetSlot.

The patch is trivial: Define the function instead of the macro
when Py_LIMITED_API is set.

I also think the documentation makes more sense when it is correct.

--
components: Extension Modules
messages: 318436
nosy: Christian.Tismer, larry, ned.deily
priority: release blocker
severity: normal
status: open
title: PyIndex_Check conflicts with PEP 384
type: compile error
versions: Python 3.4, Python 3.5, Python 3.6, Python 3.7

___
Python tracker 

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



[issue27071] unittest.TestCase.assertCountEqual is a very misleading name

2018-06-01 Thread Alden


Alden  added the comment:

I think we need to re-open this issue.  I have done a poll of a number of 
python developers and every developer I talked to said they initially thought 
this function "assertCountEqual" asserts that the count is equal. Probably 
because that's exactly what the words mean. I think most people in this 
discussion agree that the name is not ideal, but how did we end up picking one 
that explicitly says something completely incorrect?  Not only that but we 
broke backward compatibility for a name that is significantly worse than the 
original.

If you asked any colleague or developer on the street that isn't a python 3 
user what "assert count equal" would do when provided with two lists. I would 
be amazed if anyone said something other than "checks that the two lists store 
the same number of elements".  I have asked everyone I know and no one has said 
anything different.

assertItemsEqual - Most people get this correct, some people think it also 
checks order. This confusion actually isn't that common because people first 
learn the function that DOES check order. (better)

assertFrequencyCountsEqual - Most people aren't sure what this does and would 
be need to look this up. (better)

assertElementCountsEqual - Seems like it checks the count of a list, but leaves 
you with some uncertainty. (not great, but better)

assertCountEqual and assertCountsEqual - Everyone i spoke to thought this 
asserted that number of elements in the collections were equal. Total certainty 
about the wrong functionality.


Explicit is better than implicit.
  * This name is not explicit it implies a completely different behavior.
Readability counts.
  * The words of this function literally mean something else.
Practicality beats purity.
  * Users not in the Python ivory tower immediately recognize this function 
name as something else. 
In the face of ambiguity, refuse the temptation to guess.
  * This name is not just ambiguous it is misleading and makes users guess and 
guess incorrectly.
If the implementation is hard to explain, it's a bad idea.
  * If we can't name this function correctly, maybe it's a bad idea?
Now is better than never.
  * This was a mistake and its better to correct it now than let it live on for 
another two years.

--
nosy: +aldencolerain

___
Python tracker 

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



[issue29788] [Security] tarfile: Add absolute_path option to tarfile, disabled by default

2018-06-01 Thread Jakub Wilk


Change by Jakub Wilk :


--
nosy: +jwilk

___
Python tracker 

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



[issue17102] tarfile extract can write files outside the destination path

2018-06-01 Thread Jakub Wilk


Change by Jakub Wilk :


--
nosy: +jwilk

___
Python tracker 

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



[issue33737] Multiprocessing not working

2018-06-01 Thread Puneet Singh


New submission from Puneet Singh :

I have attached a sampl program for my project.can anyone help e to solve this 
multiprocessing problem.I have applied all the tpes of multiprocessing ( 
map,map_async, starmap, starmap_async, aplly_async) but the result is same that 
CPU utilisation is one core instead it had to use all of them.

The picture for cpu utilisation an be found in github account:- 
https://github.com/joddiy/multiprocess/issues/1

--
components: Library (Lib)
messages: 318433
nosy: Puneet Singh, docs@python
priority: normal
severity: normal
status: open
title: Multiprocessing not working
type: performance
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



[issue33660] pathlib.Path.resolve() returns path with double slash when resolving a relative path in root directory

2018-06-01 Thread Terry J. Reedy


Change by Terry J. Reedy :


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



[issue33661] urllib may leak sensitive HTTP headers to a third-party web site

2018-06-01 Thread Jakub Wilk


Change by Jakub Wilk :


--
nosy: +jwilk

___
Python tracker 

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



[issue33701] test_datetime crashed (SIGSEGV) on Travis CI

2018-06-01 Thread Alexander Belopolsky


Change by Alexander Belopolsky :


--
nosy: +belopolsky

___
Python tracker 

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



[issue33721] os.path.exists() ought to return False if pathname contains NUL

2018-06-01 Thread Eric V. Smith


Eric V. Smith  added the comment:

I don't know of any OS that supports NULs in filenames (not that my knowledge 
is encyclopedic).

My reason for suggesting we document it is that os.path.exists() returns False 
for otherwise invalid filenames, where something like open() raises. On Windows:

>>> os.path.exists('c::bar')
False

>>> open('c::bar')
Traceback (most recent call last):
  File "", line 1, in 
OSError: [Errno 22] Invalid argument: 'c::bar'

So I do think it's a little surprising that os.path.exists() would raise with a 
NUL, instead of returning False. But I don't think it's worth changing the 
behavior, due to potential (though unlikely) breakage.

--

___
Python tracker 

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



[issue33649] asyncio docs overhaul

2018-06-01 Thread Alexander Belopolsky


Change by Alexander Belopolsky :


--
nosy: +belopolsky

___
Python tracker 

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



[issue33721] os.path.exists() ought to return False if pathname contains NUL

2018-06-01 Thread R. David Murray


R. David Murray  added the comment:

I seem to recall that this ValueError behavior was discussed at some length and 
it is the desired behavior.  (At some previous point I think everything after 
the NUL was ignored.)  I'm not really sure why it needs to be documented 
either, NULs are invalid in filenames, aren't they?  Or are there some OSes 
that allow them?

--
nosy: +r.david.murray

___
Python tracker 

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



[issue33734] asyncio/ssl: Fix AttributeError, increase default handshake timeout

2018-06-01 Thread Yury Selivanov

Yury Selivanov  added the comment:

> What was the effective timeout before? Depending on the old value, 60s could 
> be excessive for clients and might lead to self-DoS on the client side…

Previous timeout was effectively infinite.

--

___
Python tracker 

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



[issue33734] asyncio/ssl: Fix AttributeError, increase default handshake timeout

2018-06-01 Thread Hynek Schlawack

Hynek Schlawack  added the comment:

For some context: 10s seems to be more common than I liked to believe (seems 
like Go's http client uses it by default too).

Nevertheless I ran into the 10s after updating uvloop and stopped being able to 
connect to a server in India. Therefore I'd consider 10s at least a regression 
that should be fixed.

What was the effective timeout before? Depending on the old value, 60s could be 
excessive for clients and might lead to self-DoS on the client side…

P.S. I tried to reply on my phone and now I fully support Mariatta’s proposal 
of moving to GitHub issues.

--

___
Python tracker 

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



[issue33736] Improve the documentation of asyncio stream API

2018-06-01 Thread Elvis Pranskevichus


Change by Elvis Pranskevichus :


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

___
Python tracker 

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



[issue33736] Improve the documentation of asyncio stream API

2018-06-01 Thread Elvis Pranskevichus


Change by Elvis Pranskevichus :


--
assignee: docs@python
components: Documentation
nosy: Elvis.Pranskevichus, docs@python
priority: normal
severity: normal
status: open
title: Improve the documentation of asyncio stream API
type: enhancement
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



[issue33718] Enhance regrtest: meta-ticket for multiple changes

2018-06-01 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +6954

___
Python tracker 

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



[issue31238] pydoc: ServerThread.stop() leaves a dangling thread

2018-06-01 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +6953

___
Python tracker 

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



[issue33733] Add utilities to get/set pipe and socket buffer sizes?

2018-06-01 Thread Nathaniel Smith


Nathaniel Smith  added the comment:

Note that in my experience, socket systems treat the buffer sizes as more 
like... rough guidelines. Especially Windows and Linux. Which doesn't mean 
they're not useful to expose somehow, but you can't assume that just because 
you set the buffer to size X means that operations will start blocking after X 
bytes. When trio's tests need a clogged socket, we just keep sending in a loop 
until we observe a BlockingIOError, and then do the test.

Pipe buffers are much more reasonably behaved IME.

--

___
Python tracker 

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



[issue33735] test_multiprocessing_spawn leaked [1, 2, 1] memory blocks on AMD64 Windows8.1 Refleaks 3.7

2018-06-01 Thread STINNER Victor


STINNER Victor  added the comment:

When running "python -m test -R 2:3 test_multiprocessing_forkserver" on 
Windows, I saw some warnings about dangling threads. It may explain this issue.

--

___
Python tracker 

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



[issue33532] test_multiprocessing_forkserver: TestIgnoreEINTR.test_ignore() fails on Travis CI

2018-06-01 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +6952

___
Python tracker 

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



[issue33532] test_multiprocessing_forkserver: TestIgnoreEINTR.test_ignore() fails on Travis CI

2018-06-01 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +6951

___
Python tracker 

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



[issue33532] test_multiprocessing_forkserver: TestIgnoreEINTR.test_ignore() fails on Travis CI

2018-06-01 Thread miss-islington


miss-islington  added the comment:


New changeset 63fa8db58c349f985d75139e6545cfddf067c07b by Miss Islington (bot) 
in branch '3.7':
bpo-33532: Fix test_multiprocessing_forkserver.test_ignore() (GH-7319)
https://github.com/python/cpython/commit/63fa8db58c349f985d75139e6545cfddf067c07b


--

___
Python tracker 

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



[issue33735] test_multiprocessing_spawn leaked [1, 2, 1] memory blocks on AMD64 Windows8.1 Refleaks 3.7

2018-06-01 Thread STINNER Victor


New submission from STINNER Victor :

http://buildbot.python.org/all/#/builders/132/builds/154

test_multiprocessing_spawn leaked [1, 2, 1] memory blocks, sum=4

--
components: Tests, Windows
messages: 318425
nosy: paul.moore, steve.dower, tim.golden, vstinner, zach.ware
priority: normal
severity: normal
status: open
title: test_multiprocessing_spawn leaked [1, 2, 1] memory blocks on AMD64 
Windows8.1 Refleaks 3.7
type: resource usage
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



[issue33734] asyncio/ssl: Fix AttributeError, increase default handshake timeout

2018-06-01 Thread Yury Selivanov


Change by Yury Selivanov :


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

___
Python tracker 

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



[issue33694] test_asyncio: test_start_tls_server_1() fails on Python on x86 Windows7 3.7 and 3.x

2018-06-01 Thread STINNER Victor


STINNER Victor  added the comment:

The test also failed on AMD64 Windows8.1 Refleaks 3.7. This buildbot is also 
very slow because it runs reference leak hunting. It confirms that the 
remaining issue is a race condition which is only seen when the system becomes 
slow.

http://buildbot.python.org/all/#/builders/132/builds/154

==
ERROR: test_start_tls_server_1 
(test.test_asyncio.test_sslproto.ProactorStartTLSTests)
--
Traceback (most recent call last):
  File 
"D:\buildarea\3.7.ware-win81-release.refleak\build\lib\test\test_asyncio\test_sslproto.py",
 line 467, in test_start_tls_server_1
self.loop.run_until_complete(run_main())
  File 
"D:\buildarea\3.7.ware-win81-release.refleak\build\lib\asyncio\base_events.py", 
line 566, in run_until_complete
raise RuntimeError('Event loop stopped before Future completed.')
RuntimeError: Event loop stopped before Future completed.

==
FAIL: test_start_tls_server_1 
(test.test_asyncio.test_sslproto.ProactorStartTLSTests)
--
Traceback (most recent call last):
  File 
"D:\buildarea\3.7.ware-win81-release.refleak\build\lib\test\test_asyncio\functional.py",
 line 42, in tearDown
self.fail('unexpected calls to loop.call_exception_handler()')
AssertionError: unexpected calls to loop.call_exception_handler()

--

___
Python tracker 

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



[issue33734] asyncio/ssl: Fix AttributeError, increase default handshake timeout

2018-06-01 Thread Yury Selivanov


Yury Selivanov  added the comment:

For the reference, we added SSL handshake timeout a while ago in bpo-29970.

--

___
Python tracker 

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



[issue33734] asyncio/ssl: Fix AttributeError, increase default handshake timeout

2018-06-01 Thread Yury Selivanov


New submission from Yury Selivanov :

I've ported asyncio's sslproto.py to uvloop and released a new major version of 
it yesterday.  Hynek discovered that the default SSL handshake timeout (10 
seconds currently) is too low, and that there's a critical code path that is 
broken because it assumes all SSL exceptions have an 'errno' attribute.

The PR changes the default SSL handshake timeout to 60 seconds (as in nginx 
[1]) and fixes the AttributeError.

IMO this should go into 3.7.0rc1.


[1] 
https://docs.nginx.com/nginx/admin-guide/security-controls/terminating-ssl-tcp/#speeding-up-secure-tcp-connections

--
assignee: yselivanov
components: asyncio
messages: 318422
nosy: asvetlov, hynek, ned.deily, yselivanov
priority: release blocker
severity: normal
status: open
title: asyncio/ssl: Fix AttributeError, increase default handshake timeout
type: behavior
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



[issue33532] test_multiprocessing_forkserver: TestIgnoreEINTR.test_ignore() fails on Travis CI

2018-06-01 Thread STINNER Victor


STINNER Victor  added the comment:

I modified test_ignore() to use support.SOCK_MAX_SIZE, but honestly, I'm not 
convinced that it will be the issue. I applied my change anyway, just to check 
if the issue comes from the size, or if it's something else.

--

___
Python tracker 

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



  1   2   >