[issue32909] ApplePersistenceIgnoreState warning on macOS

2018-02-23 Thread Ronald Oussoren

Ronald Oussoren  added the comment:

The ApplePersistenceIgnoreState setting (either in user defaults or an 
info.plist file) is IMHO not the right solution, as this is a setting intended 
to be used for testing (see 
)

I don't have time to research this fully at this time, but expect that this is 
something that should be fixed in GUI libraries (or possibly matplotlib).

--

___
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-02-23 Thread TitanSnow

TitanSnow  added the comment:

Patch updated, included documentation and tests.

--
Added file: https://bugs.python.org/file47461/bpo-32917.patch

___
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-02-23 Thread TitanSnow

Change by TitanSnow :


Removed file: https://bugs.python.org/file47460/final_blank_line.patch

___
Python tracker 

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



[issue32916] IDLE: change 'str' to 'code' in idlelib.pyparse.PyParse and users

2018-02-23 Thread Cheryl Sabella

Cheryl Sabella  added the comment:

Yes, I agree.  I'll start working on this one first.

--

___
Python tracker 

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



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

2018-02-23 Thread Louis Lecaroz

Louis Lecaroz  added the comment:

Hi,

First of all, thank you so much for having fixed this bug, I checked in 3.5 & 
it seems that this fix needs to be also backport in 3.5 branch & certainly 
others branches (like 3.4) ?

Thx in advance for your coming feedback
Best regards
Louis

--
nosy: +llecaroz
versions: +Python 3.4, Python 3.5

___
Python tracker 

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



[issue32911] Doc strings omitted from AST

2018-02-23 Thread Mark Shannon

Mark Shannon  added the comment:

Serhiy, thanks for reopening this issue.

It seems to be that there are three reasonable choices:
1. Revert to 3.6 behaviour, with the addition of `docstring` attribute.
2. Change the docstring attribute to an AST node, possibly by modifying the 
grammar.
3. Do nothing.

I would prefer 1, as it requires no changes to 3rd party code and doesn't 
present an additional obstacle when porting from Python 2.

2 would be acceptable, as it allows tools to easily convert the body back to 
its 3.6 form (or vice-versa)

3 is a pain as it involves re-tokenizing the file to get the location of the 
doc-string.

--

___
Python tracker 

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



[issue32920] Implement PEP 529 for os.getcwdb on Windows

2018-02-23 Thread Alexey Izbyshev

Change by Alexey Izbyshev :


--
nosy: +izbyshev

___
Python tracker 

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



[issue32759] multiprocessing.Array do not release shared memory

2018-02-23 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Ok, this is because the multiprocessing Heap object never releases any unused 
arena objects, so the shared memory you allocate will probably stay allocated 
until the process tree ends.

It is possible to change the strategy to delete unused arenas, though it's 
unsure whether doing so has adverse consequences (such as making later 
allocations costlier).  It may make sense to only reclaim the larger arenas 
(larger than 1MB perhaps?).

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

___
Python tracker 

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



[issue30028] make test.support.temp_cwd() fork-safe

2018-02-23 Thread Anselm Kruis

Change by Anselm Kruis :


--
pull_requests: +5603

___
Python tracker 

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



[issue32886] new Boolean ABC in numbers module

2018-02-23 Thread Mark Dickinson

Mark Dickinson  added the comment:

> and a minimal representation of boolean logic operations that will seem 
> natural to anyone, don't you think ?

I'm afraid I don't. :-(

Issue 1: this ABC doesn't seem a good match for Python bools. If I have a 
bool-like object in a piece of code, my main expectations of that object would 
be that (a) it can be interpreted in a boolean context (e.g., the condition of 
an if statement, a while statement, an if-else expression, a std. lib. call 
that expects a bool, etc.), and (b) it can be combined with other bool-likes 
via `and`, `or` and `not`. All I need for (a) and (b) to work is that 
`__bool__` is defined. The *bitwise* operations provided by `__and__`, `__or__` 
and friends are irrelevant for these purposes, and for Python's bool they exist 
mainly because bool is a subclass of int, and not to provide logical boolean 
operations. (NumPy's take on this is a bit different, because of the issues 
involved with interpreting an array of booleans in boolean context.)

Issue 2: an interface that includes `|`, `&` and `^` but not `~` seems 
incomplete. If I *am* aiming to do bitwise operations with an object (as 
opposed to logical operations) then I'd probably expect `~` to be present. 
(Admittedly, there are cases that support `|`, `^` and `&` but not `~`, like 
sets.)

Perhaps there's a place for an interface that declares that an object supports 
the *bitwise* operators: `|`, `&`, `^` and `~`. We *do* have more than one 
concrete class here that would implement such an interface: Python's integer 
types, NumPy's integer types, NumPy's `bool_` type, potentially other things 
that resemble fixed-length bit-strings (like IP addresses or collections of 
flags). But I wouldn't call such an interface "Boolean", and wouldn't expect 
Python's built-in bool type to be registered as supporting that interface.

So overall, call me -1 on this proposal.

--

___
Python tracker 

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



[issue32759] multiprocessing.Array do not release shared memory

2018-02-23 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

It is also possible to uncommit the memory without deallocating it, making 
reuse potentially faster, but that requires low-level platform-specific code 
(e.g. madvise(MADV_DONTNEED) on Linux or DiscardVirtualMemory() on Windows).

--

___
Python tracker 

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



[issue30028] make test.support.temp_cwd() fork-safe

2018-02-23 Thread Anselm Kruis

Change by Anselm Kruis :


--
pull_requests: +5604

___
Python tracker 

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



[issue32911] Doc strings omitted from AST

2018-02-23 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

I prefer 2 or 3. There are benefits from representing a docstring as a separate 
attribute. This simplifies the code for walking the AST tree (no longer special 
cases for skipping docstring in modules, classes and functions) and the code 
for retrieving a docstring. It solves the problem that an expression resulting 
to a constant string (like "a"+"b" or f"a") shouldn't be interpreted as 
docstrings.

The position of a docstring can be useful for determining the position of 
fragments inside a docstring (for example for doctests). Several active 
developed third-party libraries (like pyflakes, see 
https://github.com/PyCQA/pyflakes/pull/273) already updated their code for 
supporting 3.7. The position of nodes preceding or following a docstring could 
be used. This is not perfect, it doesn't work with empty lines before or after 
docstring, but it never was perfect due to escaped newlines in string literals 
and line continuations.

--

___
Python tracker 

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



[issue32759] multiprocessing.Array do not release shared memory

2018-02-23 Thread Antoine Pitrou

Change by Antoine Pitrou :


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

___
Python tracker 

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



[issue32911] Doc strings omitted from AST

2018-02-23 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Note, that getting the location of the dostring already was a pain since in 
case of multiline string literals CPython saves the location of the last line, 
and PyPy saves the location of the first line. Getting the location of the 
specific fragment of the docstring is even larger pain as shown in following 
examples:

def f()
"""
>>> f()
"""

def f()
"""\
>>> f()
"""

def f()
""\
""\
">>> f()"\
""\
""

--

___
Python tracker 

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



[issue31355] Remove Travis CI macOS job: rely on buildbots

2018-02-23 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

The situation with macOS builds on Travis-CI is now much better (no more long 
waiting queues) so we might revisit this decision.

--
status: closed -> pending

___
Python tracker 

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



[issue32087] deprecated-removed directive generates overlapping msgids in .pot files

2018-02-23 Thread INADA Naoki

INADA Naoki  added the comment:


New changeset 0febc053736112d7bb9081742b3ac0ece7b973e7 by INADA Naoki 
(cocoatomo) in branch 'master':
bpo-32087: Doc: Make "deprecated-removed"  directive translatable (GH-4473)
https://github.com/python/cpython/commit/0febc053736112d7bb9081742b3ac0ece7b973e7


--
nosy: +inada.naoki

___
Python tracker 

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



[issue32087] deprecated-removed directive generates overlapping msgids in .pot files

2018-02-23 Thread miss-islington

Change by miss-islington :


--
pull_requests: +5606

___
Python tracker 

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



[issue32087] deprecated-removed directive generates overlapping msgids in .pot files

2018-02-23 Thread miss-islington

Change by miss-islington :


--
pull_requests: +5607

___
Python tracker 

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



[issue32087] deprecated-removed directive generates overlapping msgids in .pot files

2018-02-23 Thread miss-islington

miss-islington  added the comment:


New changeset c673a62d5f3c650130bf40f2161a2eac64419bce by Miss Islington (bot) 
in branch '3.7':
bpo-32087: Doc: Make "deprecated-removed"  directive translatable (GH-4473)
https://github.com/python/cpython/commit/c673a62d5f3c650130bf40f2161a2eac64419bce


--
nosy: +miss-islington

___
Python tracker 

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



[issue32087] deprecated-removed directive generates overlapping msgids in .pot files

2018-02-23 Thread INADA Naoki

Change by INADA Naoki :


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



[issue32087] deprecated-removed directive generates overlapping msgids in .pot files

2018-02-23 Thread miss-islington

miss-islington  added the comment:


New changeset dd52d5c868fb1eb33bcf22e777317de0391bfaf6 by Miss Islington (bot) 
in branch '3.6':
bpo-32087: Doc: Make "deprecated-removed"  directive translatable (GH-4473)
https://github.com/python/cpython/commit/dd52d5c868fb1eb33bcf22e777317de0391bfaf6


--

___
Python tracker 

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



[issue32916] IDLE: change 'str' to 'code' in idlelib.pyparse.PyParse and users

2018-02-23 Thread Cheryl Sabella

Change by Cheryl Sabella :


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



[issue32921] .pth files cannot contain folders with utf-8 names

2018-02-23 Thread Einar Fredriksen

New submission from Einar Fredriksen :

Add "G:\русский язык" to a pth file and start python. it fails with 

--
Failed to import the site module
Traceback (most recent call last):
  File "C:\Program Files\ROXAR\RMS 
dev_release\windows-amd64-vc_14_0-release\bin\lib\site.py", line 546, in 

main()
  File "C:\Program Files\ROXAR\RMS 
dev_release\windows-amd64-vc_14_0-release\bin\lib\site.py", line 532, in main
known_paths = addusersitepackages(known_paths)
  File "C:\Program Files\ROXAR\RMS 
dev_release\windows-amd64-vc_14_0-release\bin\lib\site.py", line 287, in 
addusersitepackages
addsitedir(user_site, known_paths)
  File "C:\Program Files\ROXAR\RMS 
dev_release\windows-amd64-vc_14_0-release\bin\lib\site.py", line 209, in 
addsitedir
addpackage(sitedir, name, known_paths)
  File "C:\Program Files\ROXAR\RMS 
dev_release\windows-amd64-vc_14_0-release\bin\lib\site.py", line 165, in 
addpackage
for n, line in enumerate(f):
  File "C:\Program Files\ROXAR\RMS 
dev_release\windows-amd64-vc_14_0-release\bin\lib\encodings\cp1252.py", line 
23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 8: 
character maps to 


This might very well have sideeffects, but adding "encoding='utf-8'" to the 
open() call in site.py def addpackage seems to fix the issue for me

--
components: Unicode
messages: 312635
nosy: einaren, ezio.melotti, vstinner
priority: normal
severity: normal
status: open
title: .pth files cannot contain folders with utf-8 names
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



[issue32922] dbm.open() encodes filename with default encoding rather than the filesystem encoding

2018-02-23 Thread Josh Friend

New submission from Josh Friend :

Armin Rigo from the PyPy project pointed this out to me: 
https://bitbucket.org/pypy/pypy/issues/2755/dbmopen-expects-a-str-for-filename-throws

This could probably lead to some weird behavior given the right filename

--
components: Library (Lib)
messages: 312636
nosy: Josh Friend
priority: normal
severity: normal
status: open
title: dbm.open() encodes filename with default encoding rather than the 
filesystem encoding
type: behavior
versions: Python 2.7, Python 3.6

___
Python tracker 

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



[issue32922] dbm.open() encodes filename with default encoding rather than the filesystem encoding

2018-02-23 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue32923] Typo in documentation of unittest: whilst instead of while

2018-02-23 Thread Тимофей Хирьянов

New submission from Тимофей Хирьянов :

Typo is on the https://docs.python.org/3/library/unittest.html page.

At bottom of the page you can see text: "unittest.removeHandler(function=None)
When called without arguments this function removes the control-c handler if it 
has been installed. This function can also be used as a test decorator to 
temporarily remove the handler whilst the test is being executed:"

Typo is: ST instead of E in the word "whilst".

--
assignee: docs@python
components: Documentation
messages: 312637
nosy: docs@python, Тимофей Хирьянов
priority: normal
severity: normal
status: open
title: Typo in documentation of unittest: whilst instead of while
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



[issue32911] Doc strings no longer stored in body of AST

2018-02-23 Thread ppperry

Change by ppperry :


--
title: Doc strings omitted from AST -> Doc strings no longer stored in body of 
AST

___
Python tracker 

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



[issue32923] Typo in documentation of unittest: whilst instead of while

2018-02-23 Thread Mark Dickinson

Mark Dickinson  added the comment:

Not a typo: it's a valid English word.

http://dictionary.cambridge.org/grammar/british-grammar/linking-words-and-expressions/while-and-whilst

--
nosy: +mark.dickinson

___
Python tracker 

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



[issue32901] Update 3.7 and 3.8 Windows and macOS installer builds to tcl/tk 8.6.8

2018-02-23 Thread miss-islington

Change by miss-islington :


--
pull_requests: +5609

___
Python tracker 

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



[issue32901] Update 3.7 and 3.8 Windows and macOS installer builds to tcl/tk 8.6.8

2018-02-23 Thread Steve Dower

Steve Dower  added the comment:

The sources are just the original sources, so they could be useful on other 
platforms too.

The build on cpython-bin-deps is obviously only useful on Windows.

--

___
Python tracker 

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



[issue30028] make test.support.temp_cwd() fork-safe

2018-02-23 Thread Gregory P. Smith

Gregory P. Smith  added the comment:


New changeset 61bd4d2e6319a3c5c3b9ce5f807b44a45cc1d4a1 by Gregory P. Smith 
(Anselm Kruis) in branch '2.7':
[2.7] bpo-30028: make test.support.temp_cwd() fork-safe (GH-1066) (GH-5825)
https://github.com/python/cpython/commit/61bd4d2e6319a3c5c3b9ce5f807b44a45cc1d4a1


--

___
Python tracker 

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



[issue30028] make test.support.temp_cwd() fork-safe

2018-02-23 Thread Gregory P. Smith

Gregory P. Smith  added the comment:


New changeset 9c819a6a7d34594779fea3a25fd69ec5745e185e by Gregory P. Smith 
(Anselm Kruis) in branch '3.6':
[3.6] bpo-30028: make test.support.temp_cwd() fork-safe (GH-1066) (GH-5826)
https://github.com/python/cpython/commit/9c819a6a7d34594779fea3a25fd69ec5745e185e


--

___
Python tracker 

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



[issue30028] make test.support.temp_cwd() fork-safe

2018-02-23 Thread Gregory P. Smith

Change by Gregory P. Smith :


--
resolution:  -> fixed
stage: patch review -> commit review
status: open -> closed
versions: +Python 2.7, Python 3.8 -Python 3.5

___
Python tracker 

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



[issue32901] Update 3.7 and 3.8 Windows and macOS installer builds to tcl/tk 8.6.8

2018-02-23 Thread Steve Dower

Steve Dower  added the comment:


New changeset efa6c762268d68985f3012234f62ea9e5ced8b7c by Steve Dower in branch 
'master':
bpo-32901: Update Tcl and Tk versions to 8.6.8 (GH-5823)
https://github.com/python/cpython/commit/efa6c762268d68985f3012234f62ea9e5ced8b7c


--

___
Python tracker 

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



[issue32901] Update 3.7 and 3.8 Windows and macOS installer builds to tcl/tk 8.6.8

2018-02-23 Thread miss-islington

miss-islington  added the comment:


New changeset 74b73642596caa287ee59bf7901ca009606c24cc by Miss Islington (bot) 
in branch '3.7':
bpo-32901: Update Tcl and Tk versions to 8.6.8 (GH-5823)
https://github.com/python/cpython/commit/74b73642596caa287ee59bf7901ca009606c24cc


--
nosy: +miss-islington

___
Python tracker 

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



[issue32923] Typo in documentation of unittest: whilst instead of while

2018-02-23 Thread Mariatta Wijaya

Mariatta Wijaya  added the comment:

`while` and `whilst` are both valid english words, however I can understand if 
readers who don't primarily speak english can get confused.

I'll be open to change that to `while` just to make it friendlier to 
international readers.

--
nosy: +Mariatta
versions: +Python 2.7, 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



[issue32924] Python 3.7 docs in docs.p.o points to GitHub's master branch

2018-02-23 Thread Mariatta Wijaya

New submission from Mariatta Wijaya :

When viewing Python 3.7 docs in docs.python.org, the show source link is 
pointing to the master branch on GitHub. It should point to the 3.7 branch.

I'm working on a fix, however this is something to we should remember doing 
when we go to 3.9+. 

Adding Python 3.8 and 3.9's release manager :)

--
assignee: Mariatta
components: Documentation
messages: 312645
nosy: Mariatta, lukasz.langa
priority: normal
severity: normal
status: open
title: Python 3.7 docs in docs.p.o points to GitHub's master branch
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



[issue25427] Remove the pyvenv script in Python 3.8

2018-02-23 Thread Brett Cannon

Brett Cannon  added the comment:

Oh, I haven't forgotten. :) This issue is the only one I have assigned to 
myself and been looking forward to ripping it out for over 2 years (might not 
get to it until the sprints at PyCon US, but I will definitely be ripping it 
out).

--

___
Python tracker 

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



[issue31355] Remove Travis CI macOS job: rely on buildbots

2018-02-23 Thread Brett Cannon

Brett Cannon  added the comment:

I'm willing to give it another go. Do you want to open a PR to turn it back on 
and see how the timing looks, Antoine?

--
status: pending -> open

___
Python tracker 

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



[issue32922] dbm.open() encodes filename with default encoding rather than the filesystem encoding

2018-02-23 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka

___
Python tracker 

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



[issue32923] Typo in documentation of unittest: whilst instead of while

2018-02-23 Thread Eric V. Smith

Eric V. Smith  added the comment:

Agree with Marietta: it's valid, but lets change it to make it more 
approachable to non-native speakers.

--
nosy: +eric.smith

___
Python tracker 

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



[issue32922] dbm.open() encodes filename with default encoding rather than the filesystem encoding

2018-02-23 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue32922] dbm.open() encodes filename with default encoding rather than the filesystem encoding

2018-02-23 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

PR 5832 fixes dbm.ndbm.open() and dbm.gdbm.open(). dbm.dumb.open() already used 
the filesystem encoding.

I don't think anything should be fixed in 2.7. Supporting Unicode filenames 
looks like a new feature.

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

___
Python tracker 

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



[issue32923] Typo in documentation of unittest: whilst instead of while

2018-02-23 Thread Mariatta Wijaya

Change by Mariatta Wijaya :


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

___
Python tracker 

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



[issue32924] Python 3.7 docs in docs.p.o points to GitHub's master branch

2018-02-23 Thread Mariatta Wijaya

Change by Mariatta Wijaya :


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

___
Python tracker 

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



[issue32923] Typo in documentation of unittest: whilst instead of while

2018-02-23 Thread Mark Dickinson

Mark Dickinson  added the comment:

> lets change it to make it more approachable to non-native speakers.

Sounds good to me.

--

___
Python tracker 

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



[issue32820] Add __format__ method to ipaddress

2018-02-23 Thread Eric V. Smith

Eric V. Smith  added the comment:

I'd like 's' to be supported, and just be passed to format(str(self), fmt) (or 
some alternate spelling for the same thing).

My use case is to format tables including addresses:

print(f'{addr:20s} {hostname}')

--

___
Python tracker 

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



[issue20928] xml.etree.ElementInclude does not include nested xincludes

2018-02-23 Thread Stefan Behnel

Stefan Behnel  added the comment:

I've added a 'max_depth' argument to limit the maximum recursive include depth 
to 6 by default (which is a small, arbitrarily chosen value). Users can set it 
to None to disable the limit.

>From my side, I don't see any more features that I would add.
@ruffsl: feel free to open a new ticket if you feel like anything is missing 
that is not covered by the scope of this one.

--

___
Python tracker 

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



[issue32923] Typo in documentation of unittest: whilst instead of while

2018-02-23 Thread Mariatta Wijaya

Mariatta Wijaya  added the comment:


New changeset 98f42aac23f3863973cb6e9964c5212cfd3a1d98 by Mariatta in branch 
'master':
bpo-32923: Unittest doc: replace `whilst` with `while` (GH-5833)
https://github.com/python/cpython/commit/98f42aac23f3863973cb6e9964c5212cfd3a1d98


--

___
Python tracker 

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



[issue32820] Add __format__ method to ipaddress

2018-02-23 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

You always can use f'{addr!s:20}'.

--

___
Python tracker 

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



[issue32923] Typo in documentation of unittest: whilst instead of while

2018-02-23 Thread miss-islington

Change by miss-islington :


--
pull_requests: +5614

___
Python tracker 

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



[issue32923] Typo in documentation of unittest: whilst instead of while

2018-02-23 Thread miss-islington

Change by miss-islington :


--
pull_requests: +5615

___
Python tracker 

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



[issue32923] Typo in documentation of unittest: whilst instead of while

2018-02-23 Thread miss-islington

Change by miss-islington :


--
pull_requests: +5613

___
Python tracker 

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



[issue17232] Improve -O docs

2018-02-23 Thread Cheryl Sabella

Change by Cheryl Sabella :


--
pull_requests: +5616
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



[issue32924] Python 3.7 docs in docs.p.o points to GitHub's master branch

2018-02-23 Thread Mariatta Wijaya

Mariatta Wijaya  added the comment:


New changeset 079d75d099f228a4261f63a94217571e05e8fa8e by Mariatta in branch 
'3.7':
bpo-32924: Fix the Show Source url in the docs. (GH-5835)
https://github.com/python/cpython/commit/079d75d099f228a4261f63a94217571e05e8fa8e


--

___
Python tracker 

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



[issue32924] Python 3.7 docs in docs.p.o points to GitHub's master branch

2018-02-23 Thread Mariatta Wijaya

Mariatta Wijaya  added the comment:

The link has been fixed, it affects 3.7 branch only.

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



[issue32923] Typo in documentation of unittest: whilst instead of while

2018-02-23 Thread Mariatta Wijaya

Mariatta Wijaya  added the comment:

Thanks! I've fixed it on master, the backports have been initiated and will 
finish automatically.

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



[issue17232] Improve -O docs

2018-02-23 Thread Cheryl Sabella

Cheryl Sabella  added the comment:

I've made a PR and tried to integrate the changes from PEP 488.

--

___
Python tracker 

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



[issue32923] Typo in documentation of unittest: whilst instead of while

2018-02-23 Thread miss-islington

miss-islington  added the comment:


New changeset 1ad6ca5eb95ebb7351e0f5d9ce607dec54de6407 by Miss Islington (bot) 
in branch '3.7':
bpo-32923: Unittest doc: replace `whilst` with `while` (GH-5833)
https://github.com/python/cpython/commit/1ad6ca5eb95ebb7351e0f5d9ce607dec54de6407


--
nosy: +miss-islington

___
Python tracker 

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



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

2018-02-23 Thread Éric Araujo

Éric Araujo  added the comment:

3.5 only accepts security fixes:
https://devguide.python.org/#status-of-python-branches

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

___
Python tracker 

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



[issue32923] Typo in documentation of unittest: whilst instead of while

2018-02-23 Thread miss-islington

miss-islington  added the comment:


New changeset cffe0467ab7b164739693598826bd3860f01b11f by Miss Islington (bot) 
in branch '3.6':
bpo-32923: Unittest doc: replace `whilst` with `while` (GH-5833)
https://github.com/python/cpython/commit/cffe0467ab7b164739693598826bd3860f01b11f


--

___
Python tracker 

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



[issue32923] Typo in documentation of unittest: whilst instead of while

2018-02-23 Thread miss-islington

miss-islington  added the comment:


New changeset 8a7f1f4b0ffddf230864ebf16b481546970dd9c2 by Miss Islington (bot) 
in branch '2.7':
bpo-32923: Unittest doc: replace `whilst` with `while` (GH-5833)
https://github.com/python/cpython/commit/8a7f1f4b0ffddf230864ebf16b481546970dd9c2


--

___
Python tracker 

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



[issue32820] Add __format__ method to ipaddress

2018-02-23 Thread Eric V. Smith

Eric V. Smith  added the comment:

True enough. You'd think that I (of all people!) would know that. Nevermind.

--

___
Python tracker 

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



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

2018-02-23 Thread Éric Araujo

Change by Éric Araujo :


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



[issue32922] dbm.open() encodes filename with default encoding rather than the filesystem encoding

2018-02-23 Thread Armin Rigo

Armin Rigo  added the comment:

It's not a new feature.  See for example all functions from posixmodule.c: it 
should at least be PyArg_ParseTuple(args, "et", Py_FileSystemDefaultEncoding, 
&char_star_variable).

--
nosy: +arigo

___
Python tracker 

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



[issue32838] Fix Python versions in the table of magic numbers

2018-02-23 Thread miss-islington

miss-islington  added the comment:


New changeset 8d9d4b57ae57baee4401cab6067ef22c0172661d by Miss Islington (bot) 
in branch '3.7':
bpo-32838: Fix Python versions in the table of magic numbers. (GH-5658)
https://github.com/python/cpython/commit/8d9d4b57ae57baee4401cab6067ef22c0172661d


--
nosy: +miss-islington

___
Python tracker 

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



[issue32915] Running Python 2 with -3 flag doesn't complain about cmp/__cmp__

2018-02-23 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

The stated goal of -3 is "warn about Python 3.x incompatibilities that 2to3 
cannot trivially fix", so this use case seems like a good match.

On the other hand, adding this to -3 would be somewhat noisy since __cmp__ is 
pervasive in 2.7.

--
nosy: +rhettinger

___
Python tracker 

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



[issue32820] Add __format__ method to ipaddress

2018-02-23 Thread Eric Osborne

Eric Osborne  added the comment:

I dunno, I think this might be useful.  A binary representation is itself a
string, and takes formatting as such (ditto for hex, as hex(int()) returns
a string:

In [20]: a
Out[20]: IPv4Address('1.2.3.4')

In [92]: f'{a}'
Out[92]: '1.2.3.4'

In [21]: int(a)
Out[21]: 16909060

In [22]: f'{bin(int(a)):42s}'
Out[22]: '0b1001000110100   '

In [24]: f'{a:b}'
Out[24]: '0001001000110100'

In [25]: f'{a:b42s}'
Out[25]: '1.2.3.4'

That last one should return '1001000110100'.  I was
worried about going down a really deep rabbit hole trying to support a lot
of string format stuff with no use case, but there's not much more which
could be done which makes any sense.  's' seems reasonable.

My current code supports [b, x, n] integer presentation types.  I need to
add [X], that's just an oversight.  Supporting [b, x, X, n] means that an
IP address is considered an integer, and should get the subset of integer
presentations which make sense. Not the full set - neither octal nor
character are good fits.  But support for some sort of alignment padding
seems reasonable.  Consider:

In [61]: f'{42:30}'
Out[61]: '42'

In [62]: f'{int(a):30}'
Out[62]: '  16909060'

In [63]: f'{a:30}'
Out[63]: '1.2.3.4'

In [66]: f'{a:42b}'
Out[66]: '0001001000110100'

Those last two seem odd.  I think f'{a:30}' should return the same thing as
this:

In [69]: f'{str(a):30}'
Out[69]: '1.2.3.4   '

and f'{a:42b'} should return the same thing as this:

In [77]: f'{bin(int(a)):42}'
Out[77]: '0b1001000110100   '

This also means supporting [>,<,^] alignment.  And, of course, ignoring any
length spec too short, as is done with regular integer formatting:

In [86]: b
Out[86]: 16909060

In [87]: f'{b:6}'
Out[87]: '16909060'

Thoughts?

eric

--

___
Python tracker 

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



[issue32901] Update 3.7 and 3.8 Windows and macOS installer builds to tcl/tk 8.6.8

2018-02-23 Thread Steve Dower

Steve Dower  added the comment:

Windows is complete - leaving this open for Ned to resolve when the Mac 
installers are done.

--

___
Python tracker 

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



[issue32901] Update 3.7 and 3.8 Windows and macOS installer builds to tcl/tk 8.6.8

2018-02-23 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

New build with 8.6.8 seems to work fine on my machine.  Thanks.

I noticed that 'fetching tcl/tk 8.6.8' downloaded a pre-built binary instead of 
sources to build on my machine.  Nice.

--

___
Python tracker 

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



[issue32915] Running Python 2 with -3 flag doesn't complain about cmp/__cmp__

2018-02-23 Thread Ned Deily

Change by Ned Deily :


--
nosy: +benjamin.peterson

___
Python tracker 

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



[issue32925] AST optimizer: Change a list into tuple in iterations and containment tests

2018-02-23 Thread Serhiy Storchaka

New submission from Serhiy Storchaka :

Currently a list of constants is replaced with constant tuple in `x in [1, 2]` 
and `for x in [1, 2]`. The resulted AST is the same as for `x in (1, 2)` and 
`for x in (1, 2)`.

The proposed simple PR extends this optimization to lists containing 
non-constants. `x in [a, b]` will be changed into `x in (a, b)` and `for x in 
[a, b]` will be changed into `for x in (a, b)`. Since creating a tuple is 
faster than creating a list the latter form is a tiny bit faster.

$ ./python -m timeit -s 'a, b = 1, 2' -- 'for x in [a, b]: pass'
500 loops, best of 5: 93.6 nsec per loop

$ ./python -m timeit -s 'a, b = 1, 2' -- 'for x in (a, b): pass'
500 loops, best of 5: 74.3 nsec per loop

./python -m timeit -s 'a, b = 1, 2' -- '1 in [a, b]'
500 loops, best of 5: 58.9 nsec per loop

$ ./python -m timeit -s 'a, b = 1, 2' -- '1 in (a, b)'
1000 loops, best of 5: 39.3 nsec per loop

--
components: Interpreter Core
messages: 312670
nosy: benjamin.peterson, brett.cannon, ncoghlan, serhiy.storchaka, yselivanov
priority: normal
severity: normal
status: open
title: AST optimizer: Change a list into tuple in iterations and containment 
tests
type: performance
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



[issue32926] Add public TestCase method/property to get result of current test

2018-02-23 Thread Victor Engmark

New submission from Victor Engmark :

The community has come up with multiple hacks [1] to be able to inspect the 
current test result in tearDown (to collect more expensive diagnostics only 
when the test fails). It would be great to have a documented and simple way to 
check whether the test currently in play was successful. To be clear, 
TestCase.wasSuccessful() is not useful in this case, since it only reports 
whether all tests run so far were successful.

[1] https://stackoverflow.com/q/4414234/96588

--
messages: 312671
nosy: Victor Engmark
priority: normal
severity: normal
status: open
title: Add public TestCase method/property to get result of current test
type: enhancement

___
Python tracker 

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



[issue32927] Add typeshed documentation for unittest.TestCase._feedErrorsToResult and ._outcome

2018-02-23 Thread Victor Engmark

New submission from Victor Engmark :

Until and unless #32926 is fixed it would be good to be able to type inspect 
code which uses the currently least hacky way to inspect the result of the 
current test [1]. This requires the use of TestCase._feedErrorsToResult and 
TestCase._outcome.

[1]: https://stackoverflow.com/a/39606065/96588

--
messages: 312672
nosy: Victor Engmark
priority: normal
severity: normal
status: open
title: Add typeshed documentation for unittest.TestCase._feedErrorsToResult and 
._outcome
type: enhancement

___
Python tracker 

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



[issue32925] AST optimizer: Change a list into tuple in iterations and containment tests

2018-02-23 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue32928] _findvs failing on Windows 10 (Release build only)

2018-02-23 Thread William Pickard

New submission from William Pickard :

The distutils module _findvs is failing on my Windows 10 PRO machine with the 
following error: OSError: Error 80070002

Note: Building Python 3.6 in debug for some reason doesn't cause the error.

--
components: Distutils, Extension Modules, Library (Lib), Windows
messages: 312673
nosy: WildCard65, dstufft, eric.araujo, paul.moore, steve.dower, tim.golden, 
zach.ware
priority: normal
severity: normal
status: open
title: _findvs failing on Windows 10 (Release build only)
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



[issue32861] urllib.robotparser: incomplete __str__ methods

2018-02-23 Thread Terry J. Reedy

Change by Terry J. Reedy :


--
nosy: +orsenthil

___
Python tracker 

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



[issue32867] argparse assertion failure with multiline metavars

2018-02-23 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

I don't understand the -h (display help part) but pasting code into repository 
3.8 IDLE editor and running, I get same traceback.

Never having used argparse, I don't know if a multiline metavar is expected to 
work.  Assuming so, can you suggest a fix?

--
nosy: +bethard, terry.reedy
stage:  -> test needed
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



[issue32875] Add __exit__() method to event loops

2018-02-23 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Enhancements only go in future releases not yet in beta.

Do loops already have an __enter__ method, also required for with?  What would 
you have the close method do?  Preemptorially cancel all tasks and close the 
loop?  With statement are usually for ensuring deterministic cleanup after the 
last substatement, such as closing a file.  Can you give a short usage example?

--
nosy: +terry.reedy
versions: +Python 3.8 -Python 3.6

___
Python tracker 

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



[issue32877] Login to bugs.python.org with Google account NOT working

2018-02-23 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

This is similar to #29544.  As the reply there indicates, this tracker (for 
issues with the cpython repository) is the wrong place for issues about the 
tracker.  Click Report Tracker Problem on the left sidebar.

--
nosy: +terry.reedy
resolution:  -> third party
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



[issue32875] Add __exit__() method to event loops

2018-02-23 Thread Martin Panter

Martin Panter  added the comment:

Maybe already discussed in Issue 24795?

--
nosy: +martin.panter
superseder:  -> Make event loops with statement context managers

___
Python tracker 

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



[issue32928] _findvs failing on Windows 10 (Release build only)

2018-02-23 Thread Steve Dower

Steve Dower  added the comment:

You mean build? Or use?

Can you share build logs?

--

___
Python tracker 

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



[issue32928] _findvs failing on Windows 10 (Release build only)

2018-02-23 Thread William Pickard

William Pickard  added the comment:

Use, when distutils calls findall in the module, it results in the OSError 
being thrown.

--

___
Python tracker 

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



[issue32867] argparse assertion failure with multiline metavars

2018-02-23 Thread Martin Panter

Martin Panter  added the comment:

This looks like the same assertion failure as described in Issue 16360. Paul 
pointed to a patch in Issue 11874, so that may also be relevant.

However I agree that embedding newlines in a metavar doesn’t make much sense. 
What’s the use case?

--
nosy: +martin.panter

___
Python tracker 

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



[issue28134] socket.socket(fileno=fd) does not work as documented

2018-02-23 Thread YoSTEALTH

YoSTEALTH  added the comment:

I am using 3.7.0b1 i don't think this issue is fixed!

# simple mockup:
# --
def accept(sock):
client, addr = sock.accept()
inside = socket(fileno=client.fileno())
print(inside)
# <__main__.Socket fd=5, family=AddressFamily.AF_INET, 
type=SocketKind.SOCK_STREAM, proto=6, laddr=('127.0.0.1', 8000), 
raddr=('127.0.0.1', 42532)>
return inside

outside = accept(sock)
print(outside)
# <__main__.Socket fd=5, family=AddressFamily.AF_INET, 
type=SocketKind.SOCK_STREAM, proto=6>


So the "laddr" and "raddr" goes missing the second its out of the function???

This has wasted days of my time, to even get to this point of figuring out 
whats going on wasn't easy! extremely frustrating.

--
nosy: +YoSTEALTH

___
Python tracker 

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



[issue32926] Add public TestCase method/property to get result of current test

2018-02-23 Thread ppperry

Change by ppperry :


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



[issue32926] Add public TestCase method/property to get result of current test

2018-02-23 Thread ppperry

Change by ppperry :


--
components: +Library (Lib)

___
Python tracker 

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



[issue32893] ast.literal_eval() shouldn't accept booleans as numbers in AST

2018-02-23 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

It is true that 'True' and 'False' are not literally literals.  But as pre- and 
fixedly bound names, they function for Bool the same as 0 and 1 do for int.

Besides this, ast.literal_eval is not now limited to literal evaluation, but 
does compile-time computation of some constant expressions, in particular even 
nested tuples like '(1, (2, (3, (4,5' or '(False, (True, False))' and even 
some expressions yielding mutable objects, like '[1,2]' (see below).  
'safe_eval' might be a better name now.

The benefit of compressing 'True+True' to 2 at compile time is the same as 
compressing '1+1' to 2. Given what literal_eval actually is now, it is 
surprising and to me confusing that this is rejected, while a tuple with 
booleans is accepted (as it should be!).  It is also a bug relative to the doc:

"The string or node provided may only consist of the following Python literal 
structures: strings, bytes, numbers, tuples, lists, dicts, sets, *booleans*, 
and None." [*s added]

So I think this issue should be flipped to "ast.literal_eval should 
consistently accept False and True" and marked as a bugfix.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue32867] argparse assertion failure with multiline metavars

2018-02-23 Thread MaT1g3R

MaT1g3R  added the comment:

I tried to include line breaks for listing options for a positional argument.

The default metavar for that is something like {opt1, opt2, op3},
however I wanted it to display the options on separate lines.

--

___
Python tracker 

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



[issue32893] ast.literal_eval() shouldn't accept booleans as numbers in AST

2018-02-23 Thread Terry J. Reedy

Change by Terry J. Reedy :


--
Removed message: https://bugs.python.org/msg312682

___
Python tracker 

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



[issue28134] socket.socket(fileno=fd) does not work as documented

2018-02-23 Thread Christian Heimes

Christian Heimes  added the comment:

The problem is fixed and your example behaves as expected.

The laddr string is the result of inside.getsockname() and raddr string is the 
result of inside.getpeername(). In your example, inside and client share the 
same file descriptor. When the function exits client goes out of scope, the 
reference count of client drops to 0, the object gets deallocated and Python 
closes the shared file descriptor. In outside, the shared fd is gone and 
outside.getsockname() and outside.getpeername() fail. Basically the outside 
socket is dead because its fd has been closed.

You have to duplicate the fd or detach the socket to keep the fd open.

--

___
Python tracker 

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



[issue28414] SSL match_hostname fails for internationalized domain names

2018-02-23 Thread Nathaniel Smith

Nathaniel Smith  added the comment:


New changeset 11a1493bc4198f1def5e572049485779cf54dc57 by Nathaniel J. Smith 
(Christian Heimes) in branch 'master':
[bpo-28414] Make all hostnames in SSL module IDN A-labels (GH-5128)
https://github.com/python/cpython/commit/11a1493bc4198f1def5e572049485779cf54dc57


--

___
Python tracker 

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



[issue28414] SSL match_hostname fails for internationalized domain names

2018-02-23 Thread miss-islington

Change by miss-islington :


--
pull_requests: +5618

___
Python tracker 

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



[issue32929] Change dataclasses hashing to use unsafe_hash boolean (default to False)

2018-02-23 Thread Eric V. Smith

New submission from Eric V. Smith :

See https://mail.python.org/pipermail/python-dev/2018-February/152150.html for 
a discussion.

This will remove the @dataclass hash= tri-state parameter, and replace it with 
an unsafe_hash= boolean-only parameter.

>From that thread:

"""
I propose that with @dataclass(unsafe_hash=False) (the default), a __hash__
method is added when the following conditions are true:

- frozen=True (not the default)
- compare=True (the default)
- no __hash__ method is defined in the class

If we instead use @dataclass(unsafe_hash=True), a __hash__ will be added
regardless of the other flags, but if a __hash__ method is present, an
exception is raised.

Other values (e.g. unsafe_hash=None) are illegal for this flag.
"""

--
assignee: eric.smith
components: Library (Lib)
messages: 312686
nosy: eric.smith, ned.deily
priority: release blocker
severity: normal
status: open
title: Change dataclasses hashing to use unsafe_hash boolean (default to False)
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



[issue32893] ast.literal_eval() shouldn't accept booleans as numbers in AST

2018-02-23 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Whoops, my previous response was wrong as written because I wrongly thought 
that if literal_eval accepts number_literal + imaginary_literal, it would also 
accept number_literal + number_literal. I am replacing it with the following.

The ast.literal_eval doc says 
"The string or node provided may only consist of the following Python literal 
structures: strings, bytes, numbers, tuples, lists, dicts, sets, booleans, and 
None."

Since 'True', '(True,)', '[True]', '{True:True}', '+1', '-1' and '1+1j' are 
accepted as 'literal structures', it seems arbitrary that at least '+True' and 
'True+1j' are not.  ('+1', '1+1j' and especially '-1' seem to violate the 
limitations to 'literal', 'container', and 'no operator', but that is a 
different issue.)

I strongly agree that the acceptable string inputs and acceptable AST inputs 
should match.  The question is which version of the domain should be changed.  
I would at least mildly prefer that the issue be "ast.literal_eval should 
consistly treat False and True the same as 0 and 1.", which means expanding the 
string version.  As Raymond said, this is the general rule in Python.  What is 
the benefit of having a different rule for this one function?

--

___
Python tracker 

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



[issue32929] Change dataclasses hashing to use unsafe_hash boolean (default to False)

2018-02-23 Thread Steven D'Aprano

Steven D'Aprano  added the comment:

This is a truly awful name, there's nothing unsafe about the hash 
parameter. We rightly hesitate to label *actual* unsafe functions, like 
eval and exec, with that name. Are we committed to this name?

--
nosy: +steven.daprano

___
Python tracker 

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



[issue32930] [help][webbrowser always opens new tab. I want to open in the same tab]

2018-02-23 Thread Tommy

New submission from Tommy :

Dear manager,

I'm just starting python and trying to make simple web application.
As above title, I just want to open webbrowser at first and then just change 
web-address in the same tab, but whenever I try webbrowser.open, it always open 
new tab or new window.
When I checked webbrowser-control options on python help page, it says 
webbrowser.open's 2nd argument can control window opening. but it did not work 
well in my tries. following is my test code.

#1st try
import webbrowser
url = 'www.google.com'
webbrowser.open(url, new=0) # this open new explorer window.

#wait

#2nd try
webbrowser.open(url, new=0) # this open new explorer window again.

In my test, I test 2nd argument from 0 to 2, but there seems no change.
always opens new tab.

Is there any way to change address and open in the current opened browser 
window?

best Regards,
Tommy

--
components: Windows
messages: 312689
nosy: paul.moore, steve.dower, tim.golden, tommylim1...@naver.com, zach.ware
priority: normal
severity: normal
status: open
title: [help][webbrowser always opens new tab. I want to open in the same tab]
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



[issue32907] pathlib: test_resolve_common fails on Windows w/ longusername

2018-02-23 Thread Terry J. Reedy

Change by Terry J. Reedy :


--
title: pathlib: test_resolve_common fails on Windows -> pathlib: 
test_resolve_common fails on Windows w/ longusername

___
Python tracker 

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



[issue32930] [help][webbrowser always opens new tab. I want to open in the same tab]

2018-02-23 Thread Tommy

Change by Tommy :


--
components: +Library (Lib), macOS
nosy: +ned.deily, ronaldoussoren

___
Python tracker 

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



  1   2   >