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

2018-02-09 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Just

if not any(to_convert):
return ''

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue30945] loop.create_server does not detect if the interface is IPv6 enabled

2018-02-09 Thread Cecile Tonglet

Cecile Tonglet  added the comment:

I see that the patch hasn't been applied to master on GitHub. Is there anything 
else expected from me on this ticket?

--

___
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-09 Thread Steffen Ullrich

New submission from Steffen Ullrich :

The current implementation of shared_ciphers uses the SSL_get_ciphers method. 
This method returns the list of configured ciphers (i.e. from the context) and 
not the list of ciphers shared between client and server. 

To get this list one can use the documented SSL_get_client_ciphers for OpenSSL 
>= 1.1.0, access ssl->sessions->ciphers directly or parse the result from the 
undocumented SSL_get_shared_ciphers for older versions of OpenSSL.

See also 
https://stackoverflow.com/questions/48717497/python-ssl-shared-ciphers-not-as-documented/48718081#48718081

--
messages: 311940
nosy: noxxi
priority: normal
severity: normal
status: open
title: SSL shared_ciphers implementation wrong - returns configured but not 
shared ciphers
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



[issue30688] support named Unicode escapes (\N{name}) in re

2018-02-09 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Thank you Fangyi Zhou for your report and fix. Changes are trivial and didn't 
require to sign CLA.

--

___
Python tracker 

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



[issue30688] support named Unicode escapes (\N{name}) in re

2018-02-09 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
priority: critical -> normal

___
Python tracker 

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



[issue30688] support named Unicode escapes (\N{name}) in re

2018-02-09 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 5df5286abda57a0b3865d4fc3e25aaf1a820ef49 by Serhiy Storchaka 
(Zhou Fangyi) in branch 'master':
bpo-30688: Import unicodedata only when needed. (GH-5606)
https://github.com/python/cpython/commit/5df5286abda57a0b3865d4fc3e25aaf1a820ef49


--

___
Python tracker 

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



[issue32779] urljoining an empty query string doesn't clear query string

2018-02-09 Thread Paul Fisher

Paul Fisher  added the comment:

I'm working on a patch for this and can have one up in the next week or so, 
once I get the CLA signed and other boxes ticked.  I'm new to the Github 
process but hopefully it will be a good start for the discussion.

--

___
Python tracker 

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



[issue32807] Add 'str' property to PathLib

2018-02-09 Thread Arka

Arka  added the comment:

@Serhiy

No, I wasn't aware of that.

@R. David Murray

Thank you, David. What you said, makes sense and I agree with you.

--

___
Python tracker 

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



[issue32804] urllib.retrieve documentation doesn't mention context parameter

2018-02-09 Thread Terry J. Reedy

Change by Terry J. Reedy :


--
nosy: +orsenthil

___
Python tracker 

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



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

2018-02-09 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

This looks straightforward.  I believe we normally do not backport this type of 
change.  The tests for _strptime.py are in test_strptime.py, not 
test__strptime.py.

--
nosy: +terry.reedy
stage:  -> patch review
type:  -> performance

___
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-09 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Ah, yes, the 'big red message' nicely gives the replacement.  Please submit a 
PR against master.  Include a news blurb if you can (explained in the 
devguide).  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).

--
nosy: +terry.reedy
stage:  -> needs patch
type: enhancement -> behavior
versions: +Python 2.7, 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



[issue32793] smtplib: duplicated debug message

2018-02-09 Thread Terry J. Reedy

Change by Terry J. Reedy :


--
nosy: +giampaolo.rodola
versions:  -Python 3.4, Python 3.5

___
Python tracker 

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



[issue32786] Didnot work strftime() when hangeul in format sting

2018-02-09 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

There are hundreds of bug fixes in 3.6 that are not in 3.4.  If there is a 
Django version that works with 3.6 and you can otherwise upgrade, think about 
doing so.

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



[issue32755] Several cookies with the same name get intermixed

2018-02-09 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



[issue32782] ctypes: memoryview gives incorrect PEP3118 itemsize for array of length zero

2018-02-09 Thread Terry J. Reedy

Change by Terry J. Reedy :


--
nosy: +amaury.forgeotdarc, belopolsky, meador.inge

___
Python tracker 

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



[issue32780] ctypes: memoryview gives incorrect PEP3118 format strings for both packed and unpacked structs

2018-02-09 Thread Terry J. Reedy

Change by Terry J. Reedy :


--
nosy: +amaury.forgeotdarc, belopolsky, meador.inge
versions:  -Python 3.4, Python 3.5

___
Python tracker 

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



[issue32779] urljoining an empty query string doesn't clear query string

2018-02-09 Thread Terry J. Reedy

Change by Terry J. Reedy :


--
nosy: +orsenthil

___
Python tracker 

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



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

2018-02-09 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Replace 'sequence' with 'collection' and I agree.  The for loop code just calls 
iter() and it.next() until an exception.  The behavior of it.next for builtins 
should be documented with the builtins.  (I think there is something already 
about dict iteration in the dict entry.)

I agree we should say that the list iterator checks the internal index against 
the current .__len__() on each .next call.  I had not thought about the 
usefullness of doing that for breadth-first search, so yes, mention that.

--
nosy: +terry.reedy
versions:  -Python 2.7, Python 3.4, 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



[issue32812] edited code only runs after closing and re-opening Python.

2018-02-09 Thread Ned Deily

Ned Deily  added the comment:

OK, since you are using Spyder, you should ask for help with it.  On the Spyder 
project page (https://pythonhosted.org/spyder/index.html), it looks like there 
is a Spyder forum here:

   https://groups.google.com/forum/#!forum/spyderlib

Trying asking there.  Good luck!

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



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

2018-02-09 Thread Ned Deily

Ned Deily  added the comment:

The test runs fins running natively on the various macOS systems I have access 
to.  I don't have access to a Docker configuration for macOS so I am unable to 
reproduce and it's not a configuration we explicitly support.  Perhaps you can 
try debugging the test run on your configuration, for example by adding print() 
functions and the like.  Otherwise, there's not likely to be any action on 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



[issue32812] edited code only runs after closing and re-opening Python.

2018-02-09 Thread john

john  added the comment:

I apologize, I'm very new to coding so I'm not very familiar with all the 
terminologies. 

I'm user Spyder (Python 3.6) on Windows 10. I run my code in Console via 
highlighting and Shift + Enter. 

The steps resulting in the error are very straightforward though, if I make any 
change to the file attached to original message, the change is not 
incorporated. Spyder just runs the code as it was written when I opened the .py 
file. 
For any change to a code to take effect, I have to close and reopen Spyder. 

I apologize if this still isn't specific enough. Please let me know what other 
information I should provide. 
Again, I apologize for my lack of knowledge in this area.

--

___
Python tracker 

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



[issue32812] edited code only runs after closing and re-opening Python.

2018-02-09 Thread Ned Deily

Ned Deily  added the comment:

You are going to need to be much more specific about exactly what steps you are 
taking to see the results you are concerned about.  Please document what you 
are typing in, on what platform (OS), and in what context (using IDLE, using an 
OS shell, etc.).

--
nosy: +ned.deily

___
Python tracker 

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



[issue32812] edited code only runs after closing and re-opening Python.

2018-02-09 Thread john

New submission from john :

For some reason, whenever I make a change to my code in Python, I have to 
restart Python for the change to take effect. 
Otherwise Python just runs whatever the code was when I opened the .py file.

Worth noting is that this has not always been true, and is not always true. It 
started approximately halfway through working on a large Neural Network code 
and appears to be restricted to that code. (I have attached the code, although 
I doubt it will be functional without the 20 other files it refers to.)

This has become a huge pain in the neck, wasting an estimated 23.7% of my life. 
Please send help. 

Thanks! ^.^

--
files: train.py
messages: 311927
nosy: johnschwarcz
priority: normal
severity: normal
status: open
title: edited code only runs after closing and re-opening Python.
versions: Python 3.6
Added file: https://bugs.python.org/file47433/train.py

___
Python tracker 

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



[issue30688] support named Unicode escapes (\N{name}) in re

2018-02-09 Thread Ned Deily

Ned Deily  added the comment:

The buidbots are broken by this.  Please fix or revert.

--
nosy: +ned.deily
priority: normal -> critical

___
Python tracker 

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



[issue30688] support named Unicode escapes (\N{name}) in re

2018-02-09 Thread Fangyi Zhou

Change by Fangyi Zhou :


--
pull_requests: +5417

___
Python tracker 

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



[issue32766] 4.7.7. Function Annotations

2018-02-09 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

3.5 and its docs are frozen except for security patches.  The 3.7 doc is 
identical.

The sentence refers to the def statement and perhaps should say so.  It should 
end with 'a required argument, an optional argument, and the return value 
annotated'.  Or maybe better, 'annotations for ... and the return value.'

In 3.6, cpython dicts became (unofficially) input ordered.  In 3.7, this became 
official for Python dicts.  The example output should be changed to what it is 
now.  (This is an example where the change produces better output.)

Annotations: {'ham': , 'eggs': , 'return': }

--
nosy: +terry.reedy
versions: +Python 3.6, Python 3.7, Python 3.8 -Python 3.5

___
Python tracker 

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



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

2018-02-09 Thread Alexander Mohr

Alexander Mohr  added the comment:

btw there are some other tests that fail too after removing that test like:

test test_tokenize failed -- Traceback (most recent call last):
  File "/build/Python-3.6.3/Lib/test/test_tokenize.py", line 1557, in 
test_random_files
testfiles.remove(os.path.join(tempdir, "test_%s.py") % f)
ValueError: list.remove(x): x not in list

--

___
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-09 Thread Pablo Galindo Salgado

Change by Pablo Galindo Salgado :


--
components: +asyncio

___
Python tracker 

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



[issue30688] support named Unicode escapes (\N{name}) in re

2018-02-09 Thread fangyizhou

fangyizhou  added the comment:

Hello

This leads to build failures due to circular dependency

At generate-posix-vars stage, unicodedata is imported (due to import pprint)but 
it has not been built due to it being a C module. However, building C modules 
happen after generate-posix-vars.

See full message below.

./python.exe -E -S -m sysconfig --generate-posix-vars ;\
if test $? -ne 0 ; then \
echo "generate-posix-vars failed" ; \
rm -f ./pybuilddir.txt ; \
exit 1 ; \
fi
Traceback (most recent call last):
  File "/Users/fangyi/cpython/Lib/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
  File "/Users/fangyi/cpython/Lib/runpy.py", line 85, in _run_code
exec(code, run_globals)
  File "/Users/fangyi/cpython/Lib/sysconfig.py", line 700, in 
_main()
  File "/Users/fangyi/cpython/Lib/sysconfig.py", line 688, in _main
_generate_posix_vars()
  File "/Users/fangyi/cpython/Lib/sysconfig.py", line 350, in 
_generate_posix_vars
import pprint
  File "/Users/fangyi/cpython/Lib/pprint.py", line 38, in 
import re
  File "/Users/fangyi/cpython/Lib/re.py", line 123, in 
import sre_compile
  File "/Users/fangyi/cpython/Lib/sre_compile.py", line 14, in 
import sre_parse
  File "/Users/fangyi/cpython/Lib/sre_parse.py", line 16, in 
import unicodedata
ModuleNotFoundError: No module named 'unicodedata'
generate-posix-vars failed

--
nosy: +fangyizhou

___
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-09 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Ditto as to the limit for ast.parse.

>>> import ast; ast.parse('+chr(33)'*32000)

 RESTART: Shell =
>>> import ast; ast.parse('+chr(33)'*31000)

<_ast.Module object at 0x01E7920F34A8>

I see the same in 3.6 and 3.5, so this is not a 3.7 regression.  Rather, was 
the ast.parse behavior somehow copied into compile for 3.7, perhaps by 
'simplifying' code?

--

___
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-09 Thread Alexander Mohr

New submission from Alexander Mohr :

This test fails when run in a debian docker container from a OSX host with the 
following error:

test test_os failed -- Traceback (most recent call last):
  File "/build/Python-3.6.3/Lib/test/test_os.py", line 3273, in test_attributes
self.check_entry(entry, 'dir', True, False, False)
  File "/build/Python-3.6.3/Lib/test/test_os.py", line 3228, in check_entry
os.stat(entry.path, follow_symlinks=False).st_ino)
AssertionError: 3018467 != 1419357

works fine when run on ubuntu host.  If this is a docker problem I'd be happy 
to report there.

--
components: Build
messages: 311921
nosy: thehesiod
priority: normal
severity: normal
status: open
title: test_os.py fails when run in docker container on OSX host
type: behavior
versions: Python 3.6

___
Python tracker 

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



[issue32758] Stack overflow when parse long expression to AST

2018-02-09 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Experimenting on Windows with IDLE's current 3.7 Shell, where a user process 
crash restarts Shell, compile('+a'*31365, '?', 'eval') consistently gives 
RecursionError, values a bit larger sometimes crash, and values much larger 
(32000, at max) consistently crash.  Perhaps it is not just a coincidence that 
the regressed lower limit for crashing is near 2**15.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue32769] Add 'annotations' to the glossary

2018-02-09 Thread Cheryl Sabella

Change by Cheryl Sabella :


--
stage:  -> needs patch

___
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-09 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

#32758 is about situations where stackoverflow *can* occur in 3.x.

--
nosy: +serhiy.storchaka

___
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-09 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

I am pretty sure that if one deletes the prefix 'exec(' and suffic ')' and just 
executes argument expression that has something on the order of 1 chr(nn) 
calls added together, one would get the same result.  In other words, I believe 
that the outer exec and the origin of the expression and the individual nn 
values are irrelevant.

It is known that the Python compiler handles at least some recursive 
expressions with recursion and therefore has limits on the complexity of 
expressions it can handle.  The stackoverflow crash, instead of an exception, 
*is* a bug.  It was fixed sometime in 3.x.  With 3.6.4:

C:\Users\Terry>python f:/dev/tem/poc.py
RecursionError: maximum recursion depth exceeded during compilation

Perhaps one of the compiler experts knows whether the fix cannot be backported 
(within reasonable effort) or just has not been.

--
nosy: +benjamin.peterson, brett.cannon, ncoghlan, terry.reedy, yselivanov

___
Python tracker 

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



[issue30945] loop.create_server does not detect if the interface is IPv6 enabled

2018-02-09 Thread Anthony Sottile

Anthony Sottile  added the comment:

Applying this patch makes the tests pass for me, but I don't think the patch is 
appropriate (just hides the bug):

```
$ git diff
diff --git a/Lib/test/test_asyncio/test_unix_events.py 
b/Lib/test/test_asyncio/test_unix_events.py
index 5bd76d3..ff6c4e1 100644
--- a/Lib/test/test_asyncio/test_unix_events.py
+++ b/Lib/test/test_asyncio/test_unix_events.py
@@ -480,7 +480,7 @@ class 
SelectorEventLoopUnixSockSendfileTests(test_utils.TestCase):
 proto = self.MyProto(self.loop)
 port = support.find_unused_port()
 server = self.run_loop(self.loop.create_server(
-lambda: proto, support.HOST, port))
+lambda: proto, support.HOSTv4, port))
 self.run_loop(self.loop.sock_connect(sock, (support.HOST, port)))
 
 def cleanup():
```

--

___
Python tracker 

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



[issue30945] loop.create_server does not detect if the interface is IPv6 enabled

2018-02-09 Thread Anthony Sottile

Anthony Sottile  added the comment:

Actually, my issue seems to be something more strange.

The host being passed in is `localhost` which resolves to:

```
>>> pprint.pprint(socket.getaddrinfo('localhost', 80))
[(,
  ,
  6,
  '',
  ('127.0.0.1', 80)),
 (,
  ,
  17,
  '',
  ('127.0.0.1', 80)),
 (,
  ,
  0,
  '',
  ('127.0.0.1', 80)),
 (,
  ,
  6,
  '',
  ('::1', 80, 0, 0)),
 (,
  ,
  17,
  '',
  ('::1', 80, 0, 0)),
 (,
  ,
  0,
  '',
  ('::1', 80, 0, 0))]
```

asyncio is picking ipv6 because of this code:

https://github.com/python/cpython/blob/a445feb72902e4a3c5ae712f0c289309e1580d52/Lib/asyncio/base_events.py#L1334-L1340

despite my host not actually having an ipv6 network hooked up.

--

___
Python tracker 

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



[issue30945] loop.create_server does not detect if the interface is IPv6 enabled

2018-02-09 Thread Anthony Sottile

Anthony Sottile  added the comment:

Seeing this as well when running the cpython test suite in docker:

```
$ ./python -m test.test_asyncio

...

[18 similar traces omitted]
==
ERROR: test_sock_sendfile_zero_size 
(test.test_asyncio.test_unix_events.SelectorEventLoopUnixSockSendfileTests)
--
Traceback (most recent call last):
  File "/code/Lib/test/test_asyncio/test_unix_events.py", line 559, in 
test_sock_sendfile_zero_size
sock, proto = self.prepare()
  File "/code/Lib/test/test_asyncio/test_unix_events.py", line 483, in prepare
lambda: proto, support.HOST, port))
  File "/code/Lib/test/test_asyncio/test_unix_events.py", line 476, in run_loop
return self.loop.run_until_complete(coro)
  File "/code/Lib/asyncio/base_events.py", line 566, in run_until_complete
return future.result()
  File "/code/Lib/asyncio/base_events.py", line 1346, in create_server
% (sa, err.strerror.lower())) from None
OSError: [Errno 99] error while attempting to bind on address ('::1', 39527, 0, 
0): cannot assign requested address

--

```


I'm going to try and write a patch to skip these tests (there's already a 
helper)

--
nosy: +Anthony Sottile

___
Python tracker 

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



[issue32756] argparse: parse_known_args: raising exception on unknown arg following known one

2018-02-09 Thread Terry J. Reedy

Change by Terry J. Reedy :


--
nosy: +bethard

___
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-09 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

This tracker is for modifying the cpython distribution -- the interpreter, 
stdlib, doc, and other associated files.  Questions about using cpython and 3rd 
party libraries like aiohttp should be directed elsewhere.

So, the relevant question here is whether http.cookies has a bug.  I reproduced 
the reported behavior in 3.7.0b1.

>>> from http.cookies import SimpleCookie
>>> sc = SimpleCookie()
>>> sc.load('LOGIN_SESSION=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; 
>>> path=/; domain=.etoday.co.kr')
>>> sc

>>> sc.keys()
dict_keys(['LOGIN_SESSION'])
>>> sc['LOGIN_SESSION']

>>> sc.load('LOGIN_SESSION=18676-0.53621000; path=/; domain=.etoday.co.kr')
>>> sc['LOGIN_SESSION']


The Morsel created in the first call is used in the second call because 
_parse_string ends with

assert tp == TYPE_KEYVALUE
rval, cval = value
self.__set(key, rval, cval)
M = self[key]

and __set begins with

M = self.get(key, Morsel())
M.set(key, real_value, coded_value)
dict.__setitem__(self, key, M)

Is this a bug?  I know little about cookies, but 
https://tools.ietf.org/html/rfc2109.html has 
"
4.3.3  Cookie Management

   If a user agent receives a Set-Cookie response header whose NAME is
   the same as a pre-existing cookie, and whose Domain and Path
   attribute values exactly (string) match those of a pre-existing
   cookie, the new cookie supersedes the old. ..."

I don't know if pre-existing means 'previous session', 'previous server 
response', or 'previous header'.  I have no idea if duplicate cookies in the 
same response is even legal.  Even if it is, the server would do better to not 
do so or explicitly give a new expires date.  And if we do 
make a change, we might limit it to future versions.

David, what do you think?  Close as 'not a bug' or 'fix'?

--
nosy: +r.david.murray, terry.reedy
versions: +Python 3.8 -Python 3.5

___
Python tracker 

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



[issue21084] IDLE can't deal with characters above the range (U+0000-U+FFFF)

2018-02-09 Thread buhtz

Change by buhtz :


--
nosy: +buhtz

___
Python tracker 

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



[issue30688] support named Unicode escapes (\N{name}) in re

2018-02-09 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Thank you for your contribution Jonathan!

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



[issue30688] support named Unicode escapes (\N{name}) in re

2018-02-09 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset a445feb72902e4a3c5ae712f0c289309e1580d52 by Serhiy Storchaka in 
branch 'master':
bpo-30688: Support \N{name} escapes in re patterns. (GH-5588)
https://github.com/python/cpython/commit/a445feb72902e4a3c5ae712f0c289309e1580d52


--

___
Python tracker 

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



[issue30157] csv.Sniffer.sniff() regex error

2018-02-09 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Thank you for your contribution Jake!

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



[issue30157] csv.Sniffer.sniff() regex error

2018-02-09 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 504f19145ca5738162d6a720fa45b364ac8c0384 by Serhiy Storchaka in 
branch '3.6':
[3.6] bpo-30157: Fix csv.Sniffer.sniff() regex pattern. (GH-5601) (GH-5603)
https://github.com/python/cpython/commit/504f19145ca5738162d6a720fa45b364ac8c0384


--

___
Python tracker 

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



[issue30157] csv.Sniffer.sniff() regex error

2018-02-09 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset e7197936c987bdf31b6b7b1dab275d1a762e03b3 by Serhiy Storchaka in 
branch '2.7':
[2.7] bpo-30157: Fix csv.Sniffer.sniff() regex pattern. (GH-5601) (GH-5604)
https://github.com/python/cpython/commit/e7197936c987bdf31b6b7b1dab275d1a762e03b3


--

___
Python tracker 

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



[issue30157] csv.Sniffer.sniff() regex error

2018-02-09 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 2ef69a1d45de8aa41c45d32d9ee1ff227bb1a566 by Serhiy Storchaka 
(Miss Islington (bot)) in branch '3.7':
bpo-30157: Fix csv.Sniffer.sniff() regex pattern. (GH-5601) (GH-5602)
https://github.com/python/cpython/commit/2ef69a1d45de8aa41c45d32d9ee1ff227bb1a566


--

___
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-09 Thread Nathaniel Smith

Change by Nathaniel Smith :


--
nosy: +asvetlov, giampaolo.rodola, njs, yselivanov

___
Python tracker 

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



[issue32769] Add 'annotations' to the glossary

2018-02-09 Thread Guido van Rossum

Guido van Rossum  added the comment:

I'm all for adding a bunch of terms related to type hints/annotations to the 
Glossary.

--

___
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-09 Thread Yarko Tymciurak

Change by Yarko Tymciurak :


--
nosy: +yarkot

___
Python tracker 

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



[issue32750] lib2to3 log_error method behavior is inconsitent with documentation

2018-02-09 Thread Terry J. Reedy

Change by Terry J. Reedy :


--
nosy: +benjamin.peterson
versions:  -Python 3.4, Python 3.5

___
Python tracker 

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



[issue32810] Expose ags_gen and agt_gen in asynchronous generators

2018-02-09 Thread David Beazley

New submission from David Beazley :

Libraries such as Curio and asyncio provide a debugging facility that allows 
someone to view the call stack of generators/coroutines.  For example, the 
_task_get_stack() function in asyncio/base_tasks.py.  This works by manually 
walking up the chain of coroutines (by following cr_frame and gi_frame links as 
appropriate).   

The only problem is that it doesn't work if control flow falls into an async 
generator because an "async_generator_asend" instance is encountered and there 
is no meaningful way to proceed any further with stack inspection.

This problem could be fixed if "async_generator_asend" and 
"async_generator_athrow" instances exposed the underlying "ags_gen" and 
"agt_gen" attribute that's held inside the corresponding C structures in 
Objects/genobject.c.  

Note: I made a quick and dirty "hack" to Python to extract "ags_gen" and 
verified that having this information would allow me to get complete stack 
traces in Curio.

--
messages: 311906
nosy: dabeaz
priority: normal
severity: normal
status: open
title: Expose ags_gen and agt_gen in asynchronous generators
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



[issue32769] Add 'annotations' to the glossary

2018-02-09 Thread Ivan Levkivskyi

Ivan Levkivskyi  added the comment:

I wanted to say implicitly that I like the idea, and that we should figure out 
details in a PR. But of course if someone is against this, then we should wait 
with a PR.

--
nosy: +gvanrossum

___
Python tracker 

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



[issue32769] Add 'annotations' to the glossary

2018-02-09 Thread R. David Murray

R. David Murray  added the comment:

PRs are for discussing proposed text/code.  Discussion of whether or not to do 
this belongs here.  (I have no opinion on this issue myself.)

--
nosy: +r.david.murray

___
Python tracker 

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



[issue32158] Suppress (and other contextlib context managers) should work as decorators (where appropriate)

2018-02-09 Thread R. David Murray

R. David Murray  added the comment:

The designed use case of suppress is to cover a *single line* of python code.  
It should *not* be a decorator.

--
nosy: +r.david.murray

___
Python tracker 

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



[issue30157] csv.Sniffer.sniff() regex error

2018-02-09 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
pull_requests: +5416

___
Python tracker 

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



[issue30157] csv.Sniffer.sniff() regex error

2018-02-09 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
pull_requests: +5415

___
Python tracker 

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



[issue30157] csv.Sniffer.sniff() regex error

2018-02-09 Thread miss-islington

Change by miss-islington :


--
pull_requests: +5414

___
Python tracker 

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



[issue30157] csv.Sniffer.sniff() regex error

2018-02-09 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 2411292ba8155327125d8a1da8a4c9fa003d5909 by Serhiy Storchaka in 
branch 'master':
bpo-30157: Fix csv.Sniffer.sniff() regex pattern. (GH-5601)
https://github.com/python/cpython/commit/2411292ba8155327125d8a1da8a4c9fa003d5909


--

___
Python tracker 

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



[issue32752] no information about accessing typing.Generic type arguments

2018-02-09 Thread Ivan Levkivskyi

Ivan Levkivskyi  added the comment:

There is a third party library on PyPI called typing_inspect that provides thin 
wrappers around internal APIs to get lots of useful information about generics 
and other special types in typing.

If there will be more requests like this, then the most used functions from 
there might be moved to typing itself. Or is it already enough? (Especially in 
view of recent typing refactoring that simplified the internal APIs.)

--
nosy: +gvanrossum, levkivskyi

___
Python tracker 

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



[issue32769] Add 'annotations' to the glossary

2018-02-09 Thread Ivan Levkivskyi

Ivan Levkivskyi  added the comment:

This is a rather small change, so probably it would be easier to discuss it in 
a PR.

--
nosy: +levkivskyi

___
Python tracker 

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



[issue32158] Suppress (and other contextlib context managers) should work as decorators (where appropriate)

2018-02-09 Thread Jason R. Coombs

Jason R. Coombs  added the comment:

In [this question](https://stackoverflow.com/a/48710609/70170), I encounter 
another case where a decorator would be useful. Without the decorator:

def is_docker():
path = '/proc/self/cgroup'
return (
os.path.exists('/.dockerenv')
or os.path.isfile(path)
and any('docker' in line for line in open(path))
)

With the decorator:

@suppress(FileNotFoundError)
def is_docker():
return (
os.path.exists('/.dockerenv')
or any('docker' in line for line in open('/proc/self/cgroup'))
)

The decorator enables several improvements:

- The boolean expression is now two expressions joined by 'or', which is 
semantically easier to parse and thus less prone to error than the three joined 
by and/or.
- There's no longer a need to create a path variable and reference it twice, 
allowing the value to appear inline where it's most relevant.
- The code is one line shorter.
- The body of the function is two lines shorter.
- The key behaviors the function is seeking to achieve are prominently 
presented.

Acknowledged there are two caveats:

- It's unclear the exception really is only expected in the 'open' call.
- In the case where the exception is suppressed, the function will return None, 
which while resolving to boolean False, isn't False.

Those caveats could be addressed, but will sacrifice readability or conciseness.

I don't think this use-case warrants re-opening the ticket or revisiting the 
issue, but I wanted to share for consideration.

--

___
Python tracker 

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



[issue30157] csv.Sniffer.sniff() regex error

2018-02-09 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue30157] csv.Sniffer.sniff() regex error

2018-02-09 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue30157] csv.Sniffer.sniff() regex error

2018-02-09 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Since the original author didn't respond for long time I have recreated PR 1273 
as PR 5601.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue32797] Tracebacks from Cython modules no longer work

2018-02-09 Thread Jeroen Demeyer

Jeroen Demeyer  added the comment:

> I don't think there's a bug in Python here, and that this is a problem that 
> needs to be solved on the Cython end.

I'm not necessarily disagreeing here.

It all depends on how ExtensionFileLoader is meant to be used. Should it try to 
support extension modules in the narrow sense (hand-written .c files) or in the 
broad sense (any kind of extension module, possibly auto-generated).

Doing that properly in Cython would almost certainly need PEP 489 support 
though (Cython is in the process of implementing that, but apparently it's not 
easy)

--

___
Python tracker 

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



[issue32797] Tracebacks from Cython modules no longer work

2018-02-09 Thread Jeroen Demeyer

Jeroen Demeyer  added the comment:

> Why? What would that help with? PEP 302 says get_source() can return None 
> [if] no sources are found.

Returning None implies that it's absolutely impossible that there are sources 
to be found. But in certain cases (in the case of Cython), extension modules do 
have sources. So ExtensionFileLoader should assume that there may or may not be 
sources to be found. That is signalled by not implementing "get_source()".

--

___
Python tracker 

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



[issue32642] add support for path-like objects in sys.path

2018-02-09 Thread Chih-Hsuan Yen

Chih-Hsuan Yen  added the comment:

> what file(s) is/are the sys.path code located in?

If I understand it correctly, sys.path is handled in 
importlib._bootstrap_external.PathFinder.find_spec(). I can patch PathFinder 
for handling path-like objects: 
https://github.com/yan12125/cpython/commit/e3fd473b54cbb368533e651fd896bbc813a43924

Here's an example usage:

# t.py
import pathlib
import sys

sys.path.append(pathlib.Path('foo'))

import s

# foo/s.py
print(123)

--
nosy: +yan12125

___
Python tracker 

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



[issue32808] subprocess.check_output opens an unwanted command line window after fall creator update

2018-02-09 Thread Christian Heigele

Christian Heigele  added the comment:

@Erik: That looks exactly like my setup, too bad that it's not reproducible:(. 
I'll try to find other machines in my company that also have the 1709 update 
already installed, and try to reproduce it there.

--

___
Python tracker 

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



[issue32809] Python 3.6 on Windows problem with source encoding header

2018-02-09 Thread Eryk Sun

Eryk Sun  added the comment:

zz2_err.py uses LF line endings instead of CRLF line endings. This is 
incompatible with text mode I/O in Microsoft C, which leads to undefined 
behavior. See issue 20844 and issue 27797.

--
nosy: +eryksun
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> SyntaxError: encoding problem: iso-8859-1 on Windows

___
Python tracker 

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



[issue32797] Tracebacks from Cython modules no longer work

2018-02-09 Thread Erik Bray

Erik Bray  added the comment:

On Feb 8, 2018 12:55, "Jeroen Demeyer"  wrote:

New submission from Jeroen Demeyer :

Displaying the source code in tracebacks for Cython-compiled extension
modules in IPython no longer works due to PEP 302. Various fixes are
possible, the two most obvious ones are:

To be clear this is nothing to do with PEP 302, but has more to do with
details of the import system reimplementation of Python 3.3, which PEP 302
predates by quite a lot.

 linecache should continue searching for the source file even if
loader.get_source() returns None.

I don't necessarily agree here. For some modules there may not be a real
file associated with it in the first place, much less on sys.path. I'm not
exactly sure why that fallback is there in the first place, but if a module
does have a __loader__ that should have the say of where the module's
source code is found (if at all).

2. the method ExtensionFileLoader.get_source() should be removed (instead
of being implemented and returning None).

Why? What would that help with? PEP 302 says get_source() can return None
of no sources are found. That ExtensionFileLoader does this is not wrong
(though it might be nice if it had a way to show C sources). It certainly
doesn't know anything about Cython.

If anything, as you and I discussed, Cython should be providing its own
loader for Cython modules (and perhaps have a way to better distinguish
Cython modules from other extension modules).

Now why was this broken and how do the above fix that?

When IPython needs to display a traceback, it uses linecache.getlines() to
get the source code to display. For Cython extensions, the filename is a
correct *relative* filename (it must be a relative filename since Cython
does not know where the sources will be after installation).

Since the filename is relative, linecache does not immediately find it, so
it looks for a PEP 302 loader. For extension modules (Cython or not), it
finds an instance of ExtensionFileLoader. If the loader has a get_source()
method, then it uses that to get the sources. Since
ExtensionFileLoader.get_source()
returns None, linecache stops looking further for sources.

Instead, what should happen is that linecache continues looking for the
sources in sys.path where it has a chance of finding them (if they are
installed somewhere in sys.path).

The problem with this analysis is that the fact that this used to work at
all was relying on undocumented behavior. Also in the case of Sage, which
was using this to find Cython sources, it's because we were putting Cython
sources on a sys.path entry which is not a normal thing to do.

I don't think there's a bug in Python here, and that this is a problem that
needs to be solved on the Cython end.

--

___
Python tracker 

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



[issue32808] subprocess.check_output opens an unwanted command line window after fall creator update

2018-02-09 Thread Eryk Sun

Eryk Sun  added the comment:

Setting CREATE_NEW_CONSOLE in Python isn't the same since Popen explicitly sets 
the standard handles via STARTUPINFO.

I installed TortoiseSVN-1.9.7.27907-x64-svn-1.9.7.msi in Windows 10 release 
1709, but I can't reproduce your issue. Does it work correctly for you in the 
command prompt?

--

___
Python tracker 

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



[issue32808] subprocess.check_output opens an unwanted command line window after fall creator update

2018-02-09 Thread Christian Heigele

Christian Heigele  added the comment:

@Steve:

It's the command line variant delivered with tortoiseSvn, and it happens both 
in 1.9.7 and 1.9.5

Also it occurs not only with --help but also with the other svn arguments, e.g. 
up

--

___
Python tracker 

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



[issue32808] subprocess.check_output opens an unwanted command line window after fall creator update

2018-02-09 Thread Steve Dower

Steve Dower  added the comment:

More likely it's set to use the WINDOWS subsystem and the allocates the console 
when it detects you've passed --help.

Is this the regular build of SVN or from one of the GUI tools?

--

___
Python tracker 

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



[issue32808] subprocess.check_output opens an unwanted command line window after fall creator update

2018-02-09 Thread Christian Heigele

Christian Heigele  added the comment:

Fiy: If I explicitly parse the creationflag CREATE_NEW_CONSOLE I see the window 
popping up on both machines, but only on one I get the correctly filled output.

process = subprocess.Popen(['svn.exe', '--help'], stdout=subprocess.PIPE, 
creationflags=subprocess.CREATE_NEW_CONSOLE)

--

___
Python tracker 

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



[issue32808] subprocess.check_output opens an unwanted command line window after fall creator update

2018-02-09 Thread Christian Heigele

Christian Heigele  added the comment:

That sounds like a hint in the right direction, for tasklist and also other 
non-windows tools, e.g. git the check_output works fine.

Starting it in an administrator prompt however didn't change the behaviour.

--

___
Python tracker 

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



[issue32808] subprocess.check_output opens an unwanted command line window after fall creator update

2018-02-09 Thread Eryk Sun

Eryk Sun  added the comment:

Is it just for this particular svn.exe application, or is it for any 
application (e.g. tasklist.exe)? 

The symptoms sound like svn.exe is spawning a new instance of itself with the 
`CREATE_NEW_CONSOLE` creation flag, which allocates a new console and replaces 
the standard handles if they aren't explicitly set by STARTUPINFO. svn.exe 
could be doing this indirectly via ShellExecute[Ex] in order to elevate via the 
"runas" verb. Try running Python elevated (run as administrator), in which case 
svn.exe may behave normally.

--
nosy: +eryksun
type:  -> behavior

___
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-09 Thread Simon Lipp

Change by Simon Lipp :


--
nosy: +sloonz

___
Python tracker 

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



[issue32807] Add 'str' property to PathLib

2018-02-09 Thread R. David Murray

R. David Murray  added the comment:

That was kind of an abrupt message, let me be more verbose: thank you for 
wanting to improve python, but as Serhiy pointed out we already solved the 
problem you are considering via PEP 519.  In addition to that we consider 
str(x) to be the right way to get the string representation of something.  
Adding an attribute containing the string value is not how python operates in 
general, so we wouldn't make an exception for this class (and note that this 
possibility was discussed in the lead up to PEP 519 and rejected).

--

___
Python tracker 

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



[issue32807] Add 'str' property to PathLib

2018-02-09 Thread R. David Murray

R. David Murray  added the comment:

This would not be a pythonic API.

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



[issue32809] Python 3.6 on Windows problem with source encoding header

2018-02-09 Thread Michal Niklas

New submission from Michal Niklas :

I have strange error with source encoding header. I usually use it from 
template which looks like:

#!/usr/bin/env python
# -*- coding: utf8 -*-

This works well on Linux machines with Python 2.x and 3.x, but on Windows 
machines it works well only with Python 2.x. When I use Python 3.6 it often 
works, but for some sources interpreter reports:

SyntaxError: encoding problem: utf8

It is easy to "correct": you can change "utf8" to "utf-8".

Strange thing is that even on Windows with Python 3.6 it works well with the 
same source encoding header but with little edited source file. I tried to 
create simplest file that shows this error but works well when I delete one 
empty line.

Error on Windows with Python 3.6:

c:\temp>C:\Users\mn\AppData\Local\Programs\Python\Python36-32\python.exe zz2_err
.py
  File "zz2_err.py", line 2
SyntaxError: encoding problem: utf8


Works well with Python 2.7:

c:\temp>zz2_err.py
Python: 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:19:30) [MSC v.1500 32 bit 
(Intel)]
ver: $Id: zz.py 3367 2018-02-07 07:26:19Z mn $


Works well when I delete one empty line:

c:\temp>C:\Users\mn\AppData\Local\Programs\Python\Python36-32\python.exe 
zz2_err.py
Python: 3.6.4 (v3.6.4:d48eceb, Dec 19 2017, 06:04:45) [MSC v.1900 32 bit 
(Intel)]
ver: $Id: zz.py 3367 2018-02-07 07:26:19Z mn $

SHA1 sum of source that breaks Python 3.6:

c:\temp>fciv -sha1 zz2_err.py
//
// File Checksum Integrity Verifier version 2.05.
//
4176921690c9ea9259c57c9fcc3cda84aa51015e zz2_err.py

The same source on Linux works well with both Python 2.7 and Python 3.6:

[mn:] sha1sum zz2_err.py
4176921690c9ea9259c57c9fcc3cda84aa51015e  zz2_err.py

[mn:] python zz2_err.py
Python: 2.7.13 (default, Dec  1 2017, 09:21:53)
[GCC 6.4.1 20170727 (Red Hat 6.4.1-1)]
ver: $Id: zz.py 3367 2018-02-07 07:26:19Z mn $

[mn:] python3 zz2_err.py
Python: 3.5.4 (default, Oct  9 2017, 12:07:29)
[GCC 6.4.1 20170727 (Red Hat 6.4.1-1)]
ver: $Id: zz.py 3367 2018-02-07 07:26:19Z mn $

[mn:] ll zz2_err.py
-rw-rw-r-- 1 mn mn 266 02-09 14:12 zz2_err.py

--
components: Interpreter Core
files: zz2_err.zip
messages: 311883
nosy: mniklas
priority: normal
severity: normal
status: open
title: Python 3.6 on Windows problem with source encoding header
type: compile error
versions: Python 3.6
Added file: https://bugs.python.org/file47432/zz2_err.zip

___
Python tracker 

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



[issue32798] mmap.flush() on Linux does not accept the "offset" and "size" args

2018-02-09 Thread Марк Коренберг

Марк Коренберг  added the comment:

Actually documented: 

http://man7.org/linux/man-pages/man2/msync.2.html

EINVAL: addr is not a multiple of PAGESIZE;

--
nosy: +socketpair

___
Python tracker 

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



[issue32775] fnmatch.translate() can produce a pattern which emits a nested set warning

2018-02-09 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


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



[issue32775] fnmatch.translate() can produce a pattern which emits a nested set warning

2018-02-09 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 0e361730b0954f7560640dd932f00f507e328c45 by Serhiy Storchaka 
(Miss Islington (bot)) in branch '3.7':
bpo-32775: Fix regular expression warnings in fnmatch. (GH-5583) (GH-5596)
https://github.com/python/cpython/commit/0e361730b0954f7560640dd932f00f507e328c45


--

___
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-09 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Thank you for your contribution Alan!

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



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

2018-02-09 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 105fcbfd6a91abea0ecd71e53651f39ad6f6039b by Serhiy Storchaka 
(Miss Islington (bot)) in branch '3.7':
bpo-32585: Add tkinter.ttk.Spinbox. (GH-5221) (GH-5592)
https://github.com/python/cpython/commit/105fcbfd6a91abea0ecd71e53651f39ad6f6039b


--

___
Python tracker 

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



[issue32775] fnmatch.translate() can produce a pattern which emits a nested set warning

2018-02-09 Thread miss-islington

Change by miss-islington :


--
pull_requests: +5412

___
Python tracker 

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



[issue32775] fnmatch.translate() can produce a pattern which emits a nested set warning

2018-02-09 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 23cdbfa744f0ec0e9e7575d378df4cb758691cd3 by Serhiy Storchaka in 
branch 'master':
bpo-32775: Fix regular expression warnings in fnmatch. (#5583)
https://github.com/python/cpython/commit/23cdbfa744f0ec0e9e7575d378df4cb758691cd3


--

___
Python tracker 

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



[issue32807] Add 'str' property to PathLib

2018-02-09 Thread Arka

Arka  added the comment:

@matrixise

Because the bots were saying, 'skip news', 'skip issue' labels are not found.

--

___
Python tracker 

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



[issue32807] Add 'str' property to PathLib

2018-02-09 Thread Arka

Change by Arka :


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

___
Python tracker 

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



[issue32807] Add 'str' property to PathLib

2018-02-09 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Are you aware of PEP 519?

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue32808] subprocess.check_output opens an unwanted command line window after fall creator update

2018-02-09 Thread Christian Heigele

New submission from Christian Heigele :

Hi,

I have two machines, both Windows 10, both with python 2.7.12 (bug is also 
reproducible with 2.7.14), one of them has the Fall creator update (-> version 
1709) and one doesn't (->version 1607). 

When I execute the checkout on some executable that is available on both 
machines, I get different behaviours: One the one without the fall creator 
update I get the output of that executable as expected as the return value. One 
the machine with the update I see a new command line window popping up, the 
executable runs through, and the return value of check_output is an empty 
string.

I'll use it like follow:

f = subprocess.check_output(['svn.exe', '--help'])

--
components: Windows
messages: 311875
nosy: Christian Heigele, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: subprocess.check_output opens an unwanted command line window after fall 
creator update
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



[issue32807] Add 'str' property to PathLib

2018-02-09 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

and currently for the feature, the PR should be based on master and not 3.5 or 
3.6. because these branch are only for the security and bugfix modes.

Read the devguide at this url: 
https://devguide.python.org/#status-of-python-branches

--
versions: +Python 3.8 -Python 3.6

___
Python tracker 

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



[issue32807] Add 'str' property to PathLib

2018-02-09 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

I have seen your PR, why did you close it?

--
nosy: +matrixise

___
Python tracker 

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



[issue32807] Add 'str' property to PathLib

2018-02-09 Thread Arka

New submission from Arka :

Add 'str' property to PurePath in PathLib that calls __str__ function and 
returns the string representation of the path. It is easier to use than 
str(Path). Many existing methods accept only strings as a path.

--
components: +Library (Lib)
title: Add -> Add 'str' property to PathLib
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



[issue32807] Add

2018-02-09 Thread Arka

Change by Arka :


--
nosy: Arka
priority: normal
severity: normal
status: open
title: Add

___
Python tracker 

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



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

2018-02-09 Thread Yuri Kanivetsky

New submission from Yuri Kanivetsky :

Consider the following script:

# import pdb; pdb.set_trace()
# import re
def f():
import re
print((lambda: re.findall('a', 'aaa'))())
import pdb; pdb.set_trace()
print('test')
f()

When you run it and try to evaluate `(lambda: re.findall('a', 'aaa'))()`, you 
get:

['a', 'a', 'a']
> /home/yuri/_/1.py(7)f()
-> print('test')
(Pdb) (lambda: re.findall('a', 'aaa'))()
*** NameError: name 're' is not defined
(Pdb) import re
(Pdb) (lambda: re.findall('a', 'aaa'))()
*** NameError: name 're' is not defined
(Pdb) 

With the commented out breakpoint it works:

> /home/yuri/_/a.py(3)()
-> def f():
(Pdb) import re
(Pdb) (lambda: re.findall('a', 'aaa'))()
['a', 'a', 'a']
(Pdb) 

Also it works with uncommented global import and second breakpoint:

['a', 'a', 'a']
> /srv/http/sl/makosh/a.py(7)f()
-> print('test')
(Pdb) (lambda: re.findall('a', 'aaa'))()
['a', 'a', 'a']
(Pdb) 

>From what I can see the issue occurs when there's no `re` in `globals` 
>argument here: https://github.com/python/cpython/blob/v3.6.4/Lib/pdb.py#L376

I've run into it when trying to grep some object's attribute names, like:

!list(filter(lambda x: re.search('class', x), dir(__name__)))

--
messages: 311871
nosy: Yuri Kanivetsky
priority: normal
severity: normal
status: open
title: locally imported modules are unaccessible in lambdas in pdb
type: behavior
versions: Python 3.6

___
Python tracker 

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



[issue32805] Possible integer overflow when call PyDTrace_GC_DONE()

2018-02-09 Thread Serhiy Storchaka

New submission from Serhiy Storchaka :

PyDTrace_GC_DONE() accepts the argument of type int. But it is called with the 
sum of collected and uncollectable objects which has type Py_ssize_t and can be 
larger that maximal int.

This produces a compiler warning on Windows:

..\Modules\gcmodule.c(978): warning C4244: 'function': conversion from 
'Py_ssize_t' to 'int', possible loss of data 
[D:\buildarea\3.x.bolen-windows10\build\PCbuild\pythoncore.vcxproj]

and looks as not false alarm.

--
components: Interpreter Core
messages: 311870
nosy: lukasz.langa, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Possible integer overflow when call PyDTrace_GC_DONE()
type: behavior
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



[issue30528] ipaddress.IPv{4,6}Network.reverse_pointer is broken

2018-02-09 Thread Ronald Oussoren

Ronald Oussoren  added the comment:


 documents that this attribute contains the name of the DNS name that could be 
used to query for PTR record. 

That functionality is not well defined for a network object. It might therefore 
be better to just raise an exception for this attribute on network objects.

--
nosy: +ronaldoussoren

___
Python tracker 

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



[issue32616] Significant performance problems with Python 2.7 built with clang 3.x or 4.x

2018-02-09 Thread Ronald Oussoren

Ronald Oussoren  added the comment:

I different question w.r.t. detection of the clang/llvm version on Apple's 
system compiler: Is it worthwhile to do so? 

If the compiler included in the Xcode 9.3 beta (and hence likely the one in 
Xcode 9.3 final) fixes the performance issue a very large subset of people 
building Python for themselves will get a fixed compiler fairly soon. It would 
then be enough to warn about this issue in a readme file for other users.

--

___
Python tracker 

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



  1   2   >