[issue33026] Fix jumping out of "with" block

2018-03-10 Thread miss-islington

Change by miss-islington :


--
pull_requests: +5836

___
Python tracker 

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



[issue33026] Fix jumping out of "with" block

2018-03-10 Thread miss-islington

Change by miss-islington :


--
pull_requests: +5835

___
Python tracker 

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



[issue33026] Fix jumping out of "with" block

2018-03-10 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 04aadf23eac51fec2e436c5960c1362bbb7d03de by Serhiy Storchaka in 
branch '3.7':
[3.7] bpo-33026: Fix jumping out of "with" block by setting f_lineno. 
(GH-6026). (#6074)
https://github.com/python/cpython/commit/04aadf23eac51fec2e436c5960c1362bbb7d03de


--

___
Python tracker 

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



[issue32338] Save OrderedDict import in re

2018-03-10 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
dependencies:  -Dict order is now guaranteed, so add tests and doc for it
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



[issue32337] Dict order is now guaranteed, so add tests and doc for it

2018-03-10 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
nosy: +ned.deily
priority: normal -> release blocker

___
Python tracker 

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



[issue32338] Save OrderedDict import in re

2018-03-10 Thread miss-islington

miss-islington  added the comment:


New changeset 39441fce0218a3f51a80cf17aa179a32651a02f6 by Miss Islington (bot) 
in branch '3.7':
bpo-32338: OrderedDict import is no longer needed in re. (GH-4891)
https://github.com/python/cpython/commit/39441fce0218a3f51a80cf17aa179a32651a02f6


--
nosy: +miss-islington

___
Python tracker 

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



[issue33026] Fix jumping out of "with" block

2018-03-10 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
pull_requests: +5834

___
Python tracker 

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



[issue32338] Save OrderedDict import in re

2018-03-10 Thread miss-islington

Change by miss-islington :


--
pull_requests: +5833

___
Python tracker 

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



[issue32338] Save OrderedDict import in re

2018-03-10 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset b931bd0a2fe7e9293339019352baf3317166b769 by Serhiy Storchaka in 
branch 'master':
bpo-32338: OrderedDict import is no longer needed in re. (#4891)
https://github.com/python/cpython/commit/b931bd0a2fe7e9293339019352baf3317166b769


--

___
Python tracker 

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



[issue33026] Fix jumping out of "with" block

2018-03-10 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 26c9f565d016db21257a60d29ab2c99383dd5ac7 by Serhiy Storchaka in 
branch 'master':
bpo-33026: Fix jumping out of "with" block by setting f_lineno. (#6026)
https://github.com/python/cpython/commit/26c9f565d016db21257a60d29ab2c99383dd5ac7


--

___
Python tracker 

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



[issue32996] Improve What's New in 3.7

2018-03-10 Thread miss-islington

miss-islington  added the comment:


New changeset 720a4b69c6b66ae5d6f447d5814bd204170c94b3 by Miss Islington (bot) 
in branch '3.7':
bpo-32996: Improve What's New in 3.7. (GH-5983)
https://github.com/python/cpython/commit/720a4b69c6b66ae5d6f447d5814bd204170c94b3


--
nosy: +miss-islington

___
Python tracker 

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



[issue33046] IDLE option to strip trailing whitespace automatically on save

2018-03-10 Thread Raymond Hettinger

New submission from Raymond Hettinger :

Add option to IDLE preferences in the general section to automatically run 
Strip Trailing Whitespace before saving.

People who use Strip Trailing Whitespace generally do so just before saving and 
they do it over and over again as they develop and check in code.  It would be 
nice to have this done automatically.  In general, trailing whitespace is 
almost never desireable.

--
assignee: terry.reedy
components: IDLE
messages: 313580
nosy: rhettinger, terry.reedy
priority: normal
severity: normal
status: open
title: IDLE option to strip trailing whitespace automatically on save
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



[issue26680] Incorporating float.is_integer into the numeric tower and Decimal

2018-03-10 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Sorry Robert, but I object to this going forward.

1) We do not and should not require that every float() method also be in int():

   >>> set(dir(float)) - set(dir(int))   
   {'fromhex', 'hex', 'is_integer', '__getformat__', '__setformat__', 
'as_integer_ratio'}

2) Your use case is trivially solved in a portable, trivial, and readable way:

   a == int(a)

3) I really don't want to clutter the other types with this method when it does 
nothing useful for those types.  In particular, I expect that the presence of 
"is_integer()" in the int() class will likely create more confusion than it 
solves (perhaps not for you, but for the vast majority of users, none of whom 
have ever requested this behavior over the entire history of the language).

4) Also, I don't what this to have to propagate to every project that ever 
registers their custom numeric types with the numeric tower.  Adding this 
method to the tower is essentially making a requirement that everyone, 
everywhere must add this method.   That is not in the spirit of what the ABCs 
are all about -- they mostly require a small and useful subset of the behaviors 
of the related concrete classes (i.e. the concrete collections all have more 
methods than are required by their collections.abc counterparts).

5) Lastly, the spirit of the decimal module was to stick as closely as possible 
to the decimal specification and assiduously avoid extending the spec with new 
inventions (risking duplication of functionality, risking non-portability with 
other implementations, risking not handling special values in a way that is 
consistent with the spec, risking our going down a path that intentionally not 
chosen by the spec creators, or risking being at odds with subsequent updates 
to the spec).

--

___
Python tracker 

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



[issue33038] GzipFile doesn't always ignore None as filename

2018-03-10 Thread bbayles

bbayles  added the comment:

da, would you mind if I add a test and a news entry to your patch and submit it 
as a Github pull request?

--
nosy: +bbayles

___
Python tracker 

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



[issue32996] Improve What's New in 3.7

2018-03-10 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 51302a5fcc557e6afc0bf1e3b371f5f37c76dc77 by Serhiy Storchaka in 
branch 'master':
bpo-32996: Improve What's New in 3.7. (#5983)
https://github.com/python/cpython/commit/51302a5fcc557e6afc0bf1e3b371f5f37c76dc77


--

___
Python tracker 

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



[issue32996] Improve What's New in 3.7

2018-03-10 Thread miss-islington

Change by miss-islington :


--
pull_requests: +5832

___
Python tracker 

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



[issue33045] SSL Dcumentation Error

2018-03-10 Thread Matt Eaton

Matt Eaton  added the comment:

Thank you very much, Berker!!

--

___
Python tracker 

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



[issue33045] SSL Dcumentation Error

2018-03-10 Thread Berker Peksag

Berker Peksag  added the comment:

Thank you, Matt (and welcome to Python development!)

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

___
Python tracker 

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



[issue33045] SSL Dcumentation Error

2018-03-10 Thread Berker Peksag

Berker Peksag  added the comment:


New changeset 3f439d14ad48f5d4f6017fc814326fb1f6237b53 by Berker Peksag (Miss 
Islington (bot)) in branch '3.6':
bpo-33045: Fix typos in SSL documentation (GH-6065)
https://github.com/python/cpython/commit/3f439d14ad48f5d4f6017fc814326fb1f6237b53


--

___
Python tracker 

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



[issue33045] SSL Dcumentation Error

2018-03-10 Thread Berker Peksag

Berker Peksag  added the comment:


New changeset 17b6c19d39229619de649f5a9e28a46779ef1c51 by Berker Peksag (Miss 
Islington (bot)) in branch '3.7':
bpo-33045: Fix typos in SSL documentation (GH-6065)
https://github.com/python/cpython/commit/17b6c19d39229619de649f5a9e28a46779ef1c51


--

___
Python tracker 

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



[issue33045] SSL Dcumentation Error

2018-03-10 Thread miss-islington

Change by miss-islington :


--
pull_requests: +5831

___
Python tracker 

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



[issue33045] SSL Dcumentation Error

2018-03-10 Thread miss-islington

Change by miss-islington :


--
pull_requests: +5830

___
Python tracker 

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



[issue33045] SSL Dcumentation Error

2018-03-10 Thread Berker Peksag

Berker Peksag  added the comment:


New changeset 9cf8c42f3231d3f066670d087a997bd1278482a0 by Berker Peksag (Matt 
Eaton) in branch 'master':
bpo-33045: Fix typos in SSL documentation (GH-6065)
https://github.com/python/cpython/commit/9cf8c42f3231d3f066670d087a997bd1278482a0


--
nosy: +berker.peksag

___
Python tracker 

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



[issue27645] Supporting native backup facility of SQLite

2018-03-10 Thread Berker Peksag

Berker Peksag  added the comment:


New changeset c546a62c4d7b37ead10f986554a01d6d593227a1 by Berker Peksag (Miss 
Islington (bot)) in branch '3.7':
bpo-27645: Skip test_bad_target_in_transaction if SQLite == 3.8.7.1 (GH-6067)
https://github.com/python/cpython/commit/c546a62c4d7b37ead10f986554a01d6d593227a1


--

___
Python tracker 

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



[issue33034] urllib.parse.urlparse and urlsplit not raising ValueError for bad port

2018-03-10 Thread bbayles

Change by bbayles :


--
nosy: +bbayles

___
Python tracker 

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



[issue27645] Supporting native backup facility of SQLite

2018-03-10 Thread miss-islington

Change by miss-islington :


--
pull_requests: +5829

___
Python tracker 

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



[issue27645] Supporting native backup facility of SQLite

2018-03-10 Thread Berker Peksag

Berker Peksag  added the comment:


New changeset 7280a4eef5fbe17e8ac82afd71fe6e51843240a5 by Berker Peksag in 
branch 'master':
bpo-27645: Skip test_bad_target_in_transaction if SQLite == 3.8.7.1 (GH-6067)
https://github.com/python/cpython/commit/7280a4eef5fbe17e8ac82afd71fe6e51843240a5


--

___
Python tracker 

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



[issue27645] Supporting native backup facility of SQLite

2018-03-10 Thread Berker Peksag

Berker Peksag  added the comment:

Test also passed on my MBP with SQLite 3.22.0 and the following line

rc = _pysqlite_seterror(bck_conn, NULL);

returns

1 (SQLITE_ERROR)

with

"SQL logic error"

Looging at https://www.sqlite.org/src/artifact?ln=on=faf17e60b43233c2, 
checkReadTransaction() returns

sqlite3ErrorWithMsg(db, SQLITE_ERROR, "destination database is in use");
return SQLITE_ERROR;

I've opened PR 6067 to skip the test under SQLite 3.8.7.1 for now.

Lele, could you take a look at this please? It's almost 4 am here I won't be 
able to work on this in the next 10-15 hours.

--
resolution: fixed -> 
stage: patch review -> resolved

___
Python tracker 

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



[issue27645] Supporting native backup facility of SQLite

2018-03-10 Thread Berker Peksag

Change by Berker Peksag :


--
stage: resolved -> patch review

___
Python tracker 

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



[issue27645] Supporting native backup facility of SQLite

2018-03-10 Thread Berker Peksag

Change by Berker Peksag :


--
pull_requests: +5828
stage: resolved -> patch review

___
Python tracker 

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



[issue25910] Fixing links in documentation

2018-03-10 Thread Carol Willing

Carol Willing  added the comment:

A number of PRs have been merged since this issue opened in 2015. After 
Victor's merge of GH-1933 in January 2018, this looks ready to close. I'm going 
to close it. 

If there are further links that need fixing as they sometimes fall out of date, 
please open a new issue with specific links needing updating. Thanks.

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



[issue33043] Add a 'Contributing to Docs' link at the bottom of docs.python.org

2018-03-10 Thread Carol Willing

Carol Willing  added the comment:

Great suggestion Ned. It would be great to have some links on the bug page too.

--

___
Python tracker 

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



[issue32836] Symbol table for comprehensions (list, dict, set) still includes temporary _[1] variable

2018-03-10 Thread miss-islington

miss-islington  added the comment:


New changeset 5506d603021518eaaa89e7037905f7a698c5e95c by Miss Islington (bot) 
in branch '3.7':
bpo-32836: Remove obsolete code from symtable pass (GH-5680)
https://github.com/python/cpython/commit/5506d603021518eaaa89e7037905f7a698c5e95c


--
nosy: +miss-islington

___
Python tracker 

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



[issue27645] Supporting native backup facility of SQLite

2018-03-10 Thread Berker Peksag

Berker Peksag  added the comment:

AppVeyor:

sqlite3.sqlite_version: 3.21.0 (passed)

Travis CI:

sqlite3.sqlite_version: 3.8.2 (passed)

http://buildbot.python.org/all/#/builders/88/builds/799

sqlite3.sqlite_version: 3.8.2 (passed)

--

___
Python tracker 

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



[issue27645] Supporting native backup facility of SQLite

2018-03-10 Thread Berker Peksag

Berker Peksag  added the comment:

>From test.pythoninfo:

sqlite3.sqlite_version: 3.8.7.1

--

___
Python tracker 

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



[issue27645] Supporting native backup facility of SQLite

2018-03-10 Thread Berker Peksag

Berker Peksag  added the comment:

>From http://buildbot.python.org/all/#/builders/13/builds/808

==
FAIL: test_bad_target_in_transaction (sqlite3.test.backup.BackupTests)
--
Traceback (most recent call last):
  File 
"/home/dje/cpython-buildarea/3.x.edelsohn-debian-z/build/Lib/sqlite3/test/backup.py",
 line 44, in test_bad_target_in_transaction
self.cx.backup(bck)
AssertionError: OperationalError not raised

--
status: closed -> open

___
Python tracker 

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



[issue33045] SSL Dcumentation Error

2018-03-10 Thread Matt Eaton

Change by Matt Eaton :


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

___
Python tracker 

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



[issue27645] Supporting native backup facility of SQLite

2018-03-10 Thread Berker Peksag

Berker Peksag  added the comment:

Thanks, Lele.

Note that Ned gave his permission to get this into 3.7.0b3 at 
https://github.com/python/cpython/pull/4238#issuecomment-371947334 We can, of 
course, still revert it before 3.7.0 final.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
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



[issue27645] Supporting native backup facility of SQLite

2018-03-10 Thread Berker Peksag

Berker Peksag  added the comment:


New changeset e8a5a92037b1f27809806bb87c17976d2d48d3e9 by Berker Peksag (Miss 
Islington (bot)) in branch '3.7':
bpo-27645: Add support for native backup facility of SQLite (GH-4238)
https://github.com/python/cpython/commit/e8a5a92037b1f27809806bb87c17976d2d48d3e9


--

___
Python tracker 

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



[issue33045] SSL Dcumentation Error

2018-03-10 Thread Matt Eaton

New submission from Matt Eaton :

I was reading through the SSL documentation and noticed a typo on Diffe-Hellman 
and wanted to clean it up.  

PR is coming soon.

--
assignee: docs@python
components: Documentation
messages: 313559
nosy: agnosticdev, docs@python
priority: normal
severity: normal
status: open
title: SSL Dcumentation Error
type: enhancement
versions: Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue27645] Supporting native backup facility of SQLite

2018-03-10 Thread miss-islington

Change by miss-islington :


--
pull_requests: +5825

___
Python tracker 

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



[issue27645] Supporting native backup facility of SQLite

2018-03-10 Thread Berker Peksag

Berker Peksag  added the comment:


New changeset d7aed4102d2a40c74553240c7f03585624d27aea by Berker Peksag 
(Emanuele Gaifas) in branch 'master':
bpo-27645: Add support for native backup facility of SQLite (GH-4238)
https://github.com/python/cpython/commit/d7aed4102d2a40c74553240c7f03585624d27aea


--

___
Python tracker 

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



[issue33044] pdb from base class, get inside a method of derived class

2018-03-10 Thread Ishan Srivastava

New submission from Ishan Srivastava :

I need to use `pdb.set_trace()` in the base class. It has a method:

```
def run(self, *args, **kwargs):
raise NotImplementedError
```
Since this base class is derived by many subclasses I don't know before hand 
which class' `run()` method I need to get inside. Also there is some pre 
processing of the arguments given to the `run()` method. So when `pdb` reaches 
the line,

```
q=self.run(arguments)
```

and I hit `s` it acts as if I have given the command `next`.

How can I get inside the derived class' `run()` method with `pdb` and debug the 
code over there?

--
components: Library (Lib)
messages: 313557
nosy: ishanSrt
priority: normal
severity: normal
status: open
title: pdb from base class, get inside a method of derived class
type: behavior
versions: Python 3.6

___
Python tracker 

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



[issue32367] [Security] CVE-2017-17522: webbrowser.py in Python does not validate strings

2018-03-10 Thread Ned Deily

Ned Deily  added the comment:

Update: https://security-tracker.debian.org/tracker/CVE-2017-17522

"** DISPUTED [...] NOTE: a software maintainer indicates that exploitation is 
impossible because the code relies on subprocess.Popen and the default 
shell=False setting."

--
nosy: +ned.deily

___
Python tracker 

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



[issue33015] Fix function cast warning in thread_pthread.h

2018-03-10 Thread Brett Cannon

Change by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

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



[issue33041] Issues with "async for"

2018-03-10 Thread miss-islington

miss-islington  added the comment:


New changeset d0826340d96e0953793b86d0b8475d2f43a280b6 by Miss Islington (bot) 
in branch '3.6':
[3.7] bpo-33041: Add missed error checks when compile "async for" (GH-6053) 
(GH-6060)
https://github.com/python/cpython/commit/d0826340d96e0953793b86d0b8475d2f43a280b6


--
nosy: +miss-islington

___
Python tracker 

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



[issue30249] improve struct.unpack_from's error message like struct.pack_into

2018-03-10 Thread Xiang Zhang

Change by Xiang Zhang :


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



[issue30249] improve struct.unpack_from's error message like struct.pack_into

2018-03-10 Thread Xiang Zhang

Xiang Zhang  added the comment:


New changeset c10b288f345aaef66d2c844924b9a576f9ea4f8b by Xiang Zhang in branch 
'master':
bpo-30249: Improve struct.unpack_from() error messages (GH-6059)
https://github.com/python/cpython/commit/c10b288f345aaef66d2c844924b9a576f9ea4f8b


--

___
Python tracker 

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



[issue33042] New 3.7 startup sequence crashes PyInstaller

2018-03-10 Thread Ned Deily

Change by Ned Deily :


--
nosy: +eric.snow, vstinner

___
Python tracker 

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



[issue33041] Issues with "async for"

2018-03-10 Thread miss-islington

Change by miss-islington :


--
pull_requests: +5824

___
Python tracker 

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



[issue33041] Issues with "async for"

2018-03-10 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 9e94c0d3c78d1bc582c865240ed9353fe9689b2a by Serhiy Storchaka in 
branch '3.7':
[3.7] bpo-33041: Add missed error checks when compile "async for" (GH-6053) 
(GH-6060)
https://github.com/python/cpython/commit/9e94c0d3c78d1bc582c865240ed9353fe9689b2a


--

___
Python tracker 

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



[issue32165] PyEval_InitThreads is called before Py_Initialize in LoadPython in Modules/_ctypes/callbacks.c

2018-03-10 Thread Ned Deily

Change by Ned Deily :


--
nosy: +amaury.forgeotdarc, belopolsky, meador.inge
stage:  -> patch review

___
Python tracker 

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



[issue27428] Document WindowsRegistryFinder inherits from MetaPathFinder

2018-03-10 Thread Himanshu Lakhara

Change by Himanshu Lakhara :


--
keywords: +patch
pull_requests: +5823
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



[issue33043] Add a 'Contributing to Docs' link at the bottom of docs.python.org

2018-03-10 Thread Ned Deily

Ned Deily  added the comment:

That's a good idea.  I see that there is already a "Found a bug?" link at the 
bottom of each doc page and that links to a page like:

https://docs.python.org/3/bugs.html

and that page has a Documentation Bugs section.  Perhaps adding a link or two 
in there would help.

--
nosy: +ned.deily

___
Python tracker 

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



[issue26680] Incorporating float.is_integer into the numeric tower and Decimal

2018-03-10 Thread Robert Smallshire

Robert Smallshire  added the comment:

I've recently run into this issue impeding duck-typing between int and float 
again, when used in conjunction the int.__pow__, which may variously return an 
int or float depending on the value - not the type - of the arguments.

This is succinctly demonstrated by this example:

  >>> (10 ** -2).is_integer()
  False
  >>> (10 ** 2).is_integer()
  Traceback (most recent call last):
File "", line 1, in 
  AttributeError: 'int' object has no attribute 'is_integer'

I hear the argument about Python being harder to learn if more methods are 
supported on the built-in types - and perhaps float.is_integer should never 
have been added, but now its there, but I think Python is harder to learn and 
teach in the presence of these differences. Is is harder to learn "Real numbers 
support an is_integer() method", than it is "float supports an is_integer() 
method"?

I'm happy to put in the work bring my original patches up-to-date, or create a 
PR depending on what current process is.

--

___
Python tracker 

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



[issue33014] Clarify str.isidentifier docstring; fix keyword.iskeyword docstring

2018-03-10 Thread Terry J. Reedy

Change by Terry J. Reedy :


--
versions: +Python 2.7, Python 3.6, Python 3.8

___
Python tracker 

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



[issue33014] Clarify str.isidentifier docstring; fix keyword.iskeyword docstring

2018-03-10 Thread Terry J. Reedy

Change by Terry J. Reedy :


--
nosy: +willingc -serhiy.storchaka
title: Clarify str.isidentifier docstring, fix keyword.iskeyword docstring -> 
Clarify str.isidentifier docstring; fix keyword.iskeyword docstring
versions:  -Python 2.7, Python 3.6, Python 3.8

___
Python tracker 

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



[issue33014] Clarify str.isidentifier docstring, fix keyword.iskeyword docstring

2018-03-10 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Debating historical design decisions that effectively cannot be changed is off 
topic for the tracker (but fair game on python-list).  However, I will explain 
this much.  The s.isxyz questions are answered by examining the characters and 
codepoints in s.  Answering iskeyword(s) requires reference to the collection 
of keywords, kwlist, which must be exposed to users, and which may change in 
any new version.  We usually attach constant data attributes to modules (other 
than builtins), and never (that I can think of) to built-in classes.  "def 
iskeyword(s): return s in kwlist:" belongs in the module with kwlist.

--
nosy:  -willingc
title: Clarify doc string for str.isidentifier() -> Clarify str.isidentifier 
docstring, fix keyword.iskeyword docstring

___
Python tracker 

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



[issue33041] Issues with "async for"

2018-03-10 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
pull_requests: +5822

___
Python tracker 

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



[issue33043] Add a 'Contributing to Docs' link at the bottom of docs.python.org

2018-03-10 Thread Carol Willing

New submission from Carol Willing :

Adding a 'Contributing to Docs' link at the bottom of the docs.python.org page 
between 'Reporting bugs' and 'About Documentation'.

This could link to the devguide section on contributing to docs or provide a 
short paragraph including:
- the importance of CPython docs as well as other Python projects (warehouse, 
popular libraries, etc.)
- link to the devguide and its section on documentation
- link to the core mentorship mailing list
- link to docs mailing list

As an example, the Rust project's Docs-Contributing page is a good start: 
https://www.rust-lang.org/en-US/contribute-docs.html

--
assignee: docs@python
components: Documentation
messages: 313549
nosy: docs@python, willingc
priority: normal
severity: normal
stage: needs patch
status: open
title: Add a 'Contributing to Docs' link at the bottom of docs.python.org

___
Python tracker 

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



[issue33014] Clarify doc string for str.isidentifier()

2018-03-10 Thread Carol Willing

Carol Willing  added the comment:

Terry's latest documentation suggestion sounds good and "explicit" by including 
an example.

David, I appreciate your doc suggestions. If it's befuddling you, it's likely 
doing the same for others.

CuriousLearner, do you wish to try to incorporate Terry's latest suggestions?

Thanks all.

--
nosy: +willingc
title: Clarify str.isidentifier docstring, fix keyword.iskeyword docstring -> 
Clarify doc string for str.isidentifier()

___
Python tracker 

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



[issue33037] Skip sending/receiving after SSL transport closing

2018-03-10 Thread Andrew Svetlov

Andrew Svetlov  added the comment:


New changeset 017e9fda922a143ac9f1601cbde05e80214852d2 by Andrew Svetlov in 
branch '3.6':
[3.6] bpo-33037: Skip sending/receiving after SSL transport closing (GH-6044) 
(GH-6058)
https://github.com/python/cpython/commit/017e9fda922a143ac9f1601cbde05e80214852d2


--

___
Python tracker 

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



[issue33042] New 3.7 startup sequence crashes PyInstaller

2018-03-10 Thread Hartmut Goebel

New submission from Hartmut Goebel :

PyInstaller is a tool for freezing Python applications into stand-alone 
packages, much like py2exe. py2app, and bbfreeze. PyInstaller is providing 
*one* bootloader for all versions of Python supported (2.7, 3.4-3.6).

In PyInstaller the startup sequence is implemented in
pyi_pylib_start_python() in bootloader/src/pyi_pythonlib.c. The workflow 
roughly is:

- SetProgramName
- SetPythonHome
- Py_SetPath
- Setting runtime options
  - some flags using the global variables
  - PySys_AddWarnOption -> crash
- Py_Initialize
- PySys_SetPath

The crash occurs due to tstate (thread state) not being initialized when
calling PySys_AddWarnOption.

--
components: Interpreter Core
messages: 313546
nosy: htgoebel
priority: normal
severity: normal
status: open
title: New 3.7 startup sequence crashes PyInstaller
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



[issue33040] Make itertools.islice supports negative values for start and stop arguments for sized iterable object

2018-03-10 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

I concur with Serhiy.  This doesn't make sense for itertools.

Marking this as closed. Thank you for the suggestion.

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



[issue33014] Clarify str.isidentifier docstring, fix keyword.iskeyword docstring

2018-03-10 Thread Terry J. Reedy

Change by Terry J. Reedy :


--
title: Clarify doc string for str.isidentifier() -> Clarify str.isidentifier 
docstring, fix keyword.iskeyword docstring

___
Python tracker 

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



[issue33014] Clarify doc string for str.isidentifier()

2018-03-10 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Part of my reason for closing is that we have an index entry "iskeyword() (in 
module keyword)"  to help anyone who tries the function as a method.  But I am 
reopening for 2 reasons:

 1. I think the following is a better improvement that reads better as well as 
being more informative.  I would be willing to merge it.

"Call keyword.iskeyword(s) to test whether string s is a reserved identifier, 
such as "def" or "class".

2. We should fix the buggy iskeyword docstring in 2.7 and 3.x.

>>> keyword.iskeyword.__doc__
'x.__contains__(y) <==> y in x.'

Replace with the doc entry: "Return true if s is a Python keyword."

--
resolution: rejected -> 
stage: resolved -> needs patch
status: closed -> open
type:  -> behavior
versions: +Python 2.7, Python 3.6, Python 3.8

___
Python tracker 

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



[issue33041] Issues with "async for"

2018-03-10 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 67ee07795bcd84b679c000780212d4d81a1490a3 by Serhiy Storchaka in 
branch 'master':
bpo-33041: Add missed error checks when compile "async for" (#6053)
https://github.com/python/cpython/commit/67ee07795bcd84b679c000780212d4d81a1490a3


--

___
Python tracker 

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



[issue30249] improve struct.unpack_from's error message like struct.pack_into

2018-03-10 Thread Xiang Zhang

Change by Xiang Zhang :


--
assignee:  -> xiang.zhang
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



[issue30249] improve struct.unpack_from's error message like struct.pack_into

2018-03-10 Thread Xiang Zhang

Change by Xiang Zhang :


--
keywords: +patch
pull_requests: +5821
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



[issue33037] Skip sending/receiving after SSL transport closing

2018-03-10 Thread Andrew Svetlov

Andrew Svetlov  added the comment:


New changeset bf0d1165174e8347b4d3a731c4e47e8288f1d01b by Andrew Svetlov (Miss 
Islington (bot)) in branch '3.7':
bpo-33037: Skip sending/receiving after SSL transport closing (GH-6044) 
(GH-6057)
https://github.com/python/cpython/commit/bf0d1165174e8347b4d3a731c4e47e8288f1d01b


--

___
Python tracker 

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



[issue33014] Clarify doc string for str.isidentifier()

2018-03-10 Thread David Beazley

David Beazley  added the comment:

s = 'Some String'
s.isalnum()
s.isalpha()
s.isdecimal()
s.isdigit()
s.isidentifier()
s.islower()
s.isnumeric()
s.isprintable()
s.isspace()
s.istitle()
s.isupper()

Not really sure where I would have gotten the idea that it might be referring 
to s.iskeyword().  But what do I know?  I'll stop submitting further 
suggestions.

--

___
Python tracker 

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



[issue33014] Clarify doc string for str.isidentifier()

2018-03-10 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

I don't think my suggestion is much better either, and I otherwise agree with 
Serhiy.  There are a thousand+ more important doc issues.

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



[issue33041] Issues with "async for"

2018-03-10 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 24d3201eb7f0b39a7eaf2a5b2a2ceca10ad1f8eb by Serhiy Storchaka in 
branch 'master':
bpo-33041: Fixed bytecode generation for "async for" with a complex target. 
(#6052)
https://github.com/python/cpython/commit/24d3201eb7f0b39a7eaf2a5b2a2ceca10ad1f8eb


--

___
Python tracker 

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



[issue33037] Skip sending/receiving after SSL transport closing

2018-03-10 Thread Andrew Svetlov

Change by Andrew Svetlov :


--
pull_requests: +5820

___
Python tracker 

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



[issue33041] Issues with "async for"

2018-03-10 Thread Yury Selivanov

Yury Selivanov  added the comment:

Thanks so much for looking into this, Serhiy!

> 2. StopAsyncIteration is dynamically looked up in globals. If set the global 
> StopAsyncIteration or delete it from builtins (for example at the shutdown 
> stage), this will break any "async for".

IIRC I adapted the approach from some other place in compile.c. Quick looking 
at it reveals that the `assert` statement is compiled in a similar way w.r.t. 
how AssertionError is looked up at runtime.  You might want to check if there 
are other places in compile.c that need to be fixed.

> PR 6052 fixes issue 1. I don't know what is the best place for tests. There 
> are two files with tests for "async for": test_coroutines.py and 
> test_asyncgen.py. I'm not sure that new tests use the simplest way for 
> testing this behavior. Could you please look at them Yury?

I think the new tests are fine.

--

___
Python tracker 

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



[issue26701] Documentation for int constructor mentions __int__ but not __trunc__

2018-03-10 Thread miss-islington

miss-islington  added the comment:


New changeset de8567e38c44b1509f0b906aec54437256848f14 by Miss Islington (bot) 
in branch '3.6':
bpo-26701: Improve documentation for the rounding special methods. (GH-6054)
https://github.com/python/cpython/commit/de8567e38c44b1509f0b906aec54437256848f14


--

___
Python tracker 

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



[issue26701] Documentation for int constructor mentions __int__ but not __trunc__

2018-03-10 Thread miss-islington

miss-islington  added the comment:


New changeset 89090789debb9d76892af566277cb71740808945 by Miss Islington (bot) 
in branch '3.7':
bpo-26701: Improve documentation for the rounding special methods. (GH-6054)
https://github.com/python/cpython/commit/89090789debb9d76892af566277cb71740808945


--
nosy: +miss-islington

___
Python tracker 

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



[issue33037] Skip sending/receiving after SSL transport closing

2018-03-10 Thread miss-islington

Change by miss-islington :


--
pull_requests: +5819

___
Python tracker 

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



[issue33037] Skip sending/receiving after SSL transport closing

2018-03-10 Thread Andrew Svetlov

Andrew Svetlov  added the comment:


New changeset 5e80a71ab67045fecec46573a1892e240b569ace by Andrew Svetlov in 
branch 'master':
bpo-33037: Skip sending/receiving after SSL transport closing (GH-6044)
https://github.com/python/cpython/commit/5e80a71ab67045fecec46573a1892e240b569ace


--

___
Python tracker 

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



[issue26701] Documentation for int constructor mentions __int__ but not __trunc__

2018-03-10 Thread miss-islington

Change by miss-islington :


--
pull_requests: +5818

___
Python tracker 

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



[issue26701] Documentation for int constructor mentions __int__ but not __trunc__

2018-03-10 Thread miss-islington

Change by miss-islington :


--
pull_requests: +5817

___
Python tracker 

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



[issue26701] Documentation for int constructor mentions __int__ but not __trunc__

2018-03-10 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 496431ffb6c29719332bf2af773349e8dd85e45a by Serhiy Storchaka in 
branch 'master':
bpo-26701: Improve documentation for the rounding special methods. (#6054)
https://github.com/python/cpython/commit/496431ffb6c29719332bf2af773349e8dd85e45a


--

___
Python tracker 

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



[issue12345] Add math.tau

2018-03-10 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
pull_requests:  -5816

___
Python tracker 

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



[issue33014] Clarify doc string for str.isidentifier()

2018-03-10 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

If this docstring needs an improvement Terry's wording LGTM. I'm -1 for further 
complicating it.

Where did you get the idea that iskeyword() is a string method? Nothing in the 
docstring points to this. "keyword" is not used as an alias of "str". It is not 
used anywhere else in the docstring at all.

I think this is an attempt to solve a non-problem.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue26701] Documentation for int constructor mentions __int__ but not __trunc__

2018-03-10 Thread Nick Coghlan

Nick Coghlan  added the comment:


New changeset 1028ca4f04c14cf40a8f3e7951623a96ec0143c2 by Nick Coghlan (Miss 
Islington (bot)) in branch '3.6':
bpo-26701: Add documentation for __trunc__ (GH-6050)
https://github.com/python/cpython/commit/1028ca4f04c14cf40a8f3e7951623a96ec0143c2


--

___
Python tracker 

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



[issue26701] Documentation for int constructor mentions __int__ but not __trunc__

2018-03-10 Thread Nick Coghlan

Nick Coghlan  added the comment:


New changeset f34e0d60e27acff3f9604ec63e9de36878c3743a by Nick Coghlan (Miss 
Islington (bot)) in branch '3.7':
bpo-26701: Add documentation for __trunc__ (GH-6049)
https://github.com/python/cpython/commit/f34e0d60e27acff3f9604ec63e9de36878c3743a


--

___
Python tracker 

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



[issue12345] Add math.tau

2018-03-10 Thread TitanSnow

Change by TitanSnow :


--
pull_requests: +5816

___
Python tracker 

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



[issue32917] ConfigParser writes a superfluous final blank line

2018-03-10 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

If there is no real problem, I think it is not worth to change this.

--
resolution:  -> rejected
status: open -> pending

___
Python tracker 

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



[issue26701] Documentation for int constructor mentions __int__ but not __trunc__

2018-03-10 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
pull_requests: +5815

___
Python tracker 

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



[issue32993] urllib and webbrowser.open() can open w/ file: protocol

2018-03-10 Thread yao zhihua

yao zhihua  added the comment:

Here about webbrowser vulnerability.
https://bugs.python.org/issue32367

You could execute command with file protocols in python 2.7.10.

poc :
import webbrowser, os
filename = "/bin/ls"
webbrowser.open(os.path.realpath(filename))

If python has fixed this vulnerability,why can I access file:///etc/passwd? But 
I can't access /etc/shadow.Is this it fixed incomplete?

--

___
Python tracker 

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



[issue32993] urllib and webbrowser.open() can open w/ file: protocol

2018-03-10 Thread yao zhihua

yao zhihua  added the comment:

Borrow what others have said from Issue11662.

The Python urllib and urllib2 modules are typically used to fetch web
pages but by default also contains handlers for ftp:// and file:// URL
schemes.

Now unfortunately it appears that it is possible for a web server to
redirect (HTTP 302) a urllib request to any of the supported
schemes. Examples on how this could turn bad:

 1) File disclosure: A web application, that normally fetches and
 displays a web page, is redirected to file:///etc/passwd and
 discloses it.

 2) Denial of Service: An application is redirected to a system device
 (e.g. file:///dev/zero) which will result in excessive CPU/memory/disk
 usage.

--

___
Python tracker 

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



[issue33041] Issues with "async for"

2018-03-10 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

PR 6052 fixes issue 1. I don't know what is the best place for tests. There are 
two files with tests for "async for": test_coroutines.py and test_asyncgen.py. 
I'm not sure that new tests use the simplest way for testing this behavior. 
Could you please look at them Yury?

PR 6053 fixes issue 4. Adds missed error checks, removes unused variables and 
removes generating redundant bytecode.

--

___
Python tracker 

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



[issue33041] Issues with "async for"

2018-03-10 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
pull_requests: +5814

___
Python tracker 

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



[issue33041] Issues with "async for"

2018-03-10 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue33041] Issues with "async for"

2018-03-10 Thread Serhiy Storchaka

New submission from Serhiy Storchaka :

There is a number of issues with "async for".

1. When assigning to the target raises StopAsyncIteration (in custom 
__setitem__, __setattr__ or __iter__) it will be silenced and will cause to 
stop iteration.

2. StopAsyncIteration is dynamically looked up in globals. If set the global 
StopAsyncIteration or delete it from builtins (for example at the shutdown 
stage), this will break any "async for".

3. The f_lineno setter doesn't handle jumping into or out of the "async for" 
block. Jumping into is not forbidden, and jumping out doesn't update the stack 
correctly. This can cause a crash or incorrect behavior (like iterating wrong 
loop).

4. The compiler doesn't check all errors when creating new blocks. Some blocks 
are not used. And the resulting bytecode is suboptimal.

I'll create a series of pull request for fixing all this issue. Some of them 
can be backported. Others require changes in bytecode or are too hard for 
implementing in 3.7 and earlier versions (the related code was changed in 
issue17611). Some of them depend on other PRs or other issues (like issue33026) 
and need to wait until their be merged.

--
assignee: serhiy.storchaka
components: Interpreter Core
messages: 313526
nosy: serhiy.storchaka, yselivanov
priority: normal
severity: normal
status: open
title: Issues with "async for"
type: crash
versions: Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue32917] ConfigParser writes a superfluous final blank line

2018-03-10 Thread TitanSnow

TitanSnow  added the comment:

For the case of sequential writes to the same file,
I think it’s a invalid use case.
The file can be created or modified by
user or other applications, breaking the assume of
ConfigParser. It’s better to have a method to merge
two ConfigParser objects then writes it into the file
at one time.

--

___
Python tracker 

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



[issue33018] Improve issubclass() error checking and message

2018-03-10 Thread Alexey Izbyshev

Alexey Izbyshev  added the comment:

I agree except that I'd like to see it in 3.7 too.

--

___
Python tracker 

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



[issue33018] Improve issubclass() error checking and message

2018-03-10 Thread INADA Naoki

INADA Naoki  added the comment:

My current opinion is:

* -1 for 3.6:  Behavior should not be changed without strong reason, even the 
behavior is not documented.
* +1 for 3.8:  I like strict and less magic.
* +0 for 3.7:  beta3 is bit late, but this change has very little chance to 
cause real world problem.

--

___
Python tracker 

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



[issue33039] int() and math.trunc don't accept objects that only define __index__

2018-03-10 Thread Nick Coghlan

Nick Coghlan  added the comment:

Marking this as a documentation enhancement request for now, but I think we 
should also consider changing the type creation behaviour in 3.8 to implicitly 
add __int__ and __trunc__ definitions when __index__ is defined, but they 
aren't.

That way, no behaviour will change for classes that explicitly define __int__ 
or __trunc__, but classes that only define __index__ without defining the other 
methods will behave more intuitively.

--
assignee:  -> docs@python
components: +Documentation
nosy: +docs@python
stage:  -> needs patch
type:  -> enhancement
versions: +Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue32917] ConfigParser writes a superfluous final blank line

2018-03-10 Thread TitanSnow

TitanSnow  added the comment:

> But I didn't thought that a superfluous final blank line causes any problems. 
> What software has a problem with it?

Currently I have not found a program that has problem with
the superfluous final blank line, and I think there won’t be.

> Removing the final blank line can harm the readability in the case of 
> sequential writes to the same file

Sorry that I have not thought about this.
In this way, the prev patch that adds two new parameters might be better.

> Remind me, why do we care about that extra blank line?

Well, though it seems that that extra blank line won’t cause any problem,
it does not look nice I think, and is different with INI files written
by other applications.

--

___
Python tracker 

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



  1   2   >