[issue32806] locally imported modules are unaccessible in lambdas in pdb

2018-02-10 Thread Nitish

Change by Nitish :


--
nosy: +nitishch

___
Python tracker 

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



[issue32813] SSL shared_ciphers implementation wrong - returns configured but not shared ciphers

2018-02-10 Thread Ned Deily

Ned Deily  added the comment:

Christian, what is your take on the criticality of this?

--
nosy: +ned.deily

___
Python tracker 

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



[issue32818] multiprocessing segmentfault under Windows compatibility mode

2018-02-10 Thread Ma Lin

Ma Lin  added the comment:

Here is two traceback messages:

D:\git\cpython\PCbuild\win32>python.exe -X dev 
d:\git\cpython\Lib\test\test_multiprocess
ing_main_handling.py
ssF
==
FAIL: test_basic_script (__main__.SpawnCmdLineTest)
--
Traceback (most recent call last):
  File "d:\git\cpython\Lib\test\test_multiprocessing_main_handling.py", line 
162, in test_basic_script
self._check_script(script_name)
  File "d:\git\cpython\Lib\test\test_multiprocessing_main_handling.py", line 
156, in _check_script
rc, out, err = assert_python_ok(*run_args, __isolated=False)
  File "D:\git\cpython\lib\test\support\script_helper.py", line 151, in 
assert_python_ok

return _assert_python(True, *args, **env_vars)
  File "D:\git\cpython\lib\test\support\script_helper.py", line 137, in 
_assert_python
res.fail(cmd_line)
  File "D:\git\cpython\lib\test\support\script_helper.py", line 79, in fail
err))
AssertionError: Process return code is 3221225477
command line: ['D:\\git\\cpython\\PCbuild\\win32\\python.exe', '-X', 
'faulthandler', '-E
', 'C:\\Users\\anima\\AppData\\Local\\Temp\\tmplgfds7rc\\script.py', 'spawn']

stdout:
---

---

stderr:
---
Windows fatal exception: access violation

Current thread 0x1930 (most recent call first):
  File "D:\git\cpython\lib\multiprocessing\popen_spawn_win32.py", line 48 in 
__init__
  File "D:\git\cpython\lib\multiprocessing\context.py", line 322 in _Popen
  File "D:\git\cpython\lib\multiprocessing\process.py", line 112 in start
  File "D:\git\cpython\lib\multiprocessing\pool.py", line 241 in 
_repopulate_pool
  File "D:\git\cpython\lib\multiprocessing\pool.py", line 176 in __init__
  File "D:\git\cpython\lib\multiprocessing\context.py", line 119 in Pool
  File "C:\Users\anima\AppData\Local\Temp\tmplgfds7rc\script.py", line 27 in 

---

==
FAIL: test_basic_script_no_suffix (__main__.SpawnCmdLineTest)
--
Traceback (most recent call last):
  File "d:\git\cpython\Lib\test\test_multiprocessing_main_handling.py", line 
168, in test_basic_script_no_suffix
self._check_script(script_name)
  File "d:\git\cpython\Lib\test\test_multiprocessing_main_handling.py", line 
156, in _check_script
rc, out, err = assert_python_ok(*run_args, __isolated=False)
  File "D:\git\cpython\lib\test\support\script_helper.py", line 151, in 
assert_python_ok

return _assert_python(True, *args, **env_vars)
  File "D:\git\cpython\lib\test\support\script_helper.py", line 137, in 
_assert_python
res.fail(cmd_line)
  File "D:\git\cpython\lib\test\support\script_helper.py", line 79, in fail
err))
AssertionError: Process return code is 3221225477
command line: ['D:\\git\\cpython\\PCbuild\\win32\\python.exe', '-X', 
'faulthandler', '-E
', 'C:\\Users\\anima\\AppData\\Local\\Temp\\tmpkovn5nfz\\script', 'spawn']

stdout:
---

---

stderr:
---
Windows fatal exception: access violation

Current thread 0x1d00 (most recent call first):
  File "D:\git\cpython\lib\multiprocessing\popen_spawn_win32.py", line 48 in 
__init__
  File "D:\git\cpython\lib\multiprocessing\context.py", line 322 in _Popen
  File "D:\git\cpython\lib\multiprocessing\process.py", line 112 in start
  File "D:\git\cpython\lib\multiprocessing\pool.py", line 241 in 
_repopulate_pool
  File "D:\git\cpython\lib\multiprocessing\pool.py", line 176 in __init__
  File "D:\git\cpython\lib\multiprocessing\context.py", line 119 in Pool
  File "C:\Users\anima\AppData\Local\Temp\tmpkovn5nfz\script", line 27 in 

---

--

___
Python tracker 

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



[issue32811] test_os.py fails when run in docker container on OSX host

2018-02-10 Thread Ned Deily

Ned Deily  added the comment:

Thanks for the elaboration.  Your report wasn't confusing.  The fact remains 
that we don't test or claim to support Python running under Docker on macOS.  
If someone wants to investigate further (and re-open this issue), they are 
welcome to but I personally have no interest in it.  Just taking a quick look 
at the Docker for Mac documentation indicates it implements its own file 
system, osxfs, with its own quirks.  So, if that is in use, it could very well 
be the source of the test failures.  I would think that running containers 
under Docker on macOS would be enough of a different animal that it would need 
to be considered a new platform with regard to Python support.  Unless someone 
steps up and wants to fully support such a configuration (which would mean a 
buildbot among other things), I don't think we want to go down that path.  
Sorry!

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



[issue32818] multiprocessing segmentfault under Windows compatibility mode

2018-02-10 Thread Ma Lin

New submission from Ma Lin :

Reproduce:
Right click python.exe -> properties -> compatibility tab -> enable 
compatibility mode (e.g. Windows 7)

Then run this test will get a segmentfault: 
test_multiprocessing_main_handling.py

CPython 3.6 is Ok.

--
components: Windows
messages: 311980
nosy: Ma Lin, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: multiprocessing segmentfault under Windows compatibility mode
type: crash
versions: Python 3.7, Python 3.8

___
Python tracker 

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



[issue32585] Add ttk::spinbox to tkinter.ttk

2018-02-10 Thread Alan Moore

Alan Moore  added the comment:

Thank you for all your help!

On 02/09/2018 05:41 AM, Serhiy Storchaka wrote:
> Serhiy Storchaka  added the comment:
>
> Thank you for your contribution Alan!
>
> --
> resolution:  -> fixed
> stage: patch review -> resolved
> status: open -> closed
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue32731] getpass.getuser() raises an unspecified exceptions (ImportError, OSError, etc)

2018-02-10 Thread Fangyi Zhou

Change by Fangyi Zhou :


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

___
Python tracker 

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



[issue32758] Stack overflow when parse long expression to AST

2018-02-10 Thread Brett Cannon

Brett Cannon  added the comment:

The other option is to simply not worry about it and acknowledge you can
crash the compiler with a crazy-sized expression. Option 1 is too much work
and option 2 takes us from an AST to more of an s-expression format which
is a significant shift in design (now if people want to make that kind of
change that's fine, but it should be consistent across the board).

On Sat, Feb 10, 2018, 14:30 Serhiy Storchaka, 
wrote:

>
> Serhiy Storchaka  added the comment:
>
> On Linux the limit is much larger that 2**15. This depends on the stack
> size, it is smaller on Windows.
>
> The stack is overflowed by recursive call of ast2obj_expr in
> Python/Python-ast.c. The same problem exists in other recursive AST
> processing code: optimizing, unparsing. This is why 3.7 can crash in cases
> when 3.6 was not crashed.
>
> I don't see an easy way of fixing this. The common way is surrounding
> recursive calls with Py_EnterRecursiveCall()/Py_LeaveRecursiveCall(). But
> this make the limit too small (1000 by default). In other cases it is
> enough. The data structures with 1000 levels of nesting are rare. In any
> case the Python compiler has lower limit on nesting indented blocks. But in
> this case the linear sequence of binary operators is compiled to deeply
> nested structure.
>
> I see two hard ways of properly fixing this.
>
> 1. Rewrite all AST expression processing code with using an explicit stack
> instead of function stack. This will complicate a lot of C code too much.
> Python code should be rewritten too if you don't want to get a
> RecursionError in corner cases, but for common cases it can be left
> unmodified.
>
> 2. Change binary operations representation, so that a+b+c+d will be
> represented as ('+', (a, b, c, d)) instead of ('+', ('+', ('+', a, b), c),
> d). This is backward incompatible change and needs to rewrite any AST
> processing code (in C and Python). This solution can't be backported. But
> the resulting code will be simpler than when rewrite them for the first
> approach.
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue19495] context manager for measuring duration of blocks of code

2018-02-10 Thread Xavier G. Domingo

Change by Xavier G. Domingo :


--
nosy: +xgdomingo

___
Python tracker 

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



[issue32767] Mutating a list while iterating: clarify the docs

2018-02-10 Thread Tim Peters

Tim Peters  added the comment:

Stefan, yup!  Thank you.  `array.array` and `bytearray` iterators appear to 
work the same way as `list` iterators here.

Terry, the note in the `for` statement docs was written before there _was_ an 
iterator protocol.  For example, here are the 1.5.1 docs:

https://docs.python.org/release/1.5.1/ref/ref-9.html#HEADING9-27

Back then, the expression_list had to evaluate to a "string, tuple or list".  
Or so the docs said - I don't remember the implementation details.

Regardless, I think we all agree the note is at best out of date ;-)

--

___
Python tracker 

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



[issue32751] wait_for(future, ...) should wait for the future (even if a timeout occurs)

2018-02-10 Thread Xavier G. Domingo

Change by Xavier G. Domingo :


--
nosy: +xgdomingo

___
Python tracker 

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



[issue24255] Replace debuglevel-related logic with logging

2018-02-10 Thread Xavier G. Domingo

Change by Xavier G. Domingo :


--
nosy: +xgdomingo

___
Python tracker 

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



[issue32767] Mutating a list while iterating: clarify the docs

2018-02-10 Thread Xavier G. Domingo

Change by Xavier G. Domingo :


--
nosy: +xgdomingo

___
Python tracker 

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



[issue32810] Expose ags_gen and agt_gen in asynchronous generators

2018-02-10 Thread Xavier G. Domingo

Change by Xavier G. Domingo :


--
nosy: +xgdomingo

___
Python tracker 

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



[issue32397] textwrap output may change if you wrap a paragraph twice

2018-02-10 Thread Larry Hastings

Change by Larry Hastings :


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

___
Python tracker 

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



[issue32800] Replace deprecated link to new page on w3c site

2018-02-10 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

I meant, could have been done without a bpo issue.  And since the blurb was 
added, I kept it.  Thanks 'sbondon'.

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



[issue32800] Replace deprecated link to new page on w3c site

2018-02-10 Thread Terry J. Reedy

Terry J. Reedy  added the comment:


New changeset ea6e6444bdf983c99d9175a22dd054bf02ee22b4 by Terry Jan Reedy (Miss 
Islington (bot)) in branch '2.7':
bpo-32800: Update link to w3c doc for xml default namespaces (GH-5609) (GH-5613)
https://github.com/python/cpython/commit/ea6e6444bdf983c99d9175a22dd054bf02ee22b4


--

___
Python tracker 

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



[issue32800] Replace deprecated link to new page on w3c site

2018-02-10 Thread Terry J. Reedy

Terry J. Reedy  added the comment:


New changeset 9d8c24b79162711551394c8f8e6002342554791b by Terry Jan Reedy (Miss 
Islington (bot)) in branch '3.6':
bpo-32800: Update link to w3c doc for xml default namespaces (GH-5609) GH-5612)
https://github.com/python/cpython/commit/9d8c24b79162711551394c8f8e6002342554791b


--

___
Python tracker 

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



[issue32811] test_os.py fails when run in docker container on OSX host

2018-02-10 Thread Alexander Mohr

Alexander Mohr  added the comment:

here's how to repro, download fresh debian:stretch image, then install reqs for 
python:
apt-get update && apt-get install curl build-essential libssl-dev libffi-dev 
libmemcached-dev zlib1g-dev

install pyenv-installer:
curl -L 
https://raw.githubusercontent.com/pyenv/pyenv-installer/master/bin/pyenv-installer
 | bash

install and activate python3.6.3:
pyenv install 3.6.3 && pyenv global 3.6.3

run attached test script which I generated from the unittest

--
Added file: https://bugs.python.org/file47436/test.py

___
Python tracker 

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



[issue32394] socket lib beahavior change in 3.6.4

2018-02-10 Thread Ma Lin

Ma Lin  added the comment:

PR 5523 is prepared for master/3.7 branches.
PR 5585 is prepared for 3.6 branch.

--

___
Python tracker 

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



[issue32811] test_os.py fails when run in docker container on OSX host

2018-02-10 Thread Alexander Mohr

Alexander Mohr  added the comment:

sorry if my report is confusing, the issue is when run in a debian:stretch 
docker container on an OSX host, so running this: docker run --rm -ti 
docker:stretch on osx.  So if you have access to an OSX machine and have docker 
running (18.02.0-ce-mac53) on your OSX machine it should reproduce there.

--

___
Python tracker 

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



[issue32800] Replace deprecated link to new page on w3c site

2018-02-10 Thread Terry J. Reedy

Terry J. Reedy  added the comment:


New changeset e6033209754c5b01870791645044a791da1fa73f by Terry Jan Reedy (Miss 
Islington (bot)) in branch '3.7':
bpo-32800: Update link to w3c doc for xml default namespaces (GH-5609) (GH-5611)
https://github.com/python/cpython/commit/e6033209754c5b01870791645044a791da1fa73f


--

___
Python tracker 

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



[issue32792] ChainMap should preserve order of underlying mappings

2018-02-10 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Sorry, I was wrong. reversed() is not needed here.

The advantage of this implementation is that it can be faster because of 
iterating mappings in C code instead of Python code. But the side effect of it 
is that the iterator keeps references to all values. If this is not desirable, 
the code can be written something like:

return iter(dict.fromkeys(itertools.chain.from_iterable(self.maps)))

--

___
Python tracker 

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



[issue19675] Pool dies with excessive workers, but does not cleanup

2018-02-10 Thread Julien Palard

Change by Julien Palard :


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

___
Python tracker 

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



[issue32800] Replace deprecated link to new page on w3c site

2018-02-10 Thread miss-islington

Change by miss-islington :


--
pull_requests: +5423

___
Python tracker 

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



[issue32813] SSL shared_ciphers implementation wrong - returns configured but not shared ciphers

2018-02-10 Thread Christian Heimes

Christian Heimes  added the comment:

SSL_get_shared_ciphers() won't help either. Internally it gets the ciphers from 
s->session->ciphers just like SSL_get_client_ciphers(). It doesn't perform 
additional filtering.

https://github.com/openssl/openssl/blob/OpenSSL_1_0_2f/ssl/ssl_lib.c#L1392-L1427

"works well for SSLv2, not so good for SSLv3" :/

--

___
Python tracker 

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



[issue32800] Replace deprecated link to new page on w3c site

2018-02-10 Thread miss-islington

Change by miss-islington :


--
pull_requests: +5422

___
Python tracker 

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



[issue32800] Replace deprecated link to new page on w3c site

2018-02-10 Thread Terry J. Reedy

Terry J. Reedy  added the comment:


New changeset 8d1f2f40389c476d9240ec87a33da0373597c6af by Terry Jan Reedy 
(sblondon) in branch 'master':
bpo-32800: Update link to w3c doc for xml default namespaces (GH-5609)
https://github.com/python/cpython/commit/8d1f2f40389c476d9240ec87a33da0373597c6af


--

___
Python tracker 

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



[issue32800] Replace deprecated link to new page on w3c site

2018-02-10 Thread miss-islington

Change by miss-islington :


--
pull_requests: +5421

___
Python tracker 

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



[issue32813] SSL shared_ciphers implementation wrong - returns configured but not shared ciphers

2018-02-10 Thread Christian Heimes

Christian Heimes  added the comment:

Yeah, looks like I used the wrong API when I ported to Python to OpenSSL 1.1.0, 
because there is no correct API.

For

client_context.set_ciphers("AES128-SHA256:AES256-SHA256")
server_context.set_ciphers("AES128-SHA:AES256-SHA256")

I'm getting:

client_ciphers = {'AES128-SHA256', 'AES256-SHA256'}
server_ciphers = {'AES256-SHA256', 'AES128-SHA'}
shared_ciphers = {'AES128-SHA256', 'AES256-SHA256'}  # SSL_get_client_ciphers()
shared_ciphers = {'AES256-SHA256', 'AES128-SHA'}  # SSL_get_ciphers()

which are clearly both wrong. The only shared cipher is {'AES256-SHA256'}.

--

___
Python tracker 

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



[issue32801] Lib/_strptime.py: utilize all()

2018-02-10 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

And the conditional return can be done before sorting.

--

___
Python tracker 

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



[issue32800] Replace deprecated link to new page on w3c site

2018-02-10 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Agreed.  This could have been done without a PR.

--

___
Python tracker 

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



[issue32813] SSL shared_ciphers implementation wrong - returns configured but not shared ciphers

2018-02-10 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

I suppose we should fix .shared_ciphers to be SSL_get_shared_ciphers() again 
and perhaps add .client_ciphers, which calls SSL_get_client_ciphers?

--

___
Python tracker 

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



[issue32817] MethodType ImportError, can't convert .py to .exe

2018-02-10 Thread R. David Murray

R. David Murray  added the comment:

PyInstaller is not part of the python standard library, you'll have to contact 
its community for help with this.

--
nosy: +r.david.murray
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



[issue32813] SSL shared_ciphers implementation wrong - returns configured but not shared ciphers

2018-02-10 Thread Steffen Ullrich

Steffen Ullrich  added the comment:

It looks like the function shared_ciphers actually returned the list of client 
ciphers when initially implemented although I think that the name is misleading 
and suggests that it would return the ciphers shared between client and server 
(i.e. same meaning of shared as in the infamous "no shared cipher" SSL 
handshake problem).

Anyway, it looks like the original functionality was broken while adding 
support for OpenSSL 1.1.0 "Issue #26470: Port ssl and hashlib module to OpenSSL 
1.1.0.". The relevant part of this change: 
https://github.com/python/cpython/commit/598894ff48e9c1171cb2ec1c798235826a75c7e0#diff-e1cc5bf74055e388cda128367a814c8fR1534

--

___
Python tracker 

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



[issue32814] smtplib.send_message mishandles 8BITMIME RFC 6152

2018-02-10 Thread R. David Murray

R. David Murray  added the comment:

I agree.  I'll be happy to review a patch proposal.  Not sure how I overlooked 
this when I implemented send_message, but that was early enough in my reading 
of all the RFC that I may have just missed that detail :(

--

___
Python tracker 

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



[issue32755] Several cookies with the same name get intermixed

2018-02-10 Thread R. David Murray

R. David Murray  added the comment:

Well, "supersedes" sounds like all the old cookie values should be discarded, 
so I'd be inclined to call this a bug.  On the other hand, programs could be 
(inadvertently, probably) depending on this behavior, so I'd also be inclined 
to only fix it in the next release, since it is a non-trivial behavior change.  
I'm open to argument on that, though.

--

___
Python tracker 

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



[issue32800] Replace deprecated link to new page on w3c site

2018-02-10 Thread Mariatta Wijaya

Mariatta Wijaya  added the comment:

I think the news blurb is not needed though.

--

___
Python tracker 

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



[issue32800] Replace deprecated link to new page on w3c site

2018-02-10 Thread Mariatta Wijaya

Mariatta Wijaya  added the comment:

> If you cannot set the backport labels (I don't know of non-committer author's 
> are allowed to, mention that all 3 are needed in a comment (I checked 2.7 and 
> 3.8)

Only committers (and the bots) can apply labels :) I've applied the necessary 
labels.

--
nosy: +Mariatta

___
Python tracker 

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



[issue32813] SSL shared_ciphers implementation wrong - returns configured but not shared ciphers

2018-02-10 Thread Christian Heimes

Christian Heimes  added the comment:

Benjamin, you implemented the feature in bpo23186. Do you have any idea what's 
going on?

--
assignee:  -> christian.heimes
components: +SSL
nosy: +alex, benjamin.peterson, dstufft, janssen
versions:  -Python 3.5

___
Python tracker 

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



[issue32817] MethodType ImportError, can't convert .py to .exe

2018-02-10 Thread LaurentiuS

Change by LaurentiuS :


--
title: MethodType ImportError, can't use random.py -> MethodType ImportError, 
can't convert .py to .exe

___
Python tracker 

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



[issue32817] MethodType ImportError, can't use random.py

2018-02-10 Thread LaurentiuS

New submission from LaurentiuS :

Whenever I'd convert .py to .exe with pyinstaller, this error would occur. I 
have already reinstalled Python, and yet the error remains.
When i import random to Python IDLE, it runs it without any problems.

--
components: Windows
files: qwerqrwe.PNG
messages: 311955
nosy: LaurentiuS, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: MethodType ImportError, can't use random.py
type: behavior
versions: Python 3.6
Added file: https://bugs.python.org/file47435/qwerqrwe.PNG

___
Python tracker 

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



[issue11015] Bring test.support docs up to date

2018-02-10 Thread Cheryl Sabella

Cheryl Sabella  added the comment:

I have created a pull request adding documentation for all of test.support, 
including script_helper.py.  I hope this will be helpful.

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



[issue11015] Bring test.support docs up to date

2018-02-10 Thread Cheryl Sabella

Change by Cheryl Sabella :


--
pull_requests: +5420

___
Python tracker 

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



[issue32816] Python's json dumps/loads make integer keys of the dict str

2018-02-10 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

See the documentation. This is documented behavior. The JSON format supports 
only string keys, and all keys are coerced to strings when serialized to JSON.

--
nosy: +serhiy.storchaka
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



[issue32816] Python's json dumps/loads make integer keys of the dict str

2018-02-10 Thread Korabelnikov Aleksandr via Python-bugs-list

New submission from Korabelnikov Aleksandr :

when i serialize and deserialize python built-in structure I'm expect output 
same as input

arr2 = [1,2,'3']
arr2_json = json.dumps(arr2)
json.loads(arr2_json)
Out[16]: [1, 2, '3']

BUT when I'm tring do it with dict I got str keys instead of integer

dict1 = {0: 'object0', '1': 'object2'}
json1 = json.dumps(dict1)
json.loads(json1)
Out[6]: {'0': 'object0', '1': 'object2'}

Notice keys must be [0, '1'] but actually are ['0', '1']

--
components: Library (Lib)
messages: 311951
nosy: solin
priority: normal
severity: normal
status: open
title: Python's json dumps/loads make integer keys of the dict str
type: behavior
versions: Python 3.5

___
Python tracker 

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



[issue32370] Wrong ANSI encoding used by subprocess for some locales

2018-02-10 Thread Steve Dower

Steve Dower  added the comment:

The patch looks good, but the rest of the code for this looks horrible(and 
potentially a security risk)... maybe we ought to take this fix for now but 
prioritise replacing this whole function with a C implementation or at least a 
better search for the ipconfig tool.

--

___
Python tracker 

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



[issue32813] SSL shared_ciphers implementation wrong - returns configured but not shared ciphers

2018-02-10 Thread Ned Deily

Change by Ned Deily :


--
nosy: +christian.heimes

___
Python tracker 

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



[issue32800] Replace deprecated link to new page on w3c site

2018-02-10 Thread sblondon

Change by sblondon :


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

___
Python tracker 

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



[issue8796] Deprecate codecs.open()

2018-02-10 Thread Me01100Nobody

Change by Me01100Nobody :


--
nosy: +Me01100Nobody

___
Python tracker 

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



[issue32370] Wrong ANSI encoding used by subprocess for some locales

2018-02-10 Thread Segev Finer

Change by Segev Finer :


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



[issue32370] Wrong ANSI encoding used by subprocess for some locales

2018-02-10 Thread Segev Finer

Change by Segev Finer :


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

___
Python tracker 

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



[issue32810] Expose ags_gen and agt_gen in asynchronous generators

2018-02-10 Thread David Beazley

David Beazley  added the comment:

I've attached a file that illustrates the issue.

(Side thought: this would be nice to have in inspect or traceback)

--
Added file: https://bugs.python.org/file47434/agen.py

___
Python tracker 

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



[issue32815] Document text parameter to subprocess.Popen

2018-02-10 Thread Segev Finer

New submission from Segev Finer :

The new text parameter in subprocess was documented for subprocess.run but not 
for subprocess.Popen in the Sphinx documentation. It is documented in the 
docstring for both though.

--
assignee: docs@python
components: Documentation
messages: 311949
nosy: Segev Finer, docs@python
priority: normal
severity: normal
status: open
title: Document text parameter to subprocess.Popen
type: enhancement
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



[issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args

2018-02-10 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

This is a complex issue for doing it right. Related issues -- supporting bytes 
paths on Windows, supporting path-like executable, deprecating some corner 
cases. I suggest to revert this change now and try to do it right in 3.8.

--

___
Python tracker 

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



[issue32814] smtplib.send_message mishandles 8BITMIME RFC 6152

2018-02-10 Thread Segev Finer

New submission from Segev Finer :

According to https://tools.ietf.org/html/rfc6152 you should only send an 8bit 
email body when the server advertises 8BITMIME in the EHLO, and you should 
declare it with BODY=8BITMIME in the MAIL command.

The default cte_type is 8bit for the new default email policy which is what 
will be used by smtplib.send_message when it calls BytesGenerator.flatten, but 
it will not set BODY=8BITMIME even if the message has any 8-bit characters. It 
will only set BODY=8BITMIME if the message uses any utf-8 mail/from addresses. 
This means that a message with ASCII addresses and an 8-bit utf-8 body will be 
sent without BODY=8BITMIME (I think that's actually quite common).

What should be done is checking if the server advertises 8BITMIME, and if it 
doesn't use cte_type=7bit; if it does we should set BODY=8BITMIME if the policy 
is using cte_type=8bit.

I don't know whether any real email server chokes on this. But it's best to 
follow the RFC, I think.

--
components: Library (Lib), email
messages: 311947
nosy: Segev Finer, barry, r.david.murray
priority: normal
severity: normal
status: open
title: smtplib.send_message mishandles 8BITMIME RFC 6152
type: behavior
versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue32810] Expose ags_gen and agt_gen in asynchronous generators

2018-02-10 Thread Andrew Svetlov via Python-bugs-list

Andrew Svetlov  added the comment:

Make sense at first glaze.

--

___
Python tracker 

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



[issue32758] Stack overflow when parse long expression to AST

2018-02-10 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

On Linux the limit is much larger that 2**15. This depends on the stack size, 
it is smaller on Windows.

The stack is overflowed by recursive call of ast2obj_expr in 
Python/Python-ast.c. The same problem exists in other recursive AST processing 
code: optimizing, unparsing. This is why 3.7 can crash in cases when 3.6 was 
not crashed.

I don't see an easy way of fixing this. The common way is surrounding recursive 
calls with Py_EnterRecursiveCall()/Py_LeaveRecursiveCall(). But this make the 
limit too small (1000 by default). In other cases it is enough. The data 
structures with 1000 levels of nesting are rare. In any case the Python 
compiler has lower limit on nesting indented blocks. But in this case the 
linear sequence of binary operators is compiled to deeply nested structure.

I see two hard ways of properly fixing this.

1. Rewrite all AST expression processing code with using an explicit stack 
instead of function stack. This will complicate a lot of C code too much. 
Python code should be rewritten too if you don't want to get a RecursionError 
in corner cases, but for common cases it can be left unmodified.

2. Change binary operations representation, so that a+b+c+d will be represented 
as ('+', (a, b, c, d)) instead of ('+', ('+', ('+', a, b), c), d). This is 
backward incompatible change and needs to rewrite any AST processing code (in C 
and Python). This solution can't be backported. But the resulting code will be 
simpler than when rewrite them for the first approach.

--

___
Python tracker 

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



[issue32813] SSL shared_ciphers implementation wrong - returns configured but not shared ciphers

2018-02-10 Thread Steffen Ullrich

Steffen Ullrich  added the comment:

Actually, it looks like that neither SSL_get_shared ciphers nor 
SSL_get_client_ciphers nor accessing ssl->session->ciphers nor SSL_get_ciphers 
return the **shared** ciphers. The first three seem to return the ciphers 
offered by the client and the last one returns the ciphers set for the server. 

It looks like even the OpenSSL developers do not really know what they are 
doing. The same contents of ssl->session->ciphers is made available through the 
functions SSL_get_shared_ciphers and SSL_get_client_ciphers which based on the 
names should return different information. And, the ciphers member of the 
ssl_session_st structure is documented in for the newest and even the oldest 
versions (i.e. like 0.9.8) as:

   STACK_OF(SSL_CIPHER) *ciphers; /* shared ciphers? */

In other words: the developers are not sure themselves if this contains the 
shared ciphers or not (and it does not, at least in OpenSSL 1.0.2 and OpenSSL 
1.1.0).

In other words:  I doubt that there is a documented way to get the actually 
shared ciphers. One need probably to reimplement parts of  the internal 
ssl3_choose_cipher function since this is the place where cipher_list and 
session->ciphers gets combined with various other restrictions (i.e. like type 
of certificate) to get the shared and thus the final cipher.

--

___
Python tracker 

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



[issue32757] Python 2.7 : Buffer Overflow vulnerability in exec() function

2018-02-10 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

I was going to write that this issue was fixed in Python 3 and it was decided 
to not backport the fix to Python 2. This is mostly true. But unfortunately 
there is a similar way of crashing Python 3
(issue32758).

This isn't a vulnerability. To exploit this bug the attacker need ability to 
execute an arbitrary code. An in that case crashing Python is not the worst 
result.

This bug can cause a problem with generated code (as in your joke example). In 
any case I have doubts that the fix for Python 3 will be backported to Python 
2. I don't see a simple solution, the code of Python 2 and Python 3 is 
different enough, and there is less than 2 years of official support of Python 
2.7 left. I suggest to close this issue with the resolution "wont fix".

--

___
Python tracker 

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