[issue36264] os.path.expanduser should not use HOME on windows

2019-03-17 Thread daniel hahler


daniel hahler  added the comment:

Just as a sidenote: the other day I was checking Python's source to see how to 
override a user's home (in tests, when os.path.expanduser` is used in code), 
and found it easy to just set $HOME in the environment in the end.

I guess this change will cause quite some regressions in this regard - even 
though $HOME might not be used in practice on Windows.

--
nosy: +blueyed

___
Python tracker 

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



[issue34745] asyncio ssl memory leak

2019-03-17 Thread Fantix King


Change by Fantix King :


--
pull_requests: +12348

___
Python tracker 

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



[issue36332] compile() error on AST object with assignment expression

2019-03-17 Thread Guido van Rossum


Guido van Rossum  added the comment:

Confirmed. Emily, do you need help tracking this down?

--

___
Python tracker 

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



[issue36334] pathlib.Path unexpected (wrong) behaviour when combining paths in a for loop

2019-03-17 Thread Eryk Sun

Eryk Sun  added the comment:

The drive is retained when a rooted path is joined to a drive-absolute or 
UNC-absolute path. This is documented behavior [1]:

When several absolute paths are given, the last is taken as an
anchor (mimicking os.path.join()’s behaviour):

>>> PurePath('/etc', '/usr', 'lib64')
PurePosixPath('/usr/lib64')
>>> PureWindowsPath('c:/Windows', 'd:bar')
PureWindowsPath('d:bar')

However, in a Windows path, changing the local root doesn’t
discard the previous drive setting:

>>> PureWindowsPath('c:/Windows', '/Program Files')
PureWindowsPath('c:/Program Files')

If you want to simply append directories to a path, use a relative path. For 
example:

>>> Path('C:/Program Files') / Path('one/two/three.exe')
WindowsPath('C:/Program Files/one/two/three.exe')

[1]: https://docs.python.org/3/library/pathlib.html#pathlib.PurePath

--
nosy: +eryksun
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue36335] Factor out / add bdb.Bdb.is_skipped_frame

2019-03-17 Thread daniel hahler


Change by daniel hahler :


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

___
Python tracker 

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



[issue36335] Factor out / add bdb.Bdb.is_skipped_frame

2019-03-17 Thread daniel hahler


New submission from daniel hahler :

In https://bugs.python.org/issue36130 is_skipped_module was changed to handle 
frames without __name__, but I think it makes sense being able to skip e.g. 
frames on frame.f_code.co_name then.

Factoring out is_skipped_frame allows for this.

The default implementation would call is_skipped_module if there are any skip 
patterns, and return False otherwise.

--
components: Library (Lib)
messages: 338159
nosy: blueyed
priority: normal
severity: normal
status: open
title: Factor out / add bdb.Bdb.is_skipped_frame
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



[issue34461] Availability of parsers in etree initializer

2019-03-17 Thread Ned Deily


Ned Deily  added the comment:

Thanks for the suggestion but, since there has been no agreement that this 
change is desirable, I am going to close the issue along with the submitted PRs.

--
nosy: +ned.deily
resolution:  -> not a bug
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue36272] Recursive logging crashes Interpreter in Python 3

2019-03-17 Thread miss-islington


Change by miss-islington :


--
pull_requests: +12346

___
Python tracker 

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



[issue36318] Adding support for setting the "disabled" attribute of loggers from logging.config.dictConfig

2019-03-17 Thread Vinay Sajip


Vinay Sajip  added the comment:

I don't see any value in configuring a logger which starts as disabled - making 
it completely useless - why would one want to do this? I don't think the 
"consistency" argument flies in this case.

--

___
Python tracker 

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



[issue36334] pathlib.Path unexpected (wrong) behaviour when combining paths in a for loop

2019-03-17 Thread Mike Davies


New submission from Mike Davies :

I wish to create a list of pathlib.Paths by combining two lists of 
pathlib.Paths. I use two for loops to make every combination.

However the output is not what one would expect (see no 'Program Files' is 
visible in the output).

## INPUT:
pa = [   
Path('C:/Program Files'),
Path('C:/')
]
pb = [
Path('/one/two/three.exe'),
Path('/four.exe') 
]
print( [a/b for a in pa for b in pb] )

### OUTPUT:
[WindowsPath('C:/one/two/three.exe'), WindowsPath('C:/four.exe'), 
WindowsPath('C:/one/two/three.exe'), WindowsPath('C:/four.exe')]

This is true whether I use for loops or list comprehensions.


To get the expected output I need to change the Paths to strings, combine them, 
then convert them back to paths like this:

### INPUT:
print( [Path(str(a)+str(b)) for a in pa for b in pb] )
### OUTPUT:
[WindowsPath('C:/Program Files/one/two/three.exe'), WindowsPath('C:/Program 
Files/four.exe'), WindowsPath('C:/one/two/three.exe'), 
WindowsPath('C:/four.exe')]


Interestingly if I print only 'a' I get the expected answer:
### INPUT:
print( [a for a in pa for b in pb] )
### OUTPUT:
[WindowsPath('C:/Program Files'), WindowsPath('C:/Program Files'), 
WindowsPath('C:/'), WindowsPath('C:/')]


And the same is true if I print only 'b':
### INPUT:
print( [b for a in pa for b in pb] )
### OUTPUT:
[WindowsPath('/one/two/three.exe'), WindowsPath('/four.exe'), 
WindowsPath('/one/two/three.exe'), WindowsPath('/four.exe')]



Additionally in some cases it does give the correct answer. Here is a similar 
example where the answer is correct:
### INPUT:
pa = [Path('C:/'), Path('D:/')]
pb = [Path('a.exe'), Path('b.exe')]
print( [a/b for a in pa for b in pb] )
### OUTPUT:
[WindowsPath('C:/a.exe'), WindowsPath('C:/b.exe'), WindowsPath('D:/a.exe'), 
WindowsPath('D:/b.exe')]

--
components: Windows
messages: 338156
nosy: Mike Davies, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: pathlib.Path  unexpected (wrong) behaviour when combining paths in a for 
loop
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



[issue36247] zipfile - extract truncates (existing) file when bad password provided (zip encryption weakness)

2019-03-17 Thread Ned Deily


Ned Deily  added the comment:

I'll let it up to other coredevs to decide whether this is behavior that should 
be changed in master for the next feature release and/or whether a doc change 
is needed.  But we are not going to change the behavior of 3.6 for sure so I am 
closing PR 12242.

--
nosy: +ned.deily
resolution: not a bug -> 
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



[issue36195] initializer is not a valid param in ThreadPoolExecutor

2019-03-17 Thread Ned Deily


Ned Deily  added the comment:

Thanks for the PR!

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



[issue36195] initializer is not a valid param in ThreadPoolExecutor

2019-03-17 Thread Ned Deily


Ned Deily  added the comment:


New changeset e601ef0fa384d149f6759fff3c18762a8c63851e by Ned Deily (Harmandeep 
Singh) in branch '3.6':
bpo-36195: Remove the ThreadPoolExecutor documentation mentioning the 
initializer feature added in Python 3.7 (GH-12182)
https://github.com/python/cpython/commit/e601ef0fa384d149f6759fff3c18762a8c63851e


--

___
Python tracker 

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



[issue35121] Cookie domain check returns incorrect results

2019-03-17 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Larry, I am reopening this since this seems to affects 2.7 and would wait for 
Benjamin's call on backporting this.

--
resolution: fixed -> 
stage: resolved -> commit review
status: closed -> open

___
Python tracker 

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



[issue36332] compile() error on AST object with assignment expression

2019-03-17 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +emilyemorehouse, gvanrossum

___
Python tracker 

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



[issue36268] Change default tar format to modern POSIX 2001 (pax) for better portability/interop, support and standards conformance

2019-03-17 Thread C.A.M. Gerlach


C.A.M. Gerlach  added the comment:

Also, one additional minor note (since I apparently can't edit comments here). 
Windows 10 (since the April 2018 update a year ago) now includes 
libarchive-based bsdtar built-in by default and accessible from the standard 
command prompt, which as mentioned fully supports pax.

Therefore, all modern platforms should support extracting them out of the box 
(aside from Windows 7/Server 2008, for which extended support will end within 
two months from Python 3.8's initial release, Windows 10 pre-1803 for which 
enterprise support will end a few months after that, and Windows 8.1/Server 
2012, which will be in extended support for a few more years but very low 
enterprise/developer/power user adoption; of course, these don't include any 
built-in tar support at all anyway).

--

___
Python tracker 

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



[issue22303] Write better test for SSLContext.load_verify_locations

2019-03-17 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

Issue 22449 added some tests around these environment variables.  Was that 
enough to satisfy this issue or does more need to be done?

--
nosy: +cheryl.sabella

___
Python tracker 

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



[issue36333] memory leaks detected with valgrind for python -V

2019-03-17 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

@vstinner I ping you because you are the main author for the new changes in the 
interpreter and the PyPreConfig part.

--
nosy: +vstinner

___
Python tracker 

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



[issue36333] memory leaks detected with valgrind for python -V

2019-03-17 Thread Stéphane Wirtel

Change by Stéphane Wirtel :


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



[issue36333] memory leaks detected with valgrind for python -V

2019-03-17 Thread Stéphane Wirtel

Change by Stéphane Wirtel :


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

___
Python tracker 

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



[issue36333] memory leaks detected with valgrind for python -V

2019-03-17 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

The report of valgrind with no leaks.

--
Added file: https://bugs.python.org/file48214/valgrind-without-memory-leak.log

___
Python tracker 

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



[issue36333] memory leaks detected with valgrind for python -V

2019-03-17 Thread Stéphane Wirtel

New submission from Stéphane Wirtel :

I have detected 3 memory leaks when I execute python -V with valgrind -> 162 
bytes.

The leaks do seem to be in pymain_init and in _PyPreConfig_ReadFromArgv (the 
string for the locale is not freed).

Also _PyRuntimeState_Fini does not release the memory of the mutex on 
runtime->xidregistry.

You can find the first status in the valgrind.log file (with the leaks).

--
components: Interpreter Core
files: valgrind.log
messages: 338147
nosy: matrixise
priority: normal
severity: normal
status: open
title: memory leaks detected with valgrind for python -V
Added file: https://bugs.python.org/file48213/valgrind.log

___
Python tracker 

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



[issue34745] asyncio ssl memory leak

2019-03-17 Thread miss-islington


miss-islington  added the comment:


New changeset 7f7485c0605fe979e39c58b688f2bb6a4f43e65e by Miss Islington (bot) 
in branch '3.7':
bpo-34745: Fix asyncio sslproto memory issues (GH-12386)
https://github.com/python/cpython/commit/7f7485c0605fe979e39c58b688f2bb6a4f43e65e


--
nosy: +miss-islington

___
Python tracker 

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



[issue34745] asyncio ssl memory leak

2019-03-17 Thread miss-islington


Change by miss-islington :


--
pull_requests: +12344

___
Python tracker 

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



[issue34745] asyncio ssl memory leak

2019-03-17 Thread Yury Selivanov


Yury Selivanov  added the comment:


New changeset f683f464259715d620777d7ed568e701337a703a by Yury Selivanov 
(Fantix King) in branch 'master':
bpo-34745: Fix asyncio sslproto memory issues (GH-12386)
https://github.com/python/cpython/commit/f683f464259715d620777d7ed568e701337a703a


--

___
Python tracker 

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



[issue36330] Warning about a potential dead code in timemodule and Clang

2019-03-17 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

Hi Paul,

Thank you for your explanation, I was not sure about the solution and I have 
just preferred to publish this issue. I don't have this issue with gcc, only 
with clang.

--

___
Python tracker 

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



[issue34745] asyncio ssl memory leak

2019-03-17 Thread Fantix King


Change by Fantix King :


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

___
Python tracker 

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



[issue36332] compile() error on AST object with assignment expression

2019-03-17 Thread Kyungdahm Yun


New submission from Kyungdahm Yun :

Seems like compile() can't properly handle assignment expressions parsed in AST 
object.

Python 3.8.0a2+ (heads/master:06e1e68, Mar 17 2019, 14:27:19)
[Clang 10.0.0 (clang-1000.10.44.4)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import ast
>>> compile("if a == 1:\n  True", '', 'exec')
 at 0x10a59ef60, file "", line 1>
>>> compile(ast.parse("if a == 1:\n  True"), '', 'exec')
 at 0x10a5f6780, file "", line 1>
>>> compile("if a := 1:\n  True", '', 'exec')
 at 0x10a59ef60, file "", line 1>
>>> compile(ast.parse("if a := 1:\n  True"), '', 'exec')
Traceback (most recent call last):
  File "", line 1, in 
SystemError: unexpected expression
>>>

This issue seems to break IPython when trying to use any assignment expressions.
https://github.com/ipython/ipython/issues/11618

--
components: Interpreter Core
messages: 338143
nosy: tomyun
priority: normal
severity: normal
status: open
title: compile() error on AST object with assignment expression
type: behavior
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



[issue36245] PCBuild/build.bat errors, probably from space characters in paths

2019-03-17 Thread Jess


Jess  added the comment:

How long should I be waiting on review?

--

___
Python tracker 

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



[issue36331] check_output is returning non-zero exit status 1

2019-03-17 Thread Ned Deily


Ned Deily  added the comment:

Did you try running the same command "screen -ls" with subprocess.run() so you 
can see the output from it?  Or just from a terminal shell?  If I do, I see:

>>> subprocess.run(["screen", "-ls"])
No Sockets found in /var/folders/sn/0m4rnbyj2z1byjs68sz83830gn/T/.screen.

CompletedProcess(args=['screen', '-ls'], returncode=1)

$ screen -ls
No Sockets found in /var/folders/sn/0m4rnbyj2z1byjs68sz83830gn/T/.screen.

So subprocees.check_output() is likely working just fine: it is telling you 
that the command you tried to execute failed for some reason.

--
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed
type: compile error -> 

___
Python tracker 

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



[issue36331] check_output is returning non-zero exit status 1

2019-03-17 Thread Jagadeesh Marella


New submission from Jagadeesh Marella :

 check_output(["screen", "-ls"])
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/local/Cellar/pypy3/6.0.0/libexec/lib-python/3/subprocess.py", line 
316, in check_output
**kwargs).stdout
  File "/usr/local/Cellar/pypy3/6.0.0/libexec/lib-python/3/subprocess.py", line 
398, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['screen', '-ls']' returned non-zero 
exit status 1

--
components: macOS
messages: 338140
nosy: jagadeesh, ned.deily, ronaldoussoren
priority: normal
severity: normal
status: open
title: check_output is returning non-zero exit status 1
type: compile error
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



[issue35121] Cookie domain check returns incorrect results

2019-03-17 Thread Larry Hastings


Change by Larry Hastings :


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



[issue36330] Warning about a potential dead code in timemodule and Clang

2019-03-17 Thread Paul Ganssle


Paul Ganssle  added the comment:

Sorry, I should say unlikely that it should ever be *true*. It seems unlikely 
that there is a platform or piece of hardware on which this error would be 
raised.

--

___
Python tracker 

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



[issue36330] Warning about a potential dead code in timemodule and Clang

2019-03-17 Thread Paul Ganssle


Paul Ganssle  added the comment:

It does seem like the values CLOCKS_PER_SEC, _PyTime_MAX and SEC_TO_NS are all 
defined at compile-time, so presumably this can be a compile-time error.

As currently defined, though, it seems very unlikely that this would ever be 
false, since _PyTime_MAX is the same as LLONG_MAX, which cplusplusreference 
says is `9223372036854775807 (2**63-1) or greater` [0], so CLOCKS_PER_SEC would 
need to be >= 2**50, which is unlikely to be... accurate.

In any case, it seems like this check can happen at compile-time, either 
resulting in compilation failing, or just undefining HAVE_CLOCK.

[0] http://www.cplusplus.com/reference/climits/

--
nosy: +p-ganssle

___
Python tracker 

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



[issue36330] Warning about a potential dead code in timemodule and Clang

2019-03-17 Thread Stéphane Wirtel

New submission from Stéphane Wirtel :

env CC="/usr/bin/clang" CCX="/usr/bin/clang" ./configure > /dev/null ;and make 
-j 4 > /dev/null

./Modules/timemodule.c:113:13: warning: code will never be executed 
[-Wunreachable-code]
PyErr_SetString(PyExc_OverflowError,
^~~
1 warning generated.

--
components: Interpreter Core
messages: 338137
nosy: matrixise
priority: normal
severity: normal
status: open
title: Warning about a potential dead code in timemodule and Clang
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



[issue36320] typing.NamedTuple to switch from OrderedDict to regular dict

2019-03-17 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Okay, I'll put together a PR and assign it to you :-)

--

___
Python tracker 

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



[issue36329] use the right python "make -C Doc/ serve"

2019-03-17 Thread Stéphane Wirtel

Change by Stéphane Wirtel :


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

___
Python tracker 

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



[issue36329] use the right python "make -C Doc/ serve"

2019-03-17 Thread Stéphane Wirtel

New submission from Stéphane Wirtel :

When serving the documentation with `make -C Doc/ serve`, we can not specify 
the path of the python binary.

My use case, I wanted to debug the wsgiref.simple_server method, used by 
Tools/scripts/serve.py. It's just impossible because  we use the default 
python3 binary from the system or from the virtualenv (pyenv. etc...)

--
messages: 338135
nosy: matrixise
priority: normal
severity: normal
status: open
title: use the right python "make -C Doc/ serve"
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



[issue36329] use the right python "make -C Doc/ serve"

2019-03-17 Thread Stéphane Wirtel

Change by Stéphane Wirtel :


--
assignee:  -> docs@python
components: +Documentation
nosy: +docs@python

___
Python tracker 

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



[issue36317] Typo in documentation of _PyObject_FastCallDict

2019-03-17 Thread Rémi Lapeyre

Change by Rémi Lapeyre :


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

___
Python tracker 

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



[issue36290] _ast.ast_type_init does not handle args and kwargs correctly.

2019-03-17 Thread Rémi Lapeyre

Change by Rémi Lapeyre :


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

___
Python tracker 

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



[issue36308] Fix warning in _PyPathConfig_ComputeArgv0

2019-03-17 Thread Stéphane Wirtel

Change by Stéphane Wirtel :


--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue36328] tstate may be used uninitialized in Py_NewInterpreter

2019-03-17 Thread Stéphane Wirtel

Change by Stéphane Wirtel :


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

___
Python tracker 

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



[issue36328] tstate may be used uninitialized in Py_NewInterpreter

2019-03-17 Thread Stéphane Wirtel

New submission from Stéphane Wirtel :

I get this warning when I compile python without the --with-pydebug flag.


Python/pylifecycle.c: In function 'Py_NewInterpreter':
Python/pylifecycle.c:1442:12: warning: 'tstate' may be used uninitialized in 
this function [-Wmaybe-uninitialized]
 return tstate;
^~

Does not occur with python 3.7

--
messages: 338134
nosy: matrixise, serhiy.storchaka
priority: normal
severity: normal
status: open
title: tstate may be used uninitialized in Py_NewInterpreter
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



[issue19415] test_gdb fails when using --without-doc-strings on Fedora 19

2019-03-17 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

@Nick,

I have tested with the last 3.8 and 3.7 and Fedora 29.

./configure --without-doc-strings > /dev/null ;and make -j 4 > /dev/null ;and 
./python -m test -W test_gdb
Run tests sequentially
0:00:00 load avg: 1.49 [1/1] test_gdb
test_gdb passed in 41 sec 934 ms

== Tests result: SUCCESS ==

1 test OK.

Total duration: 41 sec 938 ms
Tests result: SUCCESS


tested with 3.7 and fedora 29

Run tests sequentially
0:00:00 load avg: 2.02 [1/1] test_gdb
test_gdb passed in 42 sec 345 ms

== Tests result: SUCCESS ==

1 test OK.

Total duration: 42 sec 349 ms
Tests result: SUCCESS

Because there is no error, I close this issue.

--
nosy: +matrixise
resolution:  -> out of date
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



[issue36235] distutils.sysconfig.customize_compiler() overrides CFLAGS var with OPT var if CFLAGS env var is set

2019-03-17 Thread Chih-Hsuan Yen


Change by Chih-Hsuan Yen :


--
pull_requests: +12338

___
Python tracker 

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



[issue31062] socket.makefile does not handle line buffering

2019-03-17 Thread Cheryl Sabella


Change by Cheryl Sabella :


--
nosy: +giampaolo.rodola
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



[issue36327] Remove EOLed Py34 from "Status of Python branches"

2019-03-17 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

The tracker is for CPython and the devguide has it's own issue tracker where 
this could be raised : https://github.com/python/devguide . I am just adding 
Larry who is release manager for 3.4 and closing this as third party. Feel free 
to reopen if needed.

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



[issue36327] Remove EOLed Py34 from "Status of Python branches"

2019-03-17 Thread Christian Clauss


New submission from Christian Clauss :

Remove Python 3.4 https://devguide.python.org/#branchstatus

Add Python 3.4 https://devguide.python.org/devcycle/#end-of-life-branches

--
assignee: docs@python
components: Documentation
messages: 338131
nosy: cclauss, docs@python
priority: normal
severity: normal
status: open
title: Remove EOLed Py34 from "Status of Python branches"
versions: Python 3.4

___
Python tracker 

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



[issue36320] typing.NamedTuple to switch from OrderedDict to regular dict

2019-03-17 Thread Ivan Levkivskyi


Ivan Levkivskyi  added the comment:

Good idea! This should be easy to fix/update, this was initially discussed in 
https://github.com/python/typing/issues/339.

--

___
Python tracker 

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



[issue35998] test_asyncio: test_start_tls_server_1() TimeoutError on Fedora 29

2019-03-17 Thread Matthias Klose


Matthias Klose  added the comment:

setting to release-blocker for evaluation. the freebsd solution seems to be 
wrong, just avoiding the error.  Is the test correct, or do we have an issue 
that TLSv1.3 isn't properly handled?

--
keywords: +3.7regression
nosy: +lukasz.langa, ned.deily
priority: normal -> release blocker
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



[issue36319] Erro 0xC0000374 on windows 10

2019-03-17 Thread Eryk Sun


Eryk Sun  added the comment:

Windows Error Reporting should create a crash dump file. The default location 
for dump files is "%LocalAppData%\CrashDumps". The file should be named either 
"python.exe..dmp" (release build) or "python_d.exe..dmp" (debug 
build).

You can analyze the crash dump in a debugger such as one of the SDK debuggers 
-- windbg (GUI) and cdb (console; cdb -z ). The 64-bit (x64) 
debuggers and associated tools such as gflags.exe should be in 
"%ProgramFiles(x86)%\Windows Kits\10\Debuggers\x64", if installed.

Make sure Python's debug symbols and debug binaries are installed. For an 
existing installation, you can change this from the Control Panel "Programs and 
Features". I assume you're testing with the 64-bit debug build, "python_d.exe".

Set a system environment variable named "_NT_SYMBOL_PATH" to configure the 
`cache` directory and Microsoft's public symbol server (`srv`). I use 
"C:\Symbols\Cache". For example:


_NT_SYMBOL_PATH=cache*C:\Symbols\Cache;srv*https://msdl.microsoft.com/download/symbols

You may not have Python's symbol files already cached. In this case, you'll 
need to tell the debugger where it should look for the .pdb symbol files by 
extending the symbol path. For example, the following debugger command adds the 
base 64-bit Python 3.7 directories to the symbol path, assuming a standard 
all-users installation:

 .sympath+ C:\Program Files\Python37;C:\Program Files\Python37\DLLs

Or simply attach the debugger to a running python_d.exe process with the 
required extension modules loaded, and run `.reload /f` to cache the symbol 
files.

With the crash dump loaded in the debugger, run `!analyze -v` for a basic 
exception analysis. Also run `kn` to print the stack backtrace with frame 
[n]umbers for the current thread. If the backtrace doesn't included source 
files with line numbers, run `.lines` and rerun the `kn` command. Find the last 
Python frame just before the user-mode exception dispatcher (i.e. 
KiUserExceptionDispatch), and display its registers and local variables via 
`.frame /r [FrameNumber]` and then `dv /i /t /V`. 

That said, 0xC374 is STATUS_HEAP_CORRUPTION, which can be difficult to 
analyze with the default heap settings. To improve on this, enable full 
page-heap verification for "python_d.exe". Full page-heap verification ends 
every allocation with an inaccessible page, so the program will terminate on an 
unhandled STATUS_ACCESS_VIOLATION (0xC005 or -1073741819) at the exact line 
of code that tries to read or write beyond the allocation. 

You can configure full page-heap verification using gflags.exe if it's 
installed. From the command line, run `gflags /p /enable python_d.exe /full`. 
Or in the GUI, click on the "Image File" tab. Enter "python_d.exe" in the text 
box. Press tab. Select "Enable page heap", and click "OK". If you don't have 
gflags, you can configure the setting manually in the registry. (Even if you 
lack the tools to debug the problem yourself, at least you'll be able to send a 
more informative crash dump file to whoever has to analyze it.) Create a 
"python_d.exe" key in 
"HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution 
Options", and add the following two DWORD values: "GlobalFlag" with a 
hexadecimal value of 0x0200 and "PageHeapFlags" with a value of 3. You'll 
probably want to disable full page-heap verification after the dump file is 
created, especially if you've enabled it for the release build, "python.exe".

--
nosy: +eryksun

___
Python tracker 

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



[issue36326] Build-out help() to read __slots__ with an optional data dictionary

2019-03-17 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

I am not sure that this is the best application of dict as __slots__. Maybe use 
dict for specifying default values? Currently slots are not compatible with 
class-level values used as fallbacks.

Following the pattern for namedtuple attributes, docstrings for slots could be 
specified as:

class Bicycle:
   __slots__ = 'category', 'model', 'size', 'price'

Bicycle.category.__doc__ = 'Primary use: road, cross-over, or hybrid'
Bicycle.model.__doc__ = 'Unique six digit vendor-supplied code'
Bicycle.size.__doc__ = 'Rider size: child, small, medium, large, extra-large'
Bicycle.price.__doc__ = 'Manufacturer suggested retail price'

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue36323] IDLE: always display full grep path

2019-03-17 Thread Emmanuel Arias


Change by Emmanuel Arias :


--
nosy: +eamanu

___
Python tracker 

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



[issue12622] failfast argument to TextTestRunner not documented

2019-03-17 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

failfast was added to the TextTestRunner signature in docs with issue17871 for 
3.x and issue26097 for 2.7 . I guess the original issue was about signature 
missing in the docs and if so would propose closing this issue since it's fixed 
now.

--
nosy: +xtreak

___
Python tracker 

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



[issue36326] Build-out help() to read __slots__ with an optional data dictionary

2019-03-17 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +xtreak

___
Python tracker 

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



[issue36326] Build-out help() to read __slots__ with an optional data dictionary

2019-03-17 Thread Raymond Hettinger


New submission from Raymond Hettinger :

The __slots__ variable already works with dictionaries.  The values are simply 
ignored. 

I propose teaching help() to read those optional dictionaries to give better 
information on member objects (much like we already have with property objects).

This is inspired by data dictionaries for database tables.

The pydoc implementation would be somewhat easy.  Roughly this:

   for name in data_descriptors:
   print(f' |  {name}'
   if isinstance(slots, dict) and name in slots:
   print(f' |  {slots[name]}')
   print(' |')


 Example 

>>> class Bicycle:

   __slots__ = dict(
   category = 'Primary use: road, cross-over, or hybrid',
   model = 'Unique six digit vendor-supplied code',
   size = 'Rider size: child, small, medium, large, extra-large',
   price = 'Manufacturer suggested retail price', 
   )

>>> help(Bicycle)
Help on class Bicycle in module __main__:

class Bicycle(builtins.object)
 |  Data descriptors defined here:
 |  
 |  category
 |  Primary use: road, cross-over, or hybrid
 |  
 |  model
 |  Unique six digit vendor-supplied code
 |  
 |  price
 |  Rider size: child, small, medium, large, extra-large
 |  
 |  size
 |  Manufacturer suggested retail price

--
components: Library (Lib)
messages: 338125
nosy: rhettinger
priority: normal
severity: normal
status: open
title: Build-out help() to read __slots__ with an optional data dictionary
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



[issue34965] Python on Docker container using flask is going down after sometime

2019-03-17 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

As no additional information has been provided, I'm going to close this as 
third party.  Feel free to reopen if a reproducing script can be created to 
demonstrate that this is a bug in the language and not an issue with Flask or 
Docker.  Thanks!

--
nosy: +cheryl.sabella
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



[issue36325] Build-out help() to support a class level data dictionary

2019-03-17 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Moving to a fresh issue.

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



[issue36325] Build-out help() to support a class level data dictionary

2019-03-17 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Something like this would be especially helpful for classes using __slots__. 

The member objects show-up in help(), but there is no way to attach an 
explanation like we can with property objects.

So there is a slots only alternative that would only involve modifying help() 
and nothing else:

   class Bicycle:

   __slots__ = dict(
   category = 'Primary use: road, cross-over, or hybrid',
   model = 'Unique six digit vendor-supplied code',
   size = 'Rider size: child, small, medium, large, extra-large',
   price = 'Manufacturer suggested retail price', 
   )

--

___
Python tracker 

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



[issue36325] Build-out help() to support a class level data dictionary

2019-03-17 Thread Raymond Hettinger


New submission from Raymond Hettinger :

class Bicycle:

   __data_dictionary__ = dict(
  category = 'Primary use: road, cross-over, or hybrid',
  model = 'Unique six digit vendor-supplied code',
  size = 'Rider size: child, small, medium, large, extra-large',
  price = 'Manufacturer suggested retail price', 
   )

>>> help(Bicycle)
class Bicycle(builtins.object)
 |  Data fields defined here:
 |
 |  category
 |  Primary use: road, cross-over, or hybrid
 |
 |  model
 |  Unique six digit vendor-supplied code
 |
 |  size
 |  Rider size: child, small, medium, large, extra-large
 |
 |  price
 |  Manufacturer suggested retail price
 |
 |  --
 |
 |  Data descriptors defined here:
 |  
 |  __dict__
 |  dictionary for instance variables (if defined)
 |  
 |  __weakref__
 |  list of weak references to the object (if defined)
 |  
 |  --
 |  Data and other attributes defined here:
 |  
 |  __data_dictionary__ = {'category': 'Primary use: road, cross-over, or .

--
components: Library (Lib)
messages: 338121
nosy: rhettinger
priority: normal
severity: normal
status: open
title: Build-out help() to support a class level data dictionary
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



[issue36276] Python urllib CRLF injection vulnerability

2019-03-17 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
superseder:  -> CRLF Injection in httplib

___
Python tracker 

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



[issue36324] Inverse cumulative normal distribution function

2019-03-17 Thread Raymond Hettinger


Change by Raymond Hettinger :


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

___
Python tracker 

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



[issue36324] Inverse cumulative normal distribution function

2019-03-17 Thread Raymond Hettinger


New submission from Raymond Hettinger :

Give statistics.NormalDist()a method for computing the inverse cumulative 
distribution function.  Model it after the NORM.INV function in MS Excel.

https://support.office.com/en-us/article/norm-inv-function-54b30935-fee7-493c-bedb-2278a9db7e13

Use the high accuracy approximation found here:  
http://csg.sph.umich.edu/abecasis/gas_power_calculator/algorithm-as-241-the-percentage-points-of-the-normal-distribution.pdf

--
assignee: steven.daprano
components: Library (Lib)
messages: 338120
nosy: rhettinger, steven.daprano
priority: normal
severity: normal
status: open
title: Inverse cumulative normal distribution function
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



[issue12616] zip fixer fails on zip()[:-1]

2019-03-17 Thread Karthikeyan Singaravelan

Karthikeyan Singaravelan  added the comment:

This seems to have been fixed with issue28837 and 
93b4b47e3a720171d67f3b608de406aef462835c. Marking this as resolved. Thanks for 
the report.

➜  cpython git:(master) ✗ cat /tmp/foo.py
zip(B, D)[:-1]
➜  cpython git:(master) ✗ 2to3-3.7 /tmp/foo.py
RefactoringTool: Skipping optional fixer: buffer
RefactoringTool: Skipping optional fixer: idioms
RefactoringTool: Skipping optional fixer: set_literal
RefactoringTool: Skipping optional fixer: ws_comma
RefactoringTool: Refactored /tmp/foo.py
--- /tmp/foo.py (original)
+++ /tmp/foo.py (refactored)
@@ -1 +1 @@
-zip(B, D)[:-1]
+list(zip(B, D))[:-1]
RefactoringTool: Files that need to be modified:
RefactoringTool: /tmp/foo.py

--
nosy: +xtreak
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

___
Python tracker 

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