[issue26180] multiprocessing.util._afterfork_registry leak in threaded environment

2019-06-14 Thread Milan Zamazal


Milan Zamazal  added the comment:

I used Linux.

--

___
Python tracker 

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



[issue37213] Peeephole optimizer does not optimize functions with multiline expressions

2019-06-14 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

> Do you know why 255 became more common?

Because the line number is now correctly set for every bytecode instruction.

Compare the output in msg345108 for 3.8 with the corresponding output in 3.7:

  1   0 BUILD_LIST   0
  2 LOAD_FAST0 (.0)
>>4 FOR_ITER12 (to 18)

  2   6 STORE_FAST   1 (x)
  8 LOAD_FAST1 (x)
 10 POP_JUMP_IF_FALSE4
 12 LOAD_FAST1 (x)
 14 LIST_APPEND  2
 16 JUMP_ABSOLUTE4
>>   18 RETURN_VALUE

--

___
Python tracker 

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



[issue37277] http.cookies.SimpleCookie does not parse attribute without value (rfc2109)

2019-06-14 Thread Konstantin Enchant


New submission from Konstantin Enchant :

Very strange case but https://www.ietf.org/rfc/rfc2109.txt (see 4.1  Syntax:  
General) defines that "= value" is optional for attribute-value pairs for 
header Cookie.

And SimpleCookie fully broken if meets attribute without value, example:

```
>>> from http.cookies import SimpleCookie

# all ok
>>> SimpleCookie('a=1')


# parse fully broken and does not parse not only `test` but `a` too
>>> SimpleCookie('test; a=1')


# or
>>> SimpleCookie('a=1; test; b=2')

```

I think the problem hasn't been noticed for so long because people usually use 
frameworks, for example, Django parse it correctly because has workaround - 
https://github.com/django/django/blob/master/django/http/cookie.py#L20.

Also Go Lang handle that case too, example - 
https://play.golang.org/p/y0eFXVq6byK

(How can you see Go Lang and Django has different behavior for that case and I 
think Go Lang more better do it.)

The problem seems minor not but aiohttp use SimpleCookie as is 
(https://github.com/aio-libs/aiohttp/blob/3.5/aiohttp/web_request.py#L482) and 
if request has that strange cookie value mixed with other normal values - all 
cookies can not be parsed by aiohttp (just request.cookies is empty). 

In real world in my web application (based on aiohttp) it fully break 
authentication for request based on cookies.

I hope that will be fixed for SimpleCookie without implement workaround for 
aiohttp like Django.

--
messages: 345563
nosy: sirkonst
priority: normal
severity: normal
status: open
title: http.cookies.SimpleCookie does not parse attribute without value 
(rfc2109)
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



[issue37277] http.cookies.SimpleCookie does not parse attribute without value (rfc2109)

2019-06-14 Thread Karthikeyan Singaravelan

Karthikeyan Singaravelan  added the comment:

This could be due to issue22796. See also 
https://bugs.python.org/issue27828#msg273355.

➜  cpython git:(master) ✗ git checkout 
b1e36073cdde71468efa27e88016aa6dd46f3ec7~1 Lib/http/cookies.py
➜  cpython git:(master) ✗ ./python.exe -c 'from http.cookies import 
SimpleCookie; print(SimpleCookie("a=1; test;"))' # parses a=1
Set-Cookie: a=1
➜  cpython git:(master) ✗ git checkout b1e36073cdde71468efa27e88016aa6dd46f3ec7 
Lib/http/cookies.py
➜  cpython git:(master) ✗ ./python.exe -c 'from http.cookies import 
SimpleCookie; print(SimpleCookie("a=1; test;"))' # No value printed

--
nosy: +xtreak

___
Python tracker 

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



[issue37277] http.cookies.SimpleCookie does not parse attribute without value (rfc2109)

2019-06-14 Thread SilentGhost


SilentGhost  added the comment:

This was previously reported in #27828 and was introduced by #22796 in order to 
fix potential security issue. Not every attribute would cause the failure to 
parse, but only an unusual ones (that is normally occurring "reserved" httponly 
or secure attributes are handled just fine).

I'd propose that a more appropriate course of action would be to stop claiming 
compliance with RFC 2109 and instead refer to the RFC 6265 as its behaviour is 
being currently implemented.

--
nosy: +SilentGhost, pitrou -xtreak

___
Python tracker 

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



[issue37277] http.cookies.SimpleCookie does not parse attribute without value (rfc2109)

2019-06-14 Thread SilentGhost


Change by SilentGhost :


--
nosy: +xtreak

___
Python tracker 

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



[issue37213] Peeephole optimizer does not optimize functions with multiline expressions

2019-06-14 Thread STINNER Victor


STINNER Victor  added the comment:

> Because the line number is now correctly set for every bytecode instruction.

That's a great enhancement! Should it be documented in 
https://docs.python.org/3.8/whatsnew/3.8.html ?

--

___
Python tracker 

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



[issue37276] Incorrect number of running calls in ProcessPoolExecutor

2019-06-14 Thread STINNER Victor


Change by STINNER Victor :


--
nosy:  -vstinner

___
Python tracker 

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



[issue37214] Add new EncodingWarning warning category: emitted when the locale encoding is used implicitly

2019-06-14 Thread STINNER Victor


STINNER Victor  added the comment:

I wrote this issue to discuss https://www.python.org/dev/peps/pep-0597/ but 
it's unrelated to the implementation of this PEP :-)

--

___
Python tracker 

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



[issue37274] Scripts folder is empty in python 3.7.3 for windows.

2019-06-14 Thread Rahul Virpara


Rahul Virpara  added the comment:

This happened to me when I used customized option and unticked "pip".

I assume you are not doing the same.

--
nosy: +Rahul Virpara

___
Python tracker 

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



[issue25567] shlex.quote doesn't work on bytestrings

2019-06-14 Thread Aldwin Pollefeyt


Aldwin Pollefeyt  added the comment:

Python 3.9.0a0
[GCC 7.3.0] on linux
>>> import re
>>> find_unsafe_bytes = re.compile(b'[^\w@%+=:,./-]').search
:1: SyntaxWarning: invalid escape sequence \w

when removing \w, all the tests pass

(my regex knowledge is close to None.)

"\w stands for "word character". It always matches the ASCII characters 
[A-Za-z0-9_]"

replace \w with A-Za-z0-9_ ?? (all the tests pass)

--
nosy: +aldwinaldwin

___
Python tracker 

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



[issue37278] test_asyncio: ProactorLoopCtrlC leaks one reference

2019-06-14 Thread STINNER Victor


New submission from STINNER Victor :

vstinner@WIN C:\vstinner\python\master>python -m test -R 3:3 test_asyncio -m 
test.test_asyncio.test_windows_events.ProactorLoopCtrlC.test_ctrl_c
Running Debug|x64 interpreter...
Run tests sequentially
0:00:00 load avg: 0.00 [1/1] test_asyncio
beginning 6 repetitions
123456
..
test_asyncio leaked [1, 1, 1] references, sum=3
test_asyncio leaked [2, 1, 1] memory blocks, sum=4
test_asyncio failed

== Tests result: FAILURE ==

1 test failed:
test_asyncio

Total duration: 13 sec 391 ms
Tests result: FAILURE



Attached PR fix the issue by joining the thread.

--
components: Tests, asyncio
messages: 345570
nosy: asvetlov, vstinner, yselivanov
priority: normal
severity: normal
status: open
title: test_asyncio: ProactorLoopCtrlC leaks one reference
versions: Python 3.8, Python 3.9

___
Python tracker 

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



[issue37278] test_asyncio: ProactorLoopCtrlC leaks one reference

2019-06-14 Thread STINNER Victor


Change by STINNER Victor :


--
keywords: +patch
pull_requests: +13932
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/14074

___
Python tracker 

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



[issue37279] asyncio sendfile sends extra data in the last chunk in fallback mode

2019-06-14 Thread Andrew Svetlov


New submission from Andrew Svetlov :

My fault introduced in 3.7 in initial async sendfile implementation

--
components: asyncio
messages: 345571
nosy: asvetlov, yselivanov
priority: normal
severity: normal
status: open
title: asyncio sendfile sends extra data in the last chunk in fallback mode
type: behavior
versions: Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

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



[issue34520] test_asyncio leaked [2, 2, 2] references, sum=6 in AMD64 Windows8.1 Refleaks 3.7

2019-06-14 Thread STINNER Victor


STINNER Victor  added the comment:

Sadly, without much information, it's hard to guess what leaked nor if the 
issue has been fixed in the meanwhile. So I close the issue as outdated.

I just found a leak in test_asyncio ProactorLoopCtrlC and I proposed a fix: 
https://bugs.python.org/issue37278

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



[issue37278] test_asyncio: ProactorLoopCtrlC leaks one reference

2019-06-14 Thread STINNER Victor


STINNER Victor  added the comment:

bpo-34520 *might* be an old duplicate of this bug.

--

___
Python tracker 

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



[issue37279] asyncio sendfile sends extra data in the last chunk in fallback mode

2019-06-14 Thread Andrew Svetlov


Change by Andrew Svetlov :


--
keywords: +patch
pull_requests: +13933
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/14075

___
Python tracker 

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



[issue37280] Use threadpool for reading from file for sendfile fallback mode

2019-06-14 Thread Andrew Svetlov


New submission from Andrew Svetlov :

We use thread pool executor for loop.sock_sendfile(), there is no reason to 
call blocking code for loop.sendfile()

--
components: asyncio
messages: 345574
nosy: asvetlov, yselivanov
priority: normal
severity: normal
status: open
title: Use threadpool for reading from file for sendfile fallback mode
type: behavior
versions: Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

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



[issue37280] Use threadpool for reading from file for sendfile fallback mode

2019-06-14 Thread Andrew Svetlov


Change by Andrew Svetlov :


--
keywords: +patch
pull_requests: +13934
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/14076

___
Python tracker 

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



[issue37281] asyncio Task._fut_waiter done callback

2019-06-14 Thread Валентин Бурченя

New submission from Валентин Бурченя :

Future has a done_callback, but Task not, why ?
Is a safe to use Task._fut_waiter future done_callback?

--
messages: 345575
nosy: Валентин Бурченя
priority: normal
severity: normal
status: open
title: asyncio Task._fut_waiter done callback
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



[issue37249] Missing declaration of _PyObject_GetMethod

2019-06-14 Thread Inada Naoki


Inada Naoki  added the comment:


New changeset b2f94730d947f25b8507c5f76202e917683e76f7 by Inada Naoki (Jeroen 
Demeyer) in branch 'master':
bpo-37249: add declaration of _PyObject_GetMethod (GH-14015)
https://github.com/python/cpython/commit/b2f94730d947f25b8507c5f76202e917683e76f7


--
nosy: +inada.naoki

___
Python tracker 

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



[issue37249] Missing declaration of _PyObject_GetMethod

2019-06-14 Thread Inada Naoki


Change by Inada Naoki :


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



[issue37281] asyncio Task._fut_waiter done callback

2019-06-14 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
components: +asyncio
nosy: +asvetlov, yselivanov

___
Python tracker 

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



[issue28805] Add documentation for METH_FASTCALL and _PyObject_FastCall*()

2019-06-14 Thread Jeroen Demeyer


Jeroen Demeyer  added the comment:

Victor, of the four functions you mentioned:

- _PyObject_FastCallDict: documented by PEP 590

- _PyObject_FastCallKeywords: renamed _PyObject_Vectorcall and documented by 
PEP 590

- _PyObject_FastCall: not sure if it's useful enough (just use 
_PyObject_Vectorcall with kwnames=NULL)

- _PyObject_CallNoArg: see #37194

So that leaves documenting METH_FASTCALL.

--
nosy: +jdemeyer

___
Python tracker 

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



[issue37281] asyncio Task._fut_waiter done callback

2019-06-14 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

1. Task._fut_waiter is a private API, please avoid it
2. Task class is derived from Future, thus it HAS add_done_callback() method. 
The other question is that from my experience if the application-level code 
uses add_done_callback() the design is not perfect and error-prone. 
add_done_callback() is useful for relatively low-level libraries.

--

___
Python tracker 

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



[issue37278] test_asyncio: ProactorLoopCtrlC leaks one reference

2019-06-14 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Maybe. Agree with your decision to close bpo-34520 as duplicate.

--

___
Python tracker 

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



[issue37282] os problems on absolute paths containing unicode characters on windows

2019-06-14 Thread Jonatã Bolzan Loss

New submission from Jonatã Bolzan Loss :

If a absolute path is provided for some function on os module, it returns 
"WinError 3".

Example (considering you are on C:\Users\username):

import os   
os.mkdir(u'Examşplü')
os.listdir(u'C:\\Users\username\Examşplü')

Result:

Traceback (most recent call last):  
  File "", line 1, in

FileNotFoundError: [WinError 3] The system cannot find the path specified: 
'C:\\Users\\username\\Examşplü'

--
components: Windows
messages: 345580
nosy: Jonatã Bolzan Loss, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: os problems on absolute paths containing unicode characters on windows
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



[issue37278] test_asyncio: ProactorLoopCtrlC leaks one reference

2019-06-14 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 07559450b2d9179e4c99e0af088ce7550e549f94 by Victor Stinner in 
branch 'master':
bpo-37278: Fix test_asyncio ProactorLoopCtrlC (GH-14074)
https://github.com/python/cpython/commit/07559450b2d9179e4c99e0af088ce7550e549f94


--

___
Python tracker 

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



[issue37278] test_asyncio: ProactorLoopCtrlC leaks one reference

2019-06-14 Thread miss-islington


Change by miss-islington :


--
pull_requests: +13935
pull_request: https://github.com/python/cpython/pull/14077

___
Python tracker 

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



[issue37281] asyncio Task._fut_waiter done callback

2019-06-14 Thread Валентин Бурченя

Валентин Бурченя  added the comment:

Sorry, you right! But why not set_result and set_exception?
My code: waiter_task.add_done_callback(lambda f: f.result()) because i don't 
wont to store my running tasks in the array but i must query awaiteable for the 
result.
Thank you for a reply.

--

___
Python tracker 

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



[issue37282] os problems on absolute paths containing unicode characters on windows

2019-06-14 Thread Paul Moore


Paul Moore  added the comment:

This works for me on Python 3.7. Can you confirm if you see the problem on 3.7, 
and if so, provide a more detailed example of how to reproduce?

--

___
Python tracker 

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



[issue37281] asyncio Task._fut_waiter done callback

2019-06-14 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

See bpo-32363

--

___
Python tracker 

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



[issue20443] __code__. co_filename should always be an absolute path

2019-06-14 Thread STINNER Victor


STINNER Victor  added the comment:

The site module tries to compute the absolute path of __file__ and __cached__ 
attributes of all modules in sys.modules:

def abs_paths():
"""Set all module __file__ and __cached__ attributes to an absolute path"""
for m in set(sys.modules.values()):
if (getattr(getattr(m, '__loader__', None), '__module__', None) not in
('_frozen_importlib', '_frozen_importlib_external')):
continue   # don't mess with a PEP 302-supplied __file__
try:
m.__file__ = os.path.abspath(m.__file__)
except (AttributeError, OSError, TypeError):
pass
try:
m.__cached__ = os.path.abspath(m.__cached__)
except (AttributeError, OSError, TypeError):
pass

The __path__ attribute isn't updated.

Another approach would be to hack importlib to compute the absolute path before 
loading a module, rather than trying to fix it *afterwards*.

One pratical problem: posixpath and ntpath are not available when importlib is 
setup, these modules are implemented in pure Python and so must be imported.

Maybe importlib could use a naive implementation of os.path.abspath(). Maybe 
the C function _Py_abspath() that I implemented in PR 14053 should be exposed 
somehow to importlib as a private function using a builtin module like _imp, so 
it can be used directly.

--

___
Python tracker 

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



[issue37281] asyncio Task._fut_waiter done callback

2019-06-14 Thread Валентин Бурченя

Валентин Бурченя  added the comment:

Thanks

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



[issue37278] test_asyncio: ProactorLoopCtrlC leaks one reference

2019-06-14 Thread miss-islington


Change by miss-islington :


--
pull_requests: +13936
pull_request: https://github.com/python/cpython/pull/14078

___
Python tracker 

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



[issue37282] os problems on absolute paths containing unicode characters on windows

2019-06-14 Thread Jonatã Bolzan Loss

Jonatã Bolzan Loss  added the comment:

You are right, my mistake. Sorry about this and thanks for checking :) .

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



[issue35081] Move internal headers to Include/internal/

2019-06-14 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +13937
pull_request: https://github.com/python/cpython/pull/13890

___
Python tracker 

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



[issue37278] test_asyncio: ProactorLoopCtrlC leaks one reference

2019-06-14 Thread miss-islington


miss-islington  added the comment:


New changeset 8b66dbb212d7dffbf9fb545dad2a3400aead1461 by Miss Islington (bot) 
in branch '3.8':
bpo-37278: Fix test_asyncio ProactorLoopCtrlC (GH-14074)
https://github.com/python/cpython/commit/8b66dbb212d7dffbf9fb545dad2a3400aead1461


--
nosy: +miss-islington

___
Python tracker 

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



[issue28805] Add documentation for METH_FASTCALL and _PyObject_FastCall*()

2019-06-14 Thread Jeroen Demeyer


Change by Jeroen Demeyer :


--
keywords: +patch
pull_requests: +13938
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/14079

___
Python tracker 

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



[issue37283] Unexpected behavior when running installer a second time with the same arguments or unattend.xml

2019-06-14 Thread Jörn Jacobi

New submission from Jörn Jacobi :

When executing the installer with arguments or using the unattend.xml to run it 
without UI as documented in 
https://python.readthedocs.io/en/stable/using/windows.html#installing-without-ui
 the installer ignores the arguments or unattend.xml when it's executed again.

The second time, the installer (running i modify mode) uses the default values 
(hereby removing the Prepenpath if set the first time)

(testet with version 3.6.6-amd64 to 3.7.3-amd64 of the executable installer)

To recreate, run the following : 

step 1 :
python-3.6.6-amd64.exe /passive InstallAllUsers=1 PrependPath=1 Include_doc=0 
Include_dev=0 Include_tcltk=0 Include_test=0 SimpleInstall=1 

now python is install as expected.

step 2 : 
python-3.6.6-amd64.exe /passive InstallAllUsers=1 PrependPath=1 Include_doc=0 
Include_dev=0 Include_tcltk=0 Include_test=0 SimpleInstall=1

even though the options are exactly the same, the installer now removes python 
from path and installs tcltk, documentation, test and dev.

step 3 : 
python-3.6.6-amd64.exe /passive InstallAllUsers=1 PrependPath=1 Include_doc=0 
Include_dev=0 Include_tcltk=0 Include_test=0 SimpleInstall=1

now the installer only makes a quick check, what i would have expected in step 
2, but hare only the default values are used.

--
components: Installation
messages: 345589
nosy: Jörn Jacobi
priority: normal
severity: normal
status: open
title: Unexpected behavior when running installer a second time with the same 
arguments or unattend.xml
type: behavior
versions: Python 3.6, Python 3.7

___
Python tracker 

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



[issue37278] test_asyncio: ProactorLoopCtrlC leaks one reference

2019-06-14 Thread STINNER Victor


Change by STINNER Victor :


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



[issue37278] test_asyncio: ProactorLoopCtrlC leaks one reference

2019-06-14 Thread STINNER Victor


STINNER Victor  added the comment:

Thanks for the review Andrew.

--

___
Python tracker 

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



[issue37250] C files generated by Cython set tp_print to NULL: PyTypeObject.tp_print removed, replaced with tp_vectorcall_offset

2019-06-14 Thread Stefan Behnel


Stefan Behnel  added the comment:

I agree with Steve that broadly redefining a global name in a widely used 
header file is not a good idea. You never know what names users have in their 
code. Yes, you can work around it by undef-ing it again, but honestly, in that 
case, both sides are hacks.

--

___
Python tracker 

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



[issue12857] Expose called function on frame object

2019-06-14 Thread kev levrone


kev levrone  added the comment:

def enable_ki_protection(func):
func._trio_keyboard_interrupt_protection_enabled = True
return func

--
nosy: +kevlevrone
Added file: https://bugs.python.org/file48418/122.pdf

___
Python tracker 

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



[issue26145] [WIP] PEP 511: Add sys.set_code_transformers()

2019-06-14 Thread kev levrone


Change by kev levrone :


Added file: https://bugs.python.org/file48419/123.pdf

___
Python tracker 

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



[issue37273] from pickle import rick

2019-06-14 Thread Luiz Amaral

Luiz Amaral  added the comment:

It seemed a good idea when I made the PR, now I feel bad for wasting your time 
😅 sorry guys.

--

___
Python tracker 

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



[issue37283] Unexpected behavior when running installer a second time with the same arguments or unattend.xml

2019-06-14 Thread SilentGhost


Change by SilentGhost :


--
components: +Windows
nosy: +paul.moore, steve.dower, tim.golden, zach.ware

___
Python tracker 

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



[issue37278] test_asyncio: ProactorLoopCtrlC leaks one reference

2019-06-14 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Welcome!
Thanks for the fix!

--

___
Python tracker 

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



[issue37202] Future.cancelled is not set to true immediately after calling Future.cancel

2019-06-14 Thread Andrew Svetlov


Change by Andrew Svetlov :


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



[issue37081] Test with OpenSSL 1.1.1c

2019-06-14 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Duplicate of #35998

--
resolution:  -> duplicate
stage: patch review -> resolved
status: open -> closed
superseder:  -> test_asyncio: test_start_tls_server_1() TimeoutError on Fedora 
29

___
Python tracker 

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



[issue26145] [WIP] PEP 511: Add sys.set_code_transformers()

2019-06-14 Thread STINNER Victor


Change by STINNER Victor :


Removed file: https://bugs.python.org/file48419/123.pdf

___
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-06-14 Thread Andrew Svetlov


Change by Andrew Svetlov :


--
keywords: +patch
pull_requests: +13939
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/14080

___
Python tracker 

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



[issue19865] create_unicode_buffer() fails on non-BMP strings on Windows

2019-06-14 Thread Zackery Spytz


Change by Zackery Spytz :


--
keywords: +patch
pull_requests: +13940
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/14081

___
Python tracker 

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



[issue19865] create_unicode_buffer() fails on non-BMP strings on Windows

2019-06-14 Thread Zackery Spytz


Zackery Spytz  added the comment:

I have created a pull request for this issue. Please take a look.

--
nosy: +ZackerySpytz
versions: +Python 3.9 -Python 3.4, 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



[issue12857] Expose called function on frame object

2019-06-14 Thread Eric Snow


Change by Eric Snow :


Removed file: https://bugs.python.org/file48418/122.pdf

___
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-06-14 Thread miss-islington


Change by miss-islington :


--
pull_requests: +13941
pull_request: https://github.com/python/cpython/pull/14084

___
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-06-14 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset f0749da9a535375f05a2015e8960e8ae54877349 by Victor Stinner 
(Andrew Svetlov) in branch 'master':
bpo-35998: Avoid TimeoutError in test_asyncio: test_start_tls_server_1() 
(GH-14080)
https://github.com/python/cpython/commit/f0749da9a535375f05a2015e8960e8ae54877349


--

___
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-06-14 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +13942
pull_request: https://github.com/python/cpython/pull/14086

___
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-06-14 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Finally fixed

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



[issue34651] Disallow fork in a subinterpreter.

2019-06-14 Thread Eric Snow


Eric Snow  added the comment:

FYI, I plan on looking into this either today or next Friday.

--

___
Python tracker 

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



[issue37274] Scripts folder is empty in python 3.7.3 for windows.

2019-06-14 Thread Steve Dower


Steve Dower  added the comment:

You should have a set of log files in %TEMP%. Can you zip those up and attach 
them here?

Pip may be failing to install for some reason, and while this ought to be 
reported, it is not supposed to cause the entire installation to fail.

--

___
Python tracker 

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



[issue19865] create_unicode_buffer() fails on non-BMP strings on Windows

2019-06-14 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 9765efcb39fc03d5b1abec3924388974470a8bd5 by Victor Stinner 
(Zackery Spytz) in branch 'master':
bpo-19865: ctypes.create_unicode_buffer() supports non-BMP strings on Windows 
(GH-14081)
https://github.com/python/cpython/commit/9765efcb39fc03d5b1abec3924388974470a8bd5


--

___
Python tracker 

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



[issue37275] GetConsole(Output)CP is used even when stdin/stdout is redirected

2019-06-14 Thread Steve Dower


Steve Dower  added the comment:

Isn't the point that device_encoding(FD) gets the encoding of the specified 
file? In this case stdout?

It seems odd that chcp doesn't actually update the console code page here, as 
that is its entire purpose. Perhaps TextIOWrapper is actually getting ACP 
rather than the console encoding through some other path?

--

___
Python tracker 

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



[issue19865] create_unicode_buffer() fails on non-BMP strings on Windows

2019-06-14 Thread miss-islington


Change by miss-islington :


--
pull_requests: +13944
pull_request: https://github.com/python/cpython/pull/14088

___
Python tracker 

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



[issue19865] create_unicode_buffer() fails on non-BMP strings on Windows

2019-06-14 Thread miss-islington


Change by miss-islington :


--
pull_requests: +13943
pull_request: https://github.com/python/cpython/pull/14087

___
Python tracker 

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



[issue37261] test_io leaks references on AMD64 Fedora Rawhide Refleaks 3.8

2019-06-14 Thread miss-islington


Change by miss-islington :


--
pull_requests: +13945
pull_request: https://github.com/python/cpython/pull/14089

___
Python tracker 

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



[issue37193] Memory leak while running TCP/UDPServer with socketserver.ThreadingMixIn

2019-06-14 Thread Wei Li


Wei Li  added the comment:

I got the same problem when uing the ThreadingTCPServer.

I think adding 
"self._threads = list(filter(lambda x: x.is_alive(), self._threads))"
at the last line in process_request method is a potential way to fix the bug

--
nosy: +Wei Li

___
Python tracker 

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



[issue37261] test_io leaks references on AMD64 Fedora Rawhide Refleaks 3.8

2019-06-14 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 212646cae6b7c4ddc8d98c8b9b6d39a5f259e864 by Victor Stinner in 
branch 'master':
bpo-37261: Document sys.unraisablehook corner cases (GH-14059)
https://github.com/python/cpython/commit/212646cae6b7c4ddc8d98c8b9b6d39a5f259e864


--

___
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-06-14 Thread STINNER Victor


STINNER Victor  added the comment:

> Finally fixed

Thank you very much! I looked at this issue 2 or 3 times but I failed to fix 
it. This bug was super annoying: it failed multiple times per week on Fedora 
buildbots.

--

___
Python tracker 

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



[issue34651] Disallow fork in a subinterpreter.

2019-06-14 Thread STINNER Victor


STINNER Victor  added the comment:

See also bpo-37266: "Daemon threads must be forbidden in subinterpreters".

--

___
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-06-14 Thread miss-islington


miss-islington  added the comment:


New changeset 0c2eb6d21013d77e1160250d3cf69ca80215d064 by Miss Islington (bot) 
in branch '3.8':
bpo-35998: Avoid TimeoutError in test_asyncio: test_start_tls_server_1() 
(GH-14080)
https://github.com/python/cpython/commit/0c2eb6d21013d77e1160250d3cf69ca80215d064


--
nosy: +miss-islington

___
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-06-14 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 33feb2e1a391cde91aefcb8d9cf5144b5fbc5d87 by Victor Stinner in 
branch '3.7':
bpo-35998: Avoid TimeoutError in test_asyncio: test_start_tls_server_1() 
(GH-14080) (GH-14086)
https://github.com/python/cpython/commit/33feb2e1a391cde91aefcb8d9cf5144b5fbc5d87


--

___
Python tracker 

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



[issue19865] create_unicode_buffer() fails on non-BMP strings on Windows

2019-06-14 Thread miss-islington


miss-islington  added the comment:


New changeset 0b592d513b073cd3a4ba7632907c25b8282f15ce by Miss Islington (bot) 
in branch '3.7':
bpo-19865: ctypes.create_unicode_buffer() supports non-BMP strings on Windows 
(GH-14081)
https://github.com/python/cpython/commit/0b592d513b073cd3a4ba7632907c25b8282f15ce


--
nosy: +miss-islington

___
Python tracker 

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



[issue19865] create_unicode_buffer() fails on non-BMP strings on Windows

2019-06-14 Thread miss-islington


miss-islington  added the comment:


New changeset b0f6fa8d7d4c6d8263094124df9ef9cf816bbed6 by Miss Islington (bot) 
in branch '3.8':
bpo-19865: ctypes.create_unicode_buffer() supports non-BMP strings on Windows 
(GH-14081)
https://github.com/python/cpython/commit/b0f6fa8d7d4c6d8263094124df9ef9cf816bbed6


--

___
Python tracker 

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



[issue36707] The "m" ABI flag of SOABI for pymalloc is no longer needed

2019-06-14 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +13946
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/14090

___
Python tracker 

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



[issue19865] create_unicode_buffer() fails on non-BMP strings on Windows

2019-06-14 Thread STINNER Victor

STINNER Victor  added the comment:

Thanks Zackery Spytz for the fix. Thanks Gergely Erdélyi for the bug report! 
Sorry for the long delay.

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



[issue37266] Daemon threads must be forbidden in subinterpreters

2019-06-14 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 066e5b1a917ec2134e8997d2cadd815724314252 by Victor Stinner in 
branch 'master':
bpo-37266: Daemon threads are now denied in subinterpreters (GH-14049)
https://github.com/python/cpython/commit/066e5b1a917ec2134e8997d2cadd815724314252


--

___
Python tracker 

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



[issue37266] Daemon threads must be forbidden in subinterpreters

2019-06-14 Thread STINNER Victor


STINNER Victor  added the comment:

Daemon threads must die. That's a first step towards their death!

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



[issue37261] test_io leaks references on AMD64 Fedora Rawhide Refleaks 3.8

2019-06-14 Thread miss-islington


miss-islington  added the comment:


New changeset 3b976d19c8c09e83eec63a5b62daf4d55bfd6aeb by Miss Islington (bot) 
in branch '3.8':
bpo-37261: Document sys.unraisablehook corner cases (GH-14059)
https://github.com/python/cpython/commit/3b976d19c8c09e83eec63a5b62daf4d55bfd6aeb


--

___
Python tracker 

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



[issue37283] Unexpected behavior when running installer a second time with the same arguments or unattend.xml

2019-06-14 Thread Steve Dower


Steve Dower  added the comment:

Hmm... interesting.

Thanks for the heads-up, I think I know what this may be (there's a conditional 
planning stage in the bootstrapper that is probably being skipped on Modify). 
I'll take a look when I get a chance.

--
assignee:  -> steve.dower

___
Python tracker 

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



[issue32280] Expose `_PyRuntime` through a section name

2019-06-14 Thread Eric Snow


Eric Snow  added the comment:

(Sorry for the delay!)

Is the need for a named section due to the fact that _PyRuntime is part of the 
"internal" C-API (hidden behind the Py_BUILD_CORE macro)?  I.E. would it help 
to build with Py_BUILD_CORE?


Regarding the GIL:

The plan for 3.9 is to have one GIL per interpreter, so the relevant struct 
would be PyInterpreterState (a part of the public C-API).  That would be 
accessible at runtime via the fields of _PyRuntime.interpreters.


Regarding what I said before about multiple runtimes per process:

Honestly, I've yet to see any use case that would justify providing 
multi-runtime support.  However, there are code-health benefits to keeping 
*all* runtime state out of static globals.  So eliminating the _PyRuntime 
static variable is still a realistic possibility (for 3.9 or maybe later).

If that happens then there would have to be a new embedding C-API oriented 
around (opaque) PyRuntimestate pointers.  See PEP 432 and 587 for ongoing work 
to improve the embedding experience (for runtime initialization), including 
what the successors to Py_Initialize() look like.

--
versions: +Python 3.9 -Python 3.8

___
Python tracker 

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



[issue35876] test_start_new_session for posix_spawnp fails

2019-06-14 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 5884043252473ac733aba1d3251d4debe72511e5 by Victor Stinner in 
branch 'master':
bpo-35537: Rewrite setsid test for os.posix_spawn (GH-11721)
https://github.com/python/cpython/commit/5884043252473ac733aba1d3251d4debe72511e5


--

___
Python tracker 

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



[issue35537] use os.posix_spawn in subprocess

2019-06-14 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 5884043252473ac733aba1d3251d4debe72511e5 by Victor Stinner in 
branch 'master':
bpo-35537: Rewrite setsid test for os.posix_spawn (GH-11721)
https://github.com/python/cpython/commit/5884043252473ac733aba1d3251d4debe72511e5


--

___
Python tracker 

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



[issue35537] use os.posix_spawn in subprocess

2019-06-14 Thread miss-islington


Change by miss-islington :


--
pull_requests: +13947
pull_request: https://github.com/python/cpython/pull/14093

___
Python tracker 

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



[issue35876] test_start_new_session for posix_spawnp fails

2019-06-14 Thread miss-islington


Change by miss-islington :


--
pull_requests: +13948
pull_request: https://github.com/python/cpython/pull/14093

___
Python tracker 

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



[issue35876] test_start_new_session for posix_spawnp fails

2019-06-14 Thread STINNER Victor


STINNER Victor  added the comment:

I rewrote and reenabled the test. It should now be fixed in master, and the 3.8 
backport is coming soon.

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



[issue37275] GetConsole(Output)CP is used even when stdin/stdout is redirected

2019-06-14 Thread Eryk Sun

Eryk Sun  added the comment:

> # Power Shell 6 (use cp65001 by default)
> PS C:¥> python3 -c "print('おはよう')" > ps.txt

PowerShell standard I/O redirection is different from any shell I've ever used. 
In this case, it runs Python with StandardOutput set to a handle for a pipe 
instead of a handle for the file. It decodes Python's output using whatever 
encoding is configured for input and re-encodes it with whatever encoding is 
configured for output. 

To see what Python is actually writing, try using Start-Process with 
StandardOutput redirected to the file. For example:

Start-Process -FilePath python3.exe -ArgumentList "-c `"print('おはよう')`"" 
-NoNewWindow -Wait -RedirectStandardOutput ps.txt

> # cmd.exe
> C:¥> chcp 65001
> C:¥> python3 -c "print('おはよう')" > cmd.txt

CMD uses simple redirection, like every other shell I've ever used. It runs 
python3.exe with a handle for the file as its StandardOutput. So "cmd.txt" 
contains exactly what Python writes.

> * TextIOWrapper tries `os.device_encoding(1)`
> * `os.device_encoding(1)` use GetConsoleOutputCP() without checking stdout is 
> console

No, _Py_device_encoding returns None if the isatty(fd) is false, i.e. for a 
pipe or disk file. In this case, TextIOWrapper defaults to the encoding from 
locale.getpreferredencoding().

The current preferred encoding is the system ANSI codepage from GetACP(). 
Changing the default to UTF-8 would be disruptive. You can use UTF-8 mode (i.e. 
-X utf8). Or, to override just stdin, stdout, and stderr, set the environment 
variable "PYTHONIOENCODING=utf-8".

> In the example above, a console is attached when python is called from 
> Power Shell 6, but it is not attached when python is called from 
> cmd.exe.

In both cases the Python process inherits the console of the parent shell. The 
only way to run python.exe without a console is to use the CreateProcess 
creation flag DETACHED_PROCESS.

> There is a relating issue: UTF-8 mode doesn't override 
> stdin,stdout,stderr encoding when console is attached.

It works for me. For example, testing with stdout redirected to a pipe:

C:\>python -c "import sys;print(sys.stdout.encoding)" | more
cp1252

C:\>python -X utf8 -c "import sys;print(sys.stdout.encoding)" | more
utf-8

--

___
Python tracker 

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



[issue35876] test_start_new_session for posix_spawnp fails

2019-06-14 Thread miss-islington


miss-islington  added the comment:


New changeset e696b15a62dd0c85fe6ed3c9698b5f889c0bb1b3 by Miss Islington (bot) 
in branch '3.8':
bpo-35537: Rewrite setsid test for os.posix_spawn (GH-11721)
https://github.com/python/cpython/commit/e696b15a62dd0c85fe6ed3c9698b5f889c0bb1b3


--
nosy: +miss-islington

___
Python tracker 

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



[issue35537] use os.posix_spawn in subprocess

2019-06-14 Thread miss-islington


miss-islington  added the comment:


New changeset e696b15a62dd0c85fe6ed3c9698b5f889c0bb1b3 by Miss Islington (bot) 
in branch '3.8':
bpo-35537: Rewrite setsid test for os.posix_spawn (GH-11721)
https://github.com/python/cpython/commit/e696b15a62dd0c85fe6ed3c9698b5f889c0bb1b3


--
nosy: +miss-islington

___
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-06-14 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Thanks for the review, Victor!
I have had to fix it much earlier :(

--

___
Python tracker 

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



[issue37284] Not obvious that new required attrs of sys.implementation must have a PEP.

2019-06-14 Thread Eric Snow


New submission from Eric Snow :

PEP 421 added sys.implementation for Python implementors to provide values 
required by stdlib code (e.g. importlib).  That PEP indicates that any new 
required attributes must go through the PEP process. [1]  That requirement 
isn't obvious.

To fix that we should add a brief note to the sys.implementation docs [2] 
identifying the requirement.


[1] https://www.python.org/dev/peps/pep-0421/#adding-new-required-attributes
[2] https://docs.python.org/3/library/sys.html#sys.implementation

--
assignee: docs@python
components: Documentation
keywords: easy
messages: 345624
nosy: cheryl.sabella, docs@python, eric.snow
priority: normal
severity: normal
stage: needs patch
status: open
title: Not obvious that new required attrs of sys.implementation must have a 
PEP.
versions: Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

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



[issue37271] Make multiple passes of the peephole optimizer until bytecode cannot be optimized further

2019-06-14 Thread Brett Cannon


Change by Brett Cannon :


--
nosy: +brett.cannon

___
Python tracker 

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



[issue36785] Implement PEP 574

2019-06-14 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

Now complete, closing :-)

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



[issue37285] Python 2.7 setup.py incorrectly double-joins SDKROOT

2019-06-14 Thread Misty De Méo

New submission from Misty De Méo :

Python 2.7's setup.py has incorrect behaviour when adding the SDKROOT to the 
beginning of the include path while searching.

When searching paths, find_file first checks is_macosx_sdk_path  to see if it 
needs to add the sdk_root: 
https://github.com/python/cpython/blob/2.7/setup.py#L87-L88

This is mostly correct, except one of the path prefixes it checks is /Library: 
https://github.com/python/cpython/blob/2.7/setup.py#L64

The Xcode CLT path is located in /Library, so this check passes. That means the 
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk portion of the path 
gets repeated, leading to an invalid path.

I recognize Python 2.7 isn't in active development, but I have a minimal patch 
to fix this that I will be submitting.

--
components: Build
messages: 345626
nosy: mistydemeo
priority: normal
severity: normal
status: open
title: Python 2.7 setup.py incorrectly double-joins SDKROOT
type: compile error
versions: Python 2.7

___
Python tracker 

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



[issue37285] Python 2.7 setup.py incorrectly double-joins SDKROOT

2019-06-14 Thread Misty De Méo

Change by Misty De Méo :


--
keywords: +patch
pull_requests: +13949
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/14095

___
Python tracker 

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



[issue32178] Some invalid email address groups cause an IndexError instead of a HeaderParseError

2019-06-14 Thread Abhilash Raj


Abhilash Raj  added the comment:

I don't think this is an issue anymore, I guess this was fixed as a part of 
some other PR.

I tested this out on a recent branch:

   >>> import email
   >>> msg = email.message_from_string('From: Abhilash  
')
   >>> msg['From'] 
   'Abhilash  '

@david, @barry: I think we can close this issue.

--
nosy: +maxking

___
Python tracker 

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



[issue32179] Empty email address in headers triggers an IndexError

2019-06-14 Thread Abhilash Raj


Abhilash Raj  added the comment:

I wasn't able to reproduce this on the latest master. Probably fixed as a part 
of some other PR.

>>> msg = email.message_from_string('ReplyTo: ""')
>>> msg

>>> msg['ReplyTo']
'""'

I think this issue can be closed.

--
nosy: +maxking

___
Python tracker 

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



[issue31445] Index out of range in get of message.EmailMessage.get()

2019-06-14 Thread Abhilash Raj


Abhilash Raj  added the comment:

I can't reproduce this issue on the latest master branch. This seems to be 
fixed as a part of a different PR I suppose.

>>> import email
>>> msg = email.message_from_string("From: Bonifac Karaka : 
boni...@gmail.com")
>>> msg['From']
'Bonifac Karaka : boni...@gmail.com'

This is very similar to bpo-32178, which also is now fixed.

@david, @barry, I think we can close this issue.

--
nosy: +maxking

___
Python tracker 

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



[issue37286] Pasting emoji crashes IDLE

2019-06-14 Thread Miłosz

New submission from Miłosz :

On Windows 10

--
assignee: terry.reedy
components: IDLE
messages: 345630
nosy: md37, terry.reedy
priority: normal
severity: normal
status: open
title: Pasting emoji crashes IDLE
type: crash
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



[issue29412] IndexError thrown on email.message.Message.get

2019-06-14 Thread Abhilash Raj


Abhilash Raj  added the comment:

I can't reproduce this problem with the latest master branch, it was perhaps 
fixed with some other PR. 

This is also a dupe of bpo-31445.

@barry, @david: I think this issue can be closed.

--
nosy: +maxking

___
Python tracker 

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



  1   2   >