[issue36552] Replace OverflowError with ValueError when calculating length of range objects > PY_SIZE_MAX

2019-05-08 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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



[issue36778] test_site.StartupImportTests.test_startup_imports fails if default code page is cp65001

2019-05-08 Thread Inada Naoki


Inada Naoki  added the comment:

@Eryk I didn't say new Terminal will cause this issue.  I know ConsoeIO too.

I just meant Microsoft use cp65001 more widely for better UTF-8 support 
nowadays.
So I want to make cp65001 as alias of UTF-8.


> Python could similarly special case CP_UTF8 as "utf-8" in 
> _locale._getdefaultlocale.

I like this idea too.

--

___
Python tracker 

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



[issue31033] Add argument to .cancel() of Task and Future

2019-05-08 Thread Alexander Mohr


Alexander Mohr  added the comment:

@yselivanov even better :)

--

___
Python tracker 

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



[issue36831] ElementTree.find attribute matching with empty namespace

2019-05-08 Thread Stefan Behnel


Change by Stefan Behnel :


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



[issue36831] ElementTree.find attribute matching with empty namespace

2019-05-08 Thread Stefan Behnel


Stefan Behnel  added the comment:

Sorry for the annoyance during the release.

--
keywords:  -patch
resolution:  -> fixed
stage: patch review -> needs patch
status: open -> closed

___
Python tracker 

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



[issue36831] ElementTree.find attribute matching with empty namespace

2019-05-08 Thread Stefan Behnel


Stefan Behnel  added the comment:


New changeset 88db8bd0648588c67eeab16d0bc72ec5c206e3ad by Stefan Behnel in 
branch 'master':
bpo-36831: Do not apply default namespace to unprefixed attributes in 
ElementPath. (#13201)
https://github.com/python/cpython/commit/88db8bd0648588c67eeab16d0bc72ec5c206e3ad


--

___
Python tracker 

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



[issue30271] Make sqlite3 statement cache optional

2019-05-08 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

> I do believe we should allow the user to disable the cache.

Why?

--
nosy: +rhettinger

___
Python tracker 

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



[issue35668] Improve test coverage for idlelib

2019-05-08 Thread anthony shaw


Change by anthony shaw :


--
nosy: +anthonypjshaw

___
Python tracker 

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



[issue36500] Add "regen-*" equivalent projects for Windows builds

2019-05-08 Thread anthony shaw


Change by anthony shaw :


--
assignee:  -> anthonypjshaw
nosy: +anthonypjshaw

___
Python tracker 

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



[issue36551] Optimize list comprehensions with preallocate size and protect against overflow

2019-05-08 Thread anthony shaw


Change by anthony shaw :


--
assignee:  -> anthonypjshaw
nosy: +anthonypjshaw

___
Python tracker 

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



[issue36552] Replace OverflowError with ValueError when calculating length of range objects > PY_SIZE_MAX

2019-05-08 Thread anthony shaw


Change by anthony shaw :


--
assignee:  -> anthonypjshaw
nosy: +anthonypjshaw

___
Python tracker 

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



[issue36859] sqlite3 dml statement detection does not account for CTEs

2019-05-08 Thread Charles


Change by Charles :


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

___
Python tracker 

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



[issue36862] Add Visual Studio 2019 support to PCBuild/env.bat

2019-05-08 Thread anthony shaw


Change by anthony shaw :


--
nosy: +steve.dower
stage: patch review -> 

___
Python tracker 

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



[issue36862] Add Visual Studio 2019 support to PCBuild/env.bat

2019-05-08 Thread anthony shaw


Change by anthony shaw :


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

___
Python tracker 

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



[issue36862] Add Visual Studio 2019 support to PCBuild/env.bat

2019-05-08 Thread anthony shaw


New submission from anthony shaw :

The PCBuild tool should support VS2019 but default to 2017 as per documentation.
PR to follow.

--
assignee: anthonypjshaw
components: Build
messages: 341963
nosy: anthonypjshaw
priority: normal
severity: normal
status: open
title: Add Visual Studio 2019 support to PCBuild/env.bat
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



[issue36859] sqlite3 dml statement detection does not account for CTEs

2019-05-08 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

CPython now accepts PRs on GitHub. Please try raising a PR as per devuguide : 
https://devguide.python.org/

--
nosy: +berker.peksag, xtreak
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



[issue36859] sqlite3 dml statement detection does not account for CTEs

2019-05-08 Thread Charles


Charles  added the comment:

I've got a patch working now that:

- retains complete backwards-compatibility for DDL (as well as BEGIN 
EXCLUSIVE/IMMEDIATE) -- tests are passing locally.
- retains previous behavior for old sqlite that do not have the 
sqlite3_stmt_readonly API.

I think this should be good-to-go and I've in fact merged a similar patch on my 
own standalone pysqlite3 package.

Also I will add that the little 'test script' I provided is working as-expected 
with this patch applied.

--
Added file: https://bugs.python.org/file48320/36859-2.patch

___
Python tracker 

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



[issue36861] Update to Unicode 12.1.0

2019-05-08 Thread Benjamin Peterson


Benjamin Peterson  added the comment:


New changeset 3aca40d3cb4b9b6741cf3073d71fbfc682cab96d by Benjamin Peterson in 
branch 'master':
closes bpo-36861: Update Unicode database to 12.1.0. (GH-13214)
https://github.com/python/cpython/commit/3aca40d3cb4b9b6741cf3073d71fbfc682cab96d


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



[issue36861] Update to Unicode 12.1.0

2019-05-08 Thread Benjamin Peterson


Change by Benjamin Peterson :


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

___
Python tracker 

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



[issue36620] Documentation missing parameter for Itertools.zip_longest

2019-05-08 Thread Ying Wang


Ying Wang  added the comment:

@rhettinger should this issue be closed if no action is to be taken? If so, 
should I manually close the pull request referencing this issue, or will that 
be automatically handled by the Python bug tracker?

--

___
Python tracker 

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



[issue36859] sqlite3 dml statement detection does not account for CTEs

2019-05-08 Thread Charles


Charles  added the comment:

Oh, one more thing that is actually quite important -- since BEGIN IMMEDIATE 
and BEGIN EXCLUSIVE "modify" the database, these statements (intended to begin 
a transaction) are treated as "is_dml" when using the sqlite3_stmt_readonly API.

--

___
Python tracker 

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



[issue36620] Documentation missing parameter for Itertools.zip_longest

2019-05-08 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Sorry, I don't want to do this in the summary table.  The goal of the table is 
to provide a minimal overview to help select the appropriate itertool and to 
provide a fast link to the details given below.

--
assignee: Mariatta -> rhettinger

___
Python tracker 

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



[issue36778] test_site.StartupImportTests.test_startup_imports fails if default code page is cp65001

2019-05-08 Thread Eryk Sun


Eryk Sun  added the comment:

> FYI, I expect cp65001 will be used more widely in near future,
[...]
> It seems use `SetConsoleOutputCP(65001)` and `SetConsoleCP(65001)`.

Unless PYTHONLEGACYWINDOWSSTDIO is defined, Python 3.6+ doesn't use the 
console's codepage-based interface (except for low-level os.read and os.write). 
Console files uses the wide-character console API internally, and have a 
"utf-8" encoding. "cp65001" isn't a factor in this context.

This issue probably occurs due to the encoding returned by 
locale.getpreferredencoding(). This calls _locale._getdefaultlocale, which 
returns a tuple that mixes the user locale with the system ANSI codepage. For 
example, with ANSI set to UTF-8 (Windows 10):

>>> _locale._getdefaultlocale()
('en_GB', 'cp65001')

The Universal CRT special cases CP_UTF8 (codepage 65001) as "utf8" and accepts 
"utf-8" as an alias. For example, after setting the ANSI codepage to UTF-8:

>>> locale.setlocale(locale.LC_CTYPE, '')
'English_United Kingdom.utf8'

Python could similarly special case CP_UTF8 as "utf-8" in 
_locale._getdefaultlocale.

--

___
Python tracker 

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



[issue36859] sqlite3 dml statement detection does not account for CTEs

2019-05-08 Thread Charles


Charles  added the comment:

Sqlite since 3.7.11 provides sqlite3_stmt_readonly() API for determining if a 
prepared statement will affect the database. I made the change, removing the 
SQL scanning code and replacing it with:

self->is_dml = !sqlite3_stmt_readonly(self->st);

But then I see a number of test failures, mostly related to the fact that 
table-creation is now treated as "is_dml" with the above change.

I don't know if the above API is going to be a workable path forward, since it 
seems like DML statements *not* automatically starting a transaction is a 
behavior a lot of people may have come to depend on (whether or not it is 
correct).

I've attached a patch just-in-case anyone's interested.

--
keywords: +patch
Added file: https://bugs.python.org/file48319/36859.patch

___
Python tracker 

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



[issue36861] Update to Unicode 12.1.0

2019-05-08 Thread Benjamin Peterson


New submission from Benjamin Peterson :

A minor release of Unicode 12 has been issued to pick up the Reiwa ligature: 
http://blog.unicode.org/2019/05/unicode-12-1-en.html

We're already using Unicode 12.0.0, so this is will be a very minor upgrade.

--
assignee: benjamin.peterson
messages: 341954
nosy: benjamin.peterson
priority: normal
severity: normal
status: open
title: Update to Unicode 12.1.0

___
Python tracker 

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



[issue36860] Inconsistent/Undocumented behavior with pathlib resolve and absolute on Windows

2019-05-08 Thread Alex


New submission from Alex :

Maybe I am doing something wrong here but:

On Windows 10:
> python --version
Python 3.7.1
> python 
>>> from pathlib import Path
>>> Path("test.py").resolve()
WindowsPath('test.py')
>>> Path("test.py").absolute()  # this is undocumented in 
>>> https://docs.python.org/3.7/library/pathlib.html
WindowsPath('C:/Users/Name/Desktop/test.py')

On Ubuntu 18.04 LTS:
$ python3.7 --version
Python 3.7.3
$ python3.7
>>> from pathlib import Path
>>> Path("test.py").resolve()
PosixPath('/home/name/test.py')
>>> Path("test.py").absolute()  # same as above undocumented
PosixPath('/home/name/test.py')

Why in Windows does this fail, but not Linux? Why is .absolute() undocumented? 
I've looked around trying to figure out what the intended behavior is but there 
is conflicting information.

Resolve seems to not work correctly on Windows. Bug?

--
components: Library (Lib), Windows
messages: 341953
nosy: alexjacobson95, eryksun, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Inconsistent/Undocumented behavior with pathlib resolve and absolute on 
Windows
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



[issue24263] unittest cannot load module whose name starts with Unicode

2019-05-08 Thread anthony shaw


anthony shaw  added the comment:

thanks, will wait for a review from Serhiy, Rbcollins or ezio

--

___
Python tracker 

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



[issue12188] PEP 7 (or guide) add C style policies and explanation

2019-05-08 Thread anthony shaw


anthony shaw  added the comment:

Hi,

This discussion came to a stop, but it doesn't seem conclusive.

PEP discussions are now in GitHub on https://github.com/python/peps/issues so 
I'm going to close this BPO issue.

There is no additional section in PEP 7 for this level of detail, there is also 
no tooling in place (afaik) to retroactively apply or inspect these types of 
issues, so this would need to be discussed in the PEP issue,

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



[issue36832] Port zipp to zipfile

2019-05-08 Thread Jason R. Coombs


Change by Jason R. Coombs :


--
pull_requests: +13124

___
Python tracker 

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



[issue36816] self-signed.pythontest.net TLS certificate key is too weak

2019-05-08 Thread Gregory P. Smith


Gregory P. Smith  added the comment:


New changeset 7b5dca8345f4a909367836a3a2c3c7ac6e4e2c0c by Gregory P. Smith in 
branch '2.7':
[2.7] bpo-36816: Update the self-signed.pythontest.net cert (GH-13192) 
(GH-13199)
https://github.com/python/cpython/commit/7b5dca8345f4a909367836a3a2c3c7ac6e4e2c0c


--

___
Python tracker 

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



[issue24538] os.setxattr PermissionError on panfs propagates up causing `copystat`, `copytree`, and `pip install .` to fail unhepfully

2019-05-08 Thread Roundup Robot


Change by Roundup Robot :


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

___
Python tracker 

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



[issue36859] sqlite3 dml statement detection does not account for CTEs

2019-05-08 Thread Charles


New submission from Charles :

In statement.c, there is some logic which detects whether or not an incoming 
statement is a DML-type. The logic, as of 2019-05-08, I am referring to is 
here: 
https://github.com/python/cpython/blob/fc662ac332443a316a120fa5287c235dc4f8739b/Modules/_sqlite/statement.c#L78-L93

To demonstrate the bug:

import sqlite3

conn = sqlite3.connect(':memory:')

conn.execute('create table kv ("key" text primary key, "value" integer)')
conn.execute('insert into kv (key, value) values (?, ?), (?, ?)',
 ('k1', 1, 'k2', 2))

assert conn.in_transaction  # Yes we are in a transaction.
conn.commit()
assert not conn.in_transaction  # Not anymore, as expected.

rc = conn.execute(
'with c(k, v) as (select key, value + 10 from kv) '
'update kv set value=(select v from c where k=kv.key)')

print(rc.rowcount)  # Should be 2, prints "-1".
#assert conn.in_transaction  # !!! Fails.

curs = conn.execute('select * from kv order by key;')
print(curs.fetchall())  # [('k1', 11), ('k2', 12)]

--
components: Library (Lib)
messages: 341949
nosy: coleifer
priority: normal
severity: normal
status: open
title: sqlite3 dml statement detection does not account for CTEs
type: behavior

___
Python tracker 

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



[issue36789] Unicode HOWTO incorrectly states that UTF-8 contains no zero bytes

2019-05-08 Thread mbiggs


mbiggs  added the comment:

Ah sent a pull request but didn't realize that redshiftzero already had.  Their 
PR looks good to me.

Thanks for fixing this!

--

___
Python tracker 

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



[issue36778] test_site.StartupImportTests.test_startup_imports fails if default code page is cp65001

2019-05-08 Thread Paul Monson


Paul Monson  added the comment:

Removing import functools from cp65001.py fixes test_startup_imports.

Victor proposed this PR: https://github.com/python/cpython/pull/13110
but new test_codecs fails because it's passing self on to the lambda I think.

I tried to build on Victor's change but there is still one test failure I 
haven't tracked down yet: https://github.com/python/cpython/pull/13211

FAIL: test_incremental_surrogatepass (test.test_codecs.CP65001Test)
--
Traceback (most recent call last):
  File "C:\master\pythond\lib\test\test_codecs.py", line 436, in 
test_incremental_surrogatepass
self.assertEqual(dec.decode(data[i:], True), '\uD901')
AssertionError: '' != '\ud901'
+ \ud901

--

___
Python tracker 

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



[issue36816] self-signed.pythontest.net TLS certificate key is too weak

2019-05-08 Thread miss-islington


miss-islington  added the comment:


New changeset 6daaf3f7de78eec2c80eaa8e94e4cca54f758a30 by Miss Islington (bot) 
(Gregory P. Smith) in branch '3.7':
[3.7] bpo-36816: Update the self-signed.pythontest.net cert (GH-13192) 
(GH-13197)
https://github.com/python/cpython/commit/6daaf3f7de78eec2c80eaa8e94e4cca54f758a30


--

___
Python tracker 

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



[issue36778] test_site.StartupImportTests.test_startup_imports fails if default code page is cp65001

2019-05-08 Thread Paul Monson


Change by Paul Monson :


--
pull_requests: +13122

___
Python tracker 

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



[issue35900] Add pickler hook for the user to customize the serialization of user defined functions and types.

2019-05-08 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

Both PRs are now merged.  Thank you Pierre!

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



[issue35900] Add pickler hook for the user to customize the serialization of user defined functions and types.

2019-05-08 Thread Antoine Pitrou


Antoine Pitrou  added the comment:


New changeset 289f1f80ee87a4baf4567a86b3425fb3bf73291d by Antoine Pitrou 
(Pierre Glaser) in branch 'master':
bpo-35900: Enable custom reduction callback registration in _pickle (GH-12499)
https://github.com/python/cpython/commit/289f1f80ee87a4baf4567a86b3425fb3bf73291d


--

___
Python tracker 

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



[issue14353] Proper gettext support in locale module

2019-05-08 Thread Toshio Kuratomi


Toshio Kuratomi  added the comment:

As this problem does not affect Python3 I think it's up to the 2.7 release 
manager to decide if it should be merged.  benjamin, what do you think?  If you 
want it, I'll open a PR on github for it.

--
nosy: +a.badger, benjamin.peterson

___
Python tracker 

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



[issue6981] locale.getdefaultlocale() envvars default code and documentation mismatch

2019-05-08 Thread Toshio Kuratomi


Toshio Kuratomi  added the comment:

Hey doko, I was just looking through the oldest gettext bugs and found this bug 
open.  It was caused by your commits here: https://bugs.python.org/issue1166948 
.   It feels like we have a few choices:

* revert the LANGUAGE ordering change which would take us back to the 2.6 
behaviour. 
* update the documentation to reflect the new ordering [Since the change has 
been around for so long, I think this is my personal favorite]
* Remove LANGUAGE from setting the defaultlocale because the GNU gettext usage 
of this variable is actually very different than what we're doing here.  It 
seems like it should only affect LC_MESSAGES and should affect those only as a 
fallback.
* Revert the LANGUAGE ordering change to the beginning of the list but remove 
it from consideration as a source for the *encoding*.

what do you think?

--
nosy: +a.badger, doko

___
Python tracker 

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



[issue36858] f-string '=' debugging output needs to be documented

2019-05-08 Thread Eric V. Smith


New submission from Eric V. Smith :

There are two problems here: what to call this feature, and where to put it.

The current f-string documentation is in Doc/reference/lexical_analysis.rst, 
which I'm not sure is the best place to add discussion about how this feature 
works. This feature is run-time behavior, and goes beyond what the lexer 
documentation should show.

--
assignee: docs@python
components: Documentation
messages: 341941
nosy: docs@python, eric.smith
priority: normal
severity: normal
status: open
title: f-string '=' debugging output needs to be documented
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



[issue36817] Add = to f-strings for easier debugging.

2019-05-08 Thread Eric V. Smith


Change by Eric V. Smith :


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



[issue36817] Add = to f-strings for easier debugging.

2019-05-08 Thread Eric V. Smith


Eric V. Smith  added the comment:


New changeset 9a4135e939bc223f592045a38e0f927ba170da32 by Eric V. Smith in 
branch 'master':
bpo-36817: Add f-string debugging using '='. (GH-13123)
https://github.com/python/cpython/commit/9a4135e939bc223f592045a38e0f927ba170da32


--

___
Python tracker 

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



[issue35495] argparse does not honor default argument for nargs=argparse.REMAINDER argument

2019-05-08 Thread Michael Blahay


Michael Blahay  added the comment:

Ryan, I have reviewed the documentation at 
https://docs.python.org/3/library/argparse.html#nargs and must admit that there 
is not a definitive answer that I can see regarding the defined behavior should 
there be no command line arguments that are in fact remaining. One could 
certainly argue that the empty list is the expression of the fact that no 
remaining arguments could be found. One can also argue that when seeking the 
remaining arguments, a list that may be zero to many elements in size, that by 
definition there cannot be a default.

Can you cite any documentation that would support your claim?

--

___
Python tracker 

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



[issue35495] argparse does not honor default argument for nargs=argparse.REMAINDER argument

2019-05-08 Thread Michael Blahay


Michael Blahay  added the comment:

Okay, so the expected output after running parse.parse_args([]) is 
Namespace(['nothing'])

--

___
Python tracker 

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



[issue36620] Documentation missing parameter for Itertools.zip_longest

2019-05-08 Thread Roundup Robot


Change by Roundup Robot :


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

___
Python tracker 

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



[issue36843] AIX build fails with failure to get random numbers

2019-05-08 Thread Robert Boehne

Robert Boehne  added the comment:

Reading a few bytes from /dev/urandom via dd:


robb@nepal:/raid/checkouts-raid/robb/nepal/build-py37$ dd if=/dev/urandom 
bs=256 count=1
??S?(#L???~]?B?^??8?f&?_|Vi??@??[joG>St??;?$?1?*??24???RD?"4`??aҼ#???f???
?}  
 ??^zC?@?"?.^?gn??p?t?R*=Ӫ?8*?L??   
8??bu?߂???8?Ŵ?`??y??٫K?.?~陵#5?t??h?e!?G@)B?R???(9kLX??BUH5=?||??El???a+n@??V?c?N?^ͯ?y?n??]??$݇?Mp?,#???K?i8?`?v??~`L?1+0
 records in.
1+0 records out.
robb@nepal:/raid/checkouts-raid/robb/nepal/build-py37$ dd if=/dev/urandom 
bs=256 count=1
_d?(?n???1bRԺ{??I??"Ѱ"|???E
   p??^??q#??
~yZ$u??e}?3?qw#?{*T1+0 records 
in.nR)?-?B???x??{~hϼ+?7۪شVW??"?d?n??V??t??R(\YC?3=?p?-ӽ?m??P???A?M??68??9Y?](??xn+?a?ܯ?W
1+0 records out.
robb@nepal:/raid/checkouts-raid/robb/nepal/build-py37$

--

___
Python tracker 

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



[issue36857] bisect should support descending order

2019-05-08 Thread Rémi Lapeyre

Rémi Lapeyre  added the comment:

If issue4356 is accepted, I think it may be possible to use `key=lambda e: -e`.

--
nosy: +remi.lapeyre

___
Python tracker 

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



[issue24882] ThreadPoolExecutor doesn't reuse threads until #threads == max_workers

2019-05-08 Thread Brian Quinlan


Brian Quinlan  added the comment:

After playing with it for a while, https://github.com/python/cpython/pull/6375 
seems reasonable to me.

It needs tests and some documentation.

Antoine, are you still -1 because of the complexity increase?

--

___
Python tracker 

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



[issue36857] bisect should support descending order

2019-05-08 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Sorry, I don't think this is a worthwhile API extension.  The bisect module is 
primarily about searching for cut points between ranges.  For your use case, 
consider using blist or one of the many ordered collection recipes on PyPI (for 
example: http://www.grantjenks.com/docs/sortedcollections/ ).

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

___
Python tracker 

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



[issue35900] Add pickler hook for the user to customize the serialization of user defined functions and types.

2019-05-08 Thread Antoine Pitrou


Antoine Pitrou  added the comment:


New changeset 65d98d0f53f558d7c799098da0abf376068c15fd by Antoine Pitrou 
(Pierre Glaser) in branch 'master':
bpo-35900: Add a state_setter arg to save_reduce (GH-12588)
https://github.com/python/cpython/commit/65d98d0f53f558d7c799098da0abf376068c15fd


--

___
Python tracker 

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



[issue35924] curses segfault resizing window

2019-05-08 Thread Toshio Kuratomi


Change by Toshio Kuratomi :


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

___
Python tracker 

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



[issue30458] [security][CVE-2019-9740][CVE-2019-9947] HTTP Header Injection (follow-up of CVE-2016-5699)

2019-05-08 Thread Charalampos Stratakis


Charalampos Stratakis  added the comment:

A small clarification on the differences of those two CVE's.

CVE-2019-9740: CLRF sequences are not properly handled in python built-in 
modules urllib/urllib2 in the query part of the url parameter of urlopen() 
function

CVE-2019-9947: CLRF sequences are not properly handled in python built-in 
modules urllib/urllib2 in the path part of the url parameter of urlopen() 
function

--
nosy: +cstratak -hroncok, koobs, ned.deily
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



[issue36816] self-signed.pythontest.net TLS certificate key is too weak

2019-05-08 Thread Ned Deily


Ned Deily  added the comment:


New changeset 2b9d7abdbd4b41e2c624858f5bc80da59d8a681d by Ned Deily (Gregory P. 
Smith) in branch '3.6':
[3.6] bpo-36816: Update the self-signed.pythontest.net cert (GH-13192) 
(GH-13198)
https://github.com/python/cpython/commit/2b9d7abdbd4b41e2c624858f5bc80da59d8a681d


--
nosy: +ned.deily

___
Python tracker 

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



[issue29779] New environment variable PYTHONHISTORY

2019-05-08 Thread Zackery Spytz


Change by Zackery Spytz :


--
keywords: +patch
pull_requests: +13119

___
Python tracker 

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



[issue36843] AIX build fails with failure to get random numbers

2019-05-08 Thread Robert Boehne


Robert Boehne  added the comment:

The call to open("/dev/urandom", flags) is returning -1, and errno is set to 
22, EINVAL - Invalid argument.  could the flags be set incorrectly?

--

___
Python tracker 

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



[issue36620] Documentation missing parameter for Itertools.zip_longest

2019-05-08 Thread Ying Wang


Ying Wang  added the comment:

I would like to take a stab at this as a first-time CPython contributor.

--
nosy: +Ying Wang

___
Python tracker 

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



[issue36843] AIX build fails with failure to get random numbers

2019-05-08 Thread Robert Boehne


Robert Boehne  added the comment:

Opening /dev/urandom seems to return -1

(dbx) print buffer
0x09001000a5f49380 
(dbx) print size
24 
(dbx) print raise
0 
(dbx) step
stopped in dev_urandom at line 311 in file 
"/raid/checkouts-raid/robb/nepal/build-py37/../../Python-3.7.3/Python/bootstrap_hash.c"
 ($t1)
  311   if (raise) {
(dbx) step
stopped in dev_urandom at line 378 in file 
"/raid/checkouts-raid/robb/nepal/build-py37/../../Python-3.7.3/Python/bootstrap_hash.c"
 ($t1)
  378   fd = _Py_open_noraise("/dev/urandom", O_RDONLY);
(dbx) next
stopped in dev_urandom at line 379 in file 
"/raid/checkouts-raid/robb/nepal/build-py37/../../Python-3.7.3/Python/bootstrap_hash.c"
 ($t1)
  379   if (fd < 0) {
(dbx) print fd
-1 
(dbx) step
stopped in dev_urandom at line 380 in file 
"/raid/checkouts-raid/robb/nepal/build-py37/../../Python-3.7.3/Python/bootstrap_hash.c"
 ($t1)
  380   return -1;
(dbx) step
stopped in dev_urandom at line 401 in file 
"/raid/checkouts-raid/robb/nepal/build-py37/../../Python-3.7.3/Python/bootstrap_hash.c"
 ($t1)
  401   }
(dbx) step
stopped in pyurandom at line 519 in file 
"/raid/checkouts-raid/robb/nepal/build-py37/../../Python-3.7.3/Python/bootstrap_hash.c"
 ($t1)
  519   }
(dbx) step
stopped in unnamed block in _Py_HashRandomization_Init at line 611 in file 
"/raid/checkouts-raid/robb/nepal/build-py37/../../Python-3.7.3/Python/bootstrap_hash.c"
 ($t1)
  611   if (res < 0) {
(dbx) step
stopped in unnamed block in _Py_HashRandomization_Init at line 612 in file 
"/raid/checkouts-raid/robb/nepal/build-py37/../../Python-3.7.3/Python/bootstrap_hash.c"
 ($t1)
  612   return _Py_INIT_USER_ERR("failed to get random numbers "
(dbx) continue
continue
^ unrecognized command
(dbx) cont
Fatal Python error: _Py_HashRandomization_Init: failed to get random numbers to 
initialize Python

--

___
Python tracker 

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



[issue30271] Make sqlite3 statement cache optional

2019-05-08 Thread Berker Peksag


Berker Peksag  added the comment:

I'd prefer disabling statement cache implicitly when set_authorizer() is 
called. There's no need to expose this to end users.

--

___
Python tracker 

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



[issue30458] [security][CVE-2019-9740][CVE-2019-9947] HTTP Header Injection (follow-up of CVE-2016-5699)

2019-05-08 Thread Miro Hrončok

Change by Miro Hrončok :


--
pull_requests: +13118

___
Python tracker 

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



[issue36778] test_site.StartupImportTests.test_startup_imports fails if default code page is cp65001

2019-05-08 Thread Steve Dower


Steve Dower  added the comment:

The XP/Vista change is just context - we don't have to worry about OS that old 
any more.

If we remove the functools.partial call, does that help?

--

___
Python tracker 

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



[issue35924] curses segfault resizing window

2019-05-08 Thread Toshio Kuratomi


Toshio Kuratomi  added the comment:

My upstream (ncurses) bug report: 
http://lists.gnu.org/archive/html/bug-ncurses/2019-05/msg00010.html

--

___
Python tracker 

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



[issue36857] bisect should support descending order

2019-05-08 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +rhettinger

___
Python tracker 

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



[issue36778] test_site.StartupImportTests.test_startup_imports fails if default code page is cp65001

2019-05-08 Thread Paul Monson


Paul Monson  added the comment:

cp65001 is the default codepage on Windows IoT Core and Windows NanoServer.  

There is also an option in control panel in Windows desktop 1809 (version 
17763) and greater which changes the default codepage to cp65001. 
1. Run control.exe
2. Click Clock and Region> change date, time or number formats
3. Click administrative tab
4. Click "Change System locale..." button
5. Check "Beta: Use Unicode UTF-8 for worldwide language support"
6. Click OK twice.
7. You will be prompted to reboot.

> Code page 65001 handles lone surrogate differently on Windows XP and older.

If I read the docs correctly a lone surrogate is an error.  I don't think a 
corner case like handling errors differently makes cp65001 not UTF-8.  Am I 
misunderstanding this point?
Also, Why is Windows XP still relevant in this discussion?

--

___
Python tracker 

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



[issue27639] UserList.__getitem__ doesn't account for slices

2019-05-08 Thread Michael Blahay


Michael Blahay  added the comment:

PR 13150, the recreation of PR 4981, was noticed just after I created PR 13169. 
It was decided to continue forward with PR 13169 since PR 13150 contained 
changes that were out of scope for BPO-27639 for which it was suspected might 
have been the cause of the non-merging of PR 4981. Thank for identifying 
Dmitry; I did my best to give credit where credit was due.

--

___
Python tracker 

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



[issue36856] faulthandler._stack_overflow doesn't work on x86-linux with KPTI enabled

2019-05-08 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Are uintptr_t overflow/underflow semantics a defined behavior?

--
nosy: +pablogsal

___
Python tracker 

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



[issue36857] bisect should support descending order

2019-05-08 Thread John Belmonte


New submission from John Belmonte :

because "list.pop()"

use case: maintain large ordered list and efficiently remove min item

list.pop() is O(1) but yields the max item.  There is no efficient removal of 
the min item.

list is by far the fastest collection to use with insort().  While deque offers 
O(1) popleft(), insort() performance with deque is not acceptable.

Lack of descending support in bisect necessitates workarounds such as using 
negative-valued items, which hurts code readability and moreover assumes that 
values are numbers.

--
components: Library (Lib)
messages: 341921
nosy: John Belmonte
priority: normal
severity: normal
status: open
title: bisect should support descending order
type: enhancement

___
Python tracker 

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



[issue36856] faulthandler._stack_overflow doesn't work on x86-linux with KPTI enabled

2019-05-08 Thread Xi Ruoyao


Xi Ruoyao  added the comment:

> Are uintptr_t overflow/underflow semantics a defined behavior?

Yes.  Unlike signed overflow, unsigned overflow is defined to be 2's 
complement.  The problem is this overflow results a wrong stack pointer limit 
and breaks _stack_overflow.

--

___
Python tracker 

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



[issue35813] shared memory construct to avoid need for serialization between processes

2019-05-08 Thread Pam McA'Nulty


Pam McA'Nulty  added the comment:

Reviewing docs and am writing a queue implementation for usability testing.  I 
think ShareableList needs to support `close()` and `unlink()` directly.  The 
`.shm` attribute should be considered an _implementation_ detail, and not be 
exposed.

--
nosy: +Pam.McANulty

___
Python tracker 

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



[issue36856] faulthandler._stack_overflow doesn't work on x86-linux with KPTI enabled

2019-05-08 Thread Xi Ruoyao


Change by Xi Ruoyao :


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

___
Python tracker 

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



[issue26903] ProcessPoolExecutor(max_workers=64) crashes on Windows

2019-05-08 Thread miss-islington


Change by miss-islington :


--
pull_requests: +13117

___
Python tracker 

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



[issue26903] ProcessPoolExecutor(max_workers=64) crashes on Windows

2019-05-08 Thread Steve Dower


Steve Dower  added the comment:


New changeset 39889864c09741909da4ec489459d0197ea8f1fc by Steve Dower (Brian 
Quinlan) in branch 'master':
bpo-26903: Limit ProcessPoolExecutor to 61 workers on Windows (GH-13132)
https://github.com/python/cpython/commit/39889864c09741909da4ec489459d0197ea8f1fc


--

___
Python tracker 

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



[issue24882] ThreadPoolExecutor doesn't reuse threads until #threads == max_workers

2019-05-08 Thread Brian Quinlan


Brian Quinlan  added the comment:

When I first wrote and started using ThreadPoolExecutor, I had a lot of code 
like this:

with ThreadPoolExecutor(max_workers=500) as e:
  e.map(download, images)

I didn't expect that `images` would be a large list but, if it was, I wanted 
all of the downloads to happen in parallel.

I didn't want to have to explicitly take into account the list size when 
starting the executor (e.g. max_works=min(500, len(images))) but I also didn't 
want to create 500 threads up front when I only needed a few.

My use case involved transient ThreadPoolExecutors so I didn't have to worry 
about idle threads.

In principle, I'd be OK with trying to avoid unnecessary thread creation if the 
implementation can be simple and efficient enough.

https://github.com/python/cpython/pull/6375 seems simple enough but I haven't 
convinced myself that it works yet ;-)

--

___
Python tracker 

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



[issue27639] UserList.__getitem__ doesn't account for slices

2019-05-08 Thread Michael Blahay


Change by Michael Blahay :


--
pull_requests: +13114

___
Python tracker 

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



[issue36783] No documentation for _FromXandFold C API functions

2019-05-08 Thread Roundup Robot


Change by Roundup Robot :


--
pull_requests: +13115

___
Python tracker 

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



[issue36540] PEP 570: Python Positional-Only Parameters

2019-05-08 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
pull_requests: +13113

___
Python tracker 

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



[issue36831] ElementTree.find attribute matching with empty namespace

2019-05-08 Thread Stefan Behnel


Change by Stefan Behnel :


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

___
Python tracker 

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



[issue24758] unittest.mock.Mock's new "unsafe" feature needs a better error message

2019-05-08 Thread Kushal Das


Kushal Das  added the comment:


New changeset b9b08cd948de97d756a199b60becce8397a8c882 by Kushal Das (Zackery 
Spytz) in branch 'master':
bpo-24758: Improve the error msg for unittest.mock.Mock()'s unsafe mode (#12991)
https://github.com/python/cpython/commit/b9b08cd948de97d756a199b60becce8397a8c882


--
nosy: +kushal.das

___
Python tracker 

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



[issue36816] self-signed.pythontest.net TLS certificate key is too weak

2019-05-08 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
pull_requests: +13111

___
Python tracker 

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



[issue31033] Add argument to .cancel() of Task and Future

2019-05-08 Thread Carl Meyer


Change by Carl Meyer :


--
nosy: +carljm

___
Python tracker 

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



[issue36816] self-signed.pythontest.net TLS certificate key is too weak

2019-05-08 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
pull_requests: +13110

___
Python tracker 

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



[issue36856] faulthandler._stack_overflow doesn't work on x86-linux with KPTI enabled

2019-05-08 Thread SilentGhost


Change by SilentGhost :


--
nosy: +vstinner

___
Python tracker 

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



[issue36856] faulthandler._stack_overflow doesn't work on x86-linux with KPTI enabled

2019-05-08 Thread Xi Ruoyao


New submission from Xi Ruoyao :

In faulthandler.c STACK_OVERFLOW_MAX_SIZE is defined to 100 * 1024 * 1024 
(100MB).  But recently KPTI has been applied to mitigate Meltdown 
(CVE-2017-5754) so the userspace stack pointer may be very close to 0x 
on Linux systems with 32-bit x86.  For example, on my laptop it's sometimes 
0xcc20.   So the expression

sp + STACK_OVERFLOW_MAX_SIZE

overflows and becomes a very small number.  That causes 
faulthandler._stack_overflow() to bail out after only one recursive call:

Traceback (most recent call last):
  File "", line 1, in 
RuntimeError: unable to raise a stack overflow (allocated 4124 bytes on the 
stack, 1 recursive calls)

--
components: Extension Modules
messages: 341915
nosy: xry111
priority: normal
severity: normal
status: open
title: faulthandler._stack_overflow doesn't work on x86-linux with KPTI enabled
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



[issue36816] self-signed.pythontest.net TLS certificate key is too weak

2019-05-08 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
pull_requests: +13109

___
Python tracker 

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



[issue36841] Supporting customization of float encoding in JSON

2019-05-08 Thread Mitar


Mitar  added the comment:

That would be awesome!

BTW, just as an additional example, JavaScrpt's JSON.stringify encodes NaN and 
Infinity to null. By having a custom function I could for example try to match 
such implementation.

--

___
Python tracker 

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



[issue35925] test_httplib test_nntplib test_ssl fail on ARMv7 Debian buster bot (OpenSSL 1.1.1a)

2019-05-08 Thread Julien Palard

Julien Palard  added the comment:



--

___
Python tracker 

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



[issue36855] update tests relying on a copy of a TLS certificate (pem) to support two versions

2019-05-08 Thread Gregory P. Smith


New submission from Gregory P. Smith :

We're having pain today due to the Lib/test/selfsigned_pythontestdotnet.pem 
certificate update sychronization.

This wouldn't be painful if our tests relying on a specific certificate 
matching something elsewhere on the network supported multiple possible 
certificates.  Specifically an old and a new cert.  When doing that, we could 
go ahead and commit the new cert, moving the existing one to old, before 
flipping the update on the test infrastructure.  in all branches.

that'd prevent massive PR CI and buildbot failure fallout.

--
components: Tests
messages: 341912
nosy: gregory.p.smith
priority: normal
severity: normal
stage: needs patch
status: open
title: update tests relying on a copy of a TLS certificate (pem) to support two 
versions
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



[issue36852] Python3.7.2 fails to cross-compile (yocto / openembedded) when target is mips softfloat

2019-05-08 Thread SilentGhost


Change by SilentGhost :


--
nosy: +doko

___
Python tracker 

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



[issue24851] infinite loop in faulthandler._stack_overflow

2019-05-08 Thread Xi Ruoyao


Change by Xi Ruoyao :


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



[issue36854] GC operates out of global runtime state.

2019-05-08 Thread Eric Snow


New submission from Eric Snow :

(also see #24554)

We need to move GC state from _PyRuntimeState to PyInterpreterState.

--
assignee: eric.snow
components: Interpreter Core
messages: 341911
nosy: eric.snow, pablogsal
priority: normal
severity: normal
status: open
title: GC operates out of global runtime state.
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



[issue36816] self-signed.pythontest.net TLS certificate key is too weak

2019-05-08 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
pull_requests: +13108

___
Python tracker 

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



[issue36843] AIX build fails with failure to get random numbers

2019-05-08 Thread STINNER Victor


STINNER Victor  added the comment:

Ok, so Python uses /dev/urandom. Can you try to read a few bytes from it? Like 
256 bytes. You can try my dd command.

--

___
Python tracker 

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



[issue35712] Make NotImplemented unusable in boolean context

2019-05-08 Thread Josh Rosenberg


Josh Rosenberg  added the comment:

I've submitted a PR for this. I did discover a use case for boolean evaluation 
while doing this in the functools.total_ordering helpers. While it's 
legitimate, it *looks* wrong (the code looks like it didn't consider the 
possibility of NotImplemented even though it did), and really only applies to 
the case total_ordering handles on behalf of most folks (implementing one 
comparator in terms of two others).

The specific case was:

def _le_from_lt(self, other, NotImplemented=NotImplemented):
 'Return a <= b.  Computed by @total_ordering from (a < b) or (a == b).'
 op_result = self.__lt__(other)
 return op_result or self == other

(with a similar implementation for _ge_from_gt). It happens to work because the 
return value of __lt__ is used directly for both True and NotImplemented cases, 
with only False delegating to equality. It's not at all clear that that's 
correct at first glance though, and the fix to avoid the warning is simple, 
matching the other 10 comparator helpers by explicit checking for 
NotImplemented via:

if op_result is NotImplemented:
return NotImplemented

That's about the strongest case I can find for "legitimate" use of 
NotImplemented in a boolean context, so I figured I'd point it out explicitly 
so people knew it existed.

If that makes an eventual TypeError a non-starter, I'd still like that usage to 
emit a warning (e.g. a RuntimeWarning) simply because the utility of that one 
little shortcut pales in comparison to the damage done by the *many* misuses 
that occur.

--

___
Python tracker 

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



[issue36852] Python3.7.2 fails to cross-compile (yocto / openembedded) when target is mips softfloat

2019-05-08 Thread Roundup Robot


Change by Roundup Robot :


--
pull_requests: +13107

___
Python tracker 

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



[issue36816] self-signed.pythontest.net TLS certificate key is too weak

2019-05-08 Thread miss-islington


miss-islington  added the comment:


New changeset 6bd81734de0b73f1431880d6a75fb71bcbc65fa1 by Miss Islington (bot) 
(Gregory P. Smith) in branch 'master':
bpo-36816: Update the self-signed.pythontest.net cert (GH-13192)
https://github.com/python/cpython/commit/6bd81734de0b73f1431880d6a75fb71bcbc65fa1


--
nosy: +miss-islington

___
Python tracker 

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



[issue31873] Inconsistent capitalization of proper noun - Unicode.

2019-05-08 Thread miss-islington


miss-islington  added the comment:


New changeset ed8860c5af87d78d312ae30dd2d6bedc60bd86e5 by Miss Islington (bot) 
in branch '3.7':
bpo-31873: Update unicode.rst - 'unicode' capitalization (GH-4125)
https://github.com/python/cpython/commit/ed8860c5af87d78d312ae30dd2d6bedc60bd86e5


--
nosy: +miss-islington

___
Python tracker 

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



[issue30458] [security][CVE-2019-9740][CVE-2019-9947] HTTP Header Injection (follow-up of CVE-2016-5699)

2019-05-08 Thread Ned Deily

Ned Deily  added the comment:


New changeset c50d437e942d4c4c45c8cd76329b05340c02eb31 by Ned Deily (Miro 
Hrončok) in branch '3.6':
bpo-30458: Disallow control chars in http URLs. (GH-12755) (GH-13155)
https://github.com/python/cpython/commit/c50d437e942d4c4c45c8cd76329b05340c02eb31


--
nosy: +ned.deily

___
Python tracker 

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



[issue24048] remove_module() needs to save/restore exception state

2019-05-08 Thread Nick Coghlan


Nick Coghlan  added the comment:


New changeset 94a64e9cd411a87514b68082c1c437eb3b49dfb9 by Nick Coghlan (Zackery 
Spytz) in branch 'master':
bpo-24048: Save the live exception during import.c's remove_module() (GH-13005)
https://github.com/python/cpython/commit/94a64e9cd411a87514b68082c1c437eb3b49dfb9


--

___
Python tracker 

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



[issue36841] Supporting customization of float encoding in JSON

2019-05-08 Thread Wei Lee


Wei Lee  added the comment:

If no one is working on it, I'd like to give it a try.

--
nosy: +Lee-W

___
Python tracker 

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



[issue35925] test_httplib test_nntplib test_ssl fail on ARMv7 Debian buster bot (OpenSSL 1.1.1a)

2019-05-08 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

thats https://bugs.python.org/issue36816 (separate issue as our infrastructure 
is fixed to have a modern certificate).  PR pending automerge post-CI.

--

___
Python tracker 

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



  1   2   >