[issue37457] python3.7 re.split() module bug

2019-06-30 Thread SilentGhost


Change by SilentGhost :


--
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed
type: performance -> behavior

___
Python tracker 

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



[issue37460] importlib.import_module("test.test_curses") could not import by libregrtest

2019-06-30 Thread Yoong Hor Meng


Yoong Hor Meng  added the comment:

I just find it strange that libncursesw5-dev  is used during compilation but 
libncurses5-dev is used for testing.

--
stage:  -> resolved
status: open -> closed
type:  -> compile error

___
Python tracker 

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



[issue37460] importlib.import_module("test.test_curses") could not import by libregrtest

2019-06-30 Thread Yoong Hor Meng


Yoong Hor Meng  added the comment:

I installed libncurses5-dev and ran configure again:

./configure \
  --with-openssl=/usr
  --enable-optimizations

It could be build without skipping test_curses. It seems that regrtest.py looks 
for libncurses5-dev during configure state.

...
Run tests sequentially
0:00:00 load avg: 0.52 [  1/423] test_grammar
0:00:00 load avg: 0.52 [  2/423] test_opcodes
0:00:00 load avg: 0.52 [  3/423] test_dict
0:00:02 load avg: 0.52 [  4/423] test_builtin
0:00:05 load avg: 0.52 [  5/423] test_exceptions
0:00:26 load avg: 0.52 [  6/423] test_types
0:00:27 load avg: 0.52 [  7/423] test_unittest
0:00:57 load avg: 0.52 [  8/423] test_doctest -- test_unittest passed in 30 sec 
585 ms
0:01:17 load avg: 0.52 [  9/423] test_doctest2
0:01:17 load avg: 0.52 [ 10/423] test_support
0:02:22 load avg: 0.52 [ 11/423] test___all__ -- test_support passed in 1 min 4 
sec
0:02:33 load avg: 0.52 [ 12/423] test___future__
0:02:33 load avg: 0.52 [ 13/423] test__locale
0:02:34 load avg: 0.52 [ 14/423] test__opcode
0:02:34 load avg: 0.52 [ 15/423] test__osx_support
0:02:35 load avg: 0.52 [ 16/423] test__xxsubinterpreters
0:02:46 load avg: 0.52 [ 17/423] test_abc
0:02:47 load avg: 0.52 [ 18/423] test_abstract_numbers
0:02:48 load avg: 0.52 [ 19/423] test_aifc
0:02:50 load avg: 0.52 [ 20/423] test_argparse
0:03:01 load avg: 0.52 [ 21/423] test_array
0:03:09 load avg: 0.52 [ 22/423] test_asdl_parser
0:03:10 load avg: 0.52 [ 23/423] test_ast
0:03:20 load avg: 0.52 [ 24/423] test_asyncgen
0:03:22 load avg: 0.52 [ 25/423] test_asynchat
0:03:25 load avg: 0.52 [ 26/423] test_asyncio
Future exception was never retrieved
future: 
BrokenPipeError
Future exception was never retrieved
future: 
BrokenPipeError
Future exception was never retrieved
future: 
BrokenPipeError
Future exception was never retrieved
future: 
BrokenPipeError
test test_asyncio failed
0:07:47 load avg: 0.52 [ 27/423] test_asyncore -- test_asyncio failed in 4 min 
22 sec
0:07:47 load avg: 0.52 [ 28/423] test_atexit -- test_asyncore skipped
0:07:50 load avg: 0.52 [ 29/423] test_audioop
0:07:50 load avg: 0.52 [ 30/423] test_audit
0:08:06 load avg: 0.52 [ 31/423] test_augassign
0:08:07 load avg: 0.52 [ 32/423] test_base64
0:08:12 load avg: 0.52 [ 33/423] test_baseexception
0:08:13 load avg: 0.52 [ 34/423] test_bdb
0:08:14 load avg: 0.52 [ 35/423] test_bigaddrspace
0:08:15 load avg: 0.52 [ 36/423] test_bigmem
0:08:16 load avg: 0.52 [ 37/423] test_binascii
0:08:17 load avg: 0.52 [ 38/423] test_binhex
0:08:17 load avg: 0.52 [ 39/423] test_binop
0:08:18 load avg: 0.52 [ 40/423] test_bisect
0:08:19 load avg: 0.52 [ 41/423] test_bool
0:08:20 load avg: 0.52 [ 42/423] test_buffer
0:08:57 load avg: 0.52 [ 43/423] test_bufio -- test_buffer passed in 37 sec 284 
ms
0:09:15 load avg: 0.52 [ 44/423] test_bytes
0:09:24 load avg: 0.52 [ 45/423] test_bz2
...


I ran all this in wsl.

--

___
Python tracker 

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



[issue37452] Microsoft store package has an invalid ExecutablePath registry entry

2019-06-30 Thread Steve Dower


Steve Dower  added the comment:

Unfortunately, we don't control that path - it comes from a parameter 
substitution.

I'll have to see whether there's another parameter we can use. All of this 
stuff is in undocumented territory, unfortunately...

--

___
Python tracker 

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



[issue37457] python3.7 re.split() module bug

2019-06-30 Thread Ma Lin


Ma Lin  added the comment:

Try this pattern:

>>> re.split(r"\s+", text)
['Some', 'File', 'Num10', 'example.txt']

IMO 3.7 behaivor is more reasonable, it fixes a bug (issue25054).

--
nosy: +Ma Lin

___
Python tracker 

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



[issue37461] email.parser.Parser hang

2019-06-30 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +maxking

___
Python tracker 

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



[issue37460] importlib.import_module("test.test_curses") could not import by libregrtest

2019-06-30 Thread Yoong Hor Meng


Yoong Hor Meng  added the comment:

https://bugs.python.org/issue5356 mentioned that one has to pass 

-ucurses to regrtest.py

It works.  However the Makefile does not pass the information to regrtest.py 
when calling test_curses.py

--

___
Python tracker 

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



[issue37461] email.parser.Parser hang

2019-06-30 Thread Guido Vranken


New submission from Guido Vranken :

The following will hang, and consume a large amount of memory:

from email.parser import BytesParser, Parser
from email.policy import default
payload = "".join(chr(c) for c in [0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 
0x2d, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x78, 0x3b, 0x61, 0x72, 0x1b, 0x2a, 0x3d, 
0x22, 0x73, 0x4f, 0x27, 0x23, 0x61, 0xff, 0xff, 0x27, 0x5c, 0x22])
Parser(policy=default).parsestr(payload)

--
components: email
messages: 346953
nosy: Guido, barry, r.david.murray
priority: normal
severity: normal
status: open
title: email.parser.Parser hang
type: crash
versions: Python 3.9

___
Python tracker 

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



[issue37460] importlib.import_module("test.test_curses") could not import by libregrtest

2019-06-30 Thread Yoong Hor Meng


New submission from Yoong Hor Meng :

test_curses.py was skipped during unit test.  I manually ran the test via 
debugger:

python3 -m pdb /home/s/lib/python3.8/test/regrtest.py test_curses 

It showed error at 

../lib/python3.8/test/libregrtest/runtest.py(215)_runtest_inner2():

210 abstest = get_abs_module(ns, test_name) 
 211

  212 # remove the module from 
sys.module to reload it if it was already imported  
213 support.unload(abstest) 
 
214 
 215  -> the_module 
= importlib.import_module(abstest)  
  216   

   217 # If the test has a test_ma
 in, that will run the appropriate  
   218 # tests.  If not, use normal unittest test 
loading.
  219 test_runner = getattr(the_module, "test_main", None)  
   220 if 
test_runner is None:

test.support.ResourceDenied: Use of the 'curses' resource not enabled 

However, it was possible to load the module

import importlib
the_module = importlib.import_module('test.test_curses')
print(the_module)

--
components: Library (Lib)
messages: 346952
nosy: yoonghm
priority: normal
severity: normal
status: open
title: importlib.import_module("test.test_curses") could not import by 
libregrtest
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



[issue37456] FAQ says positional arguments aren't a thing

2019-06-30 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +pablogsal

___
Python tracker 

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



[issue37459] importlib docs improperly reference get_resource_loader()

2019-06-30 Thread Gregory Szorc


New submission from Gregory Szorc :

The documentation in importlib.rst says that a loader should implement 
`get_resource_loader(fullname)`. This is the only occurrence of 
`get_resource_loader` in the CPython source tree. It should be changed to 
`get_resource_reader()`.

--
components: Library (Lib)
messages: 346951
nosy: indygreg
priority: normal
severity: normal
status: open
title: importlib docs improperly reference get_resource_loader()
versions: Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

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



[issue37458] ast: Different FormattedValue expressions have same col_offset information

2019-06-30 Thread Weijar Z


New submission from Weijar Z :

This express 

  f"{x}{x}{y}"

will produce ast tree:

{
"$node": "Module",
"body": [
{
"$node": "Expr",
"value": {
"$node": "JoinedStr",
"values": [
{
"$node": "FormattedValue",
"value": {
"$node": "Name",
"id": "x",
"ctx": {
"$node": "Load"
},
"lineno": 1,
"col_offset": 3
},
"conversion": -1,
"format_spec": null,
"lineno": 1,
"col_offset": 0
},
{
"$node": "FormattedValue",
"value": {
"$node": "Name",
"id": "x",
"ctx": {
"$node": "Load"
},
"lineno": 1,
"col_offset": 3
},
"conversion": -1,
"format_spec": null,
"lineno": 1,
"col_offset": 0
},
{
"$node": "FormattedValue",
"value": {
"$node": "Name",
"id": "y",
"ctx": {
"$node": "Load"
},
"lineno": 1,
"col_offset": 9
},
"conversion": -1,
"format_spec": null,
"lineno": 1,
"col_offset": 0
}
],
"lineno": 1,
"col_offset": 0
},
"lineno": 1,
"col_offset": 0
}
]
}

These two variable 'x' has same col_offset '3', is it wrong?

--
components: Library (Lib)
messages: 346950
nosy: Weijar Z
priority: normal
severity: normal
status: open
title: ast: Different FormattedValue expressions have same col_offset 
information
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



[issue37457] python3.7 re.split() module bug

2019-06-30 Thread Dami Jeong


New submission from Dami Jeong :

text = "Some File Num10 example.txt"
re.split("\s*", text)

The result of the regular expression in version 3.7 changed from the version 
3.6 result

python3.6 version result :
['Some', 'File', 'Num10', 'example.txt']

python3.7 version result :
['', 'S', 'o', 'm', 'e', '', 'F', 'i', 'l', 'e', '', 'N', 'u', 'm', '1', '0', 
'', 'e', 'x', 'a', 'm', 'p', 'l', 'e', '.', 't', 'x', 't', '']

--
components: Regular Expressions
messages: 346949
nosy: ezio.melotti, kate, mrabarnett
priority: normal
severity: normal
status: open
title: python3.7 re.split() module bug
type: performance
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



[issue32631] IDLE: revise zzdummy.py

2019-06-30 Thread Cheryl Sabella


Change by Cheryl Sabella :


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

___
Python tracker 

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



[issue37424] subprocess.run timeout does not function if shell=True and capture_output=True

2019-06-30 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

Issue 30154 that I've marked as a duplicate demonstrates this problem without 
using shell=True.  The solution I proposed handles that via the additional 
small timeout on the cleanup side, but still has the caveat that the grandchild 
processes keep running unless the caller used start_new_session=True.

See the PR.

We cannot reasonably determine when start_new_session=True should be a default 
behavior.  And I worry that doing it when it should not be will cause 
unexpected new problems with existing code.

--

___
Python tracker 

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



[issue37456] FAQ says positional arguments aren't a thing

2019-06-30 Thread SoniEx2


New submission from SoniEx2 :

https://docs.python.org/3.8/faq/programming.html#what-does-the-slash-in-the-parameter-list-of-a-function-mean

"Note that as of this writing this is only documentational and no valid syntax 
in Python, although there is PEP 570, which proposes a syntax for position-only 
parameters in Python."

>From what I understand, they are now a thing. Perhaps it's time to take that 
>out?

--
assignee: docs@python
components: Documentation
messages: 346947
nosy: SoniEx2, docs@python
priority: normal
severity: normal
status: open
title: FAQ says positional arguments aren't a thing
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



[issue30154] subprocess.run with stderr connected to a pipe won't timeout when killing a never-ending shell commanad

2019-06-30 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> subprocess.run timeout does not function if shell=True and 
capture_output=True

___
Python tracker 

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



[issue37455] asyncio.run() error related to finalizing async generators

2019-06-30 Thread Sam Frances


Sam Frances  added the comment:

One final note: changing the `main()` function from the example to add a 
zero-sleep seems to fix it, but this seems like a rather ad-hoc solution.

```
async def main():
async for i in double(count()):
if i > 10:
break
print(i)
await asyncio.sleep(0)
```

result:

```
$ python example.py 
0
2
4
6
8
10
double() cleanup
count() cleanup
```

--

___
Python tracker 

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



[issue26534] subprocess.check_output with shell=True ignores the timeout

2019-06-30 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
resolution:  -> duplicate
stage: patch review -> resolved
status: open -> closed
superseder:  -> subprocess.run timeout does not function if shell=True and 
capture_output=True

___
Python tracker 

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



[issue5115] Extend subprocess.kill to be able to kill process groups

2019-06-30 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

this is part of a chain of other related issues.  the interesting thing in the 
patch in here is the potential feature to have send_signal/terminate/kill be 
able to optionally kill a process group.

the logic as is in the patch in this issue is dangerous as often the calling 
process _is_ the pgrp leader and would be killed.  we _never_ want the 
subprocess signaling methods to kill the current process as that would be 
surprising to users.

--
nosy: +gregory.p.smith
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



[issue5115] Extend subprocess.kill to be able to kill process groups

2019-06-30 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
resolution:  -> duplicate
superseder:  -> subprocess.run timeout does not function if shell=True and 
capture_output=True

___
Python tracker 

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



[issue37424] subprocess.run timeout does not function if shell=True and capture_output=True

2019-06-30 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
pull_requests: +14307
pull_request: https://github.com/python/cpython/pull/14490

___
Python tracker 

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



[issue37455] asyncio.run() error related to finalizing async generators

2019-06-30 Thread Sam Frances


Sam Frances  added the comment:

Apologies for the stray unused function in the example. It should have read:

```
import asyncio


async def count():
try:
i = 0
while True:
yield i
i += 1
finally:
print("count() cleanup")


async def double(source):
try:
async for n in source:
yield n * 2
finally:
print("double() cleanup")


async def main():
async for i in double(count()):
if i > 10:
return
print(i)

asyncio.run(main())
```

--

___
Python tracker 

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



[issue37455] asyncio.run() error related to finalizing async generators

2019-06-30 Thread Sam Frances


New submission from Sam Frances :

The documentation for `asyncio.run()` states:

"This function runs the passed coroutine, taking care of managing the asyncio 
event loop and finalizing asynchronous generators."

However, the following example seems to indicate that async generators are not 
being cleared up correctly.

```
import asyncio


async def count():
try:
i = 0
while True:
yield i
i += 1
finally:
print("count() cleanup")


async def double(source):
try:
async for n in source:
yield n * 2
finally:
print("double() cleanup")


async def anext(aiter):
return await aiter.__anext__()


async def main():
async for i in double(count()):
if i > 10:
return
print(i)

asyncio.run(main())

```

The result is:

```
$ python example.py 
0
2
4
6
8
10
unhandled exception during asyncio.run() shutdown
task: ()> exception=RuntimeError("can't send non-None value to a 
just-started coroutine")>
RuntimeError: can't send non-None value to a just-started coroutine
count() cleanup

```

The above error is from Python 3.8.0b1+, but the exact same error occurs in 
Python 3.7.

I'm not sure if this is a bug or if I am misunderstanding the intended 
behaviour of `asyncio.run()`, but the behaviour was certainly surprising to me.

--
components: asyncio
messages: 346943
nosy: asvetlov, samfrances, yselivanov
priority: normal
severity: normal
status: open
title: asyncio.run() error related to finalizing async generators
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



[issue5115] Extend subprocess.kill to be able to kill process groups

2019-06-30 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
pull_requests:  -7893

___
Python tracker 

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



[issue37454] Clarify docs for math.log1p()

2019-06-30 Thread Raymond Hettinger


New submission from Raymond Hettinger :

Currently the docs say, "The result is calculated in a way which is accurate 
for x near zero."

That is somewhat vague.  Some quick tests show that it is often more accurate 
than log() for the whole range of 0.0 < x < 1.0; however, for x < 0.0 it is 
always worse.

Since the function is just a pass-through to the C library, we probably can't 
make any guarantees.  On the other hand, it is hard to know when this function 
is preferred without some guidance.

--
assignee: docs@python
components: Documentation
files: study_log1p.py
messages: 346942
nosy: docs@python, mark.dickinson, rhettinger, tim.peters
priority: low
severity: normal
status: open
title: Clarify docs for math.log1p()
versions: Python 3.8, Python 3.9
Added file: https://bugs.python.org/file48448/study_log1p.py

___
Python tracker 

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



[issue37450] Generalize Euclidean distance function in the math module to Minkowski distance

2019-06-30 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

I would like to decline this for now.  We're being reserved about what goes 
into the math module, deferring many needs to third-party packages.

--
resolution:  -> rejected
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



[issue37453] Symlink creation on Windows should work without privilege escalation

2019-06-30 Thread Eryk Sun


Eryk Sun  added the comment:

FYI, this only works when the system is in developer mode. If you want 
authenticated users and non-elevated administrators to have symlink rights in 
applications that haven't been updated to use this flag, or without enabling 
developer mode, grant the right to create symbolic links to the "Authenticated 
Users" (S-1-5-11) well-known group.

--
nosy: +eryksun

___
Python tracker 

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



[issue37452] Microsoft store package has an invalid ExecutablePath registry entry

2019-06-30 Thread Eryk Sun


Eryk Sun  added the comment:

> The expected behavior would be to have it point to 
> "%LOCALAPPDATA%\Microsoft\WindowsApps\Python37.exe" (or something 
> else that's reasonable) since PEP514 requires it to be an actual 
> executable.
 
This appears to be a duplicate of issue 36649. But I think this has to be 
looked at again. In Windows 10 1903 (build 10.0.18362.*), CreateProcess can 
directly run the real executable that's installed under 
"%ProgramFiles%\WindowsApps" by getting the package information it needs from 
the user's corresponding app-exec link in 
"%LocalAppData%\Microsoft\WindowsApps". Apparently the latest skip-ahead 
preview releases no longer implement this, in which case shouldn't the 
installer set the ExecutablePath and WindowedExecutablePath values to the 
user's "python.exe" and "pythonw.exe" app-exec links in 
"%LocalAppData%\Microsoft\WindowsApps"?

--
nosy: +eryksun

___
Python tracker 

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



[issue37453] Symlink creation on Windows should work without privilege escalation

2019-06-30 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

I see looking at the code and docs now that this work was done for Python 3.8.

--
resolution:  -> works for me
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



[issue37453] Symlink creation on Windows should work without privilege escalation

2019-06-30 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

The missing reference above should be 
https://blogs.windows.com/windowsdeveloper/2016/12/02/symlinks-windows-10/#iqm9GJhlyWhcM78e.97

--

___
Python tracker 

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



[issue36390] IDLE: Refactor formatting methods from editor

2019-06-30 Thread Tal Einat


Tal Einat  added the comment:

> 1.  The name `formatregion` could probably be improved.

FormatRegion is good enough, and is consistent with FormatParagraph.

> 2.  The `classifyws` method is a module level method in editor.  It's needed 
> in `formatregion` also, so I made a copy (bad!).  I would have liked to 
> create a `utils.py` for this, but maybe there's a better place for it?  It 
> doesn't just operate on text widgets as it is just a string function.  I'm 
> sure there's an obvious choice that I'm missing.  See also #4 below.

As you're just trying to refactor with minimal changes, this can just stay 
as-is IMO. 

My optimal end solution would be:
1. remove classifyws()
2. create get_line_indent(line) function which returns re.match(r'[ \t]*', 
line).end()
3. use len(indent) and/or len(indent.expandtabs(tabwidth)) as needed.
4. get_line_indent(line) is so simple that having it duplicated would be fine 
IMHO.

> 3.  `tabwidth` and `indentwidth` in `formatregion` are getting the values 
> from the editor window.  I thought about adding those to the init for 
> FormatRegion, but then they would need to be updated if config changed.  Not 
> sure which way would be better.

I say, leave this the way it is.

> 4.  Other methods in editor might be candidates for moving, such as the 
> auto-indent methods (search on `### begin autoindent code ###` in editor) and 
> specifically `smart_indent_event`.  Moving more of the indent code to a 
> separate module helps with #2 and #3 above, but I wasn't sure how much of the 
> text formatting should be moved.  I thought it best to start with the minimal 
> change.

I wouldn't move event handlers. I will say that the code in some of those 
functions could use a bit of cleanup and standardization WRT indentation 
handling, e.g. using get_line_indent() as described above in a few places where 
it is naively re-implemented with a loop.

--
nosy: +taleinat

___
Python tracker 

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



[issue37453] Symlink creation on Windows should work without privilege escalation

2019-06-30 Thread Jason R. Coombs


New submission from Jason R. Coombs :

A few years ago, Windows [announced more lenient support for creating symbolic 
links](). This more lenient support requires the caller to pass a flag in the 
API. Neither the blog post nor the API docs give any indication of why one 
would not ever pass that flag, and passing it will enable symlink to work in 
more cases that work in Unix, so I believe Python should set the 
SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE flag.

--
messages: 346935
nosy: jaraco, steve.dower
priority: normal
severity: normal
status: open
title: Symlink creation on Windows should work without privilege escalation
versions: Python 3.9

___
Python tracker 

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



[issue37449] Move ensurepip off of pkgutil and to importlib.resources

2019-06-30 Thread Barry A. Warsaw


Change by Barry A. Warsaw :


--
nosy: +barry

___
Python tracker 

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



[issue36889] Merge StreamWriter and StreamReader into just asyncio.Stream

2019-06-30 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
pull_requests: +14306
pull_request: https://github.com/python/cpython/pull/14488

___
Python tracker 

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



[issue37199] Test suite fails when Ipv6 is unavailable

2019-06-30 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Thanks!

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.8

___
Python tracker 

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



[issue37199] Test suite fails when Ipv6 is unavailable

2019-06-30 Thread miss-islington


miss-islington  added the comment:


New changeset c2684c6d62978e9ce8256c3c7744d0332a2abe4c by Miss Islington (bot) 
in branch '3.8':
bpo-37199: Fix test failures when IPv6 is unavailable or disabled (GH-14480)
https://github.com/python/cpython/commit/c2684c6d62978e9ce8256c3c7744d0332a2abe4c


--
nosy: +miss-islington

___
Python tracker 

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



[issue37199] Test suite fails when Ipv6 is unavailable

2019-06-30 Thread miss-islington


Change by miss-islington :


--
pull_requests: +14305
pull_request: https://github.com/python/cpython/pull/14486

___
Python tracker 

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



[issue37199] Test suite fails when Ipv6 is unavailable

2019-06-30 Thread Andrew Svetlov


Andrew Svetlov  added the comment:


New changeset c2cda638d63b98f5cf9a8ef13e15aace2b7e3f0b by Andrew Svetlov 
(Zackery Spytz) in branch 'master':
bpo-37199: Fix test failures when IPv6 is unavailable or disabled (#14480)
https://github.com/python/cpython/commit/c2cda638d63b98f5cf9a8ef13e15aace2b7e3f0b


--
nosy: +asvetlov

___
Python tracker 

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



[issue37452] Microsoft store package has an invalid ExecutablePath registry entry

2019-06-30 Thread Fredrik Mellbin


New submission from Fredrik Mellbin :

The Microsoft store release doesn't seem to populate the the "ExecutablePath" 
registry entry properly. Instead it has a the path to something that isn't an 
executable which can be seen in the attached screenshot.

The expected behavior would be to have it point to 
"%LOCALAPPDATA%\Microsoft\WindowsApps\Python37.exe" (or something else that's 
reasonable) since PEP514 requires it to be an actual executable.

--
components: Windows
files: vs_installershell_2019-06-27_23-32-05.png
messages: 346931
nosy: Fredrik Mellbin, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Microsoft store package has an invalid ExecutablePath registry entry
type: behavior
versions: Python 3.7
Added file: 
https://bugs.python.org/file48447/vs_installershell_2019-06-27_23-32-05.png

___
Python tracker 

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



[issue37226] Asyncio Fatal Error on SSL Transport - IndexError Deque Index Out Of Range

2019-06-30 Thread Maayan Keshet


Maayan Keshet  added the comment:

Any updates on this issue? We're also encountering it as part of our websocket 
clients.

--
nosy: +maayank

___
Python tracker 

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



[issue36168] DOC: Fix capitalization in string.rst

2019-06-30 Thread Krishna Oza


Krishna Oza  added the comment:

I am getting the error "GitHub PR already added to issue" when submitting my 
Github PR for this issue.

--
nosy: +Krishna Oza

___
Python tracker 

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



[issue36168] DOC: Fix capitalization in string.rst

2019-06-30 Thread Roundup Robot


Change by Roundup Robot :


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

___
Python tracker 

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



[issue36497] Undocumented behavior in csv.Sniffer (preferred delimiters)

2019-06-30 Thread Avinash Sajjanshetty


Avinash Sajjanshetty  added the comment:

can I take up this issue?

--
nosy: +avi

___
Python tracker 

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



[issue35621] asyncio.create_subprocess_exec() only works with main event loop

2019-06-30 Thread miss-islington


miss-islington  added the comment:


New changeset bf8cb31803558f1105efb15b0ee4bd184f3218c8 by Miss Islington (bot) 
in branch '3.8':
bpo-35621: Support running subprocesses in asyncio when loop is executed in 
non-main thread  (GH-14344)
https://github.com/python/cpython/commit/bf8cb31803558f1105efb15b0ee4bd184f3218c8


--

___
Python tracker 

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



[issue35621] asyncio.create_subprocess_exec() only works with main event loop

2019-06-30 Thread Andrew Svetlov


Change by Andrew Svetlov :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.9 -Python 3.6, Python 3.7

___
Python tracker 

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



[issue35621] asyncio.create_subprocess_exec() only works with main event loop

2019-06-30 Thread miss-islington


Change by miss-islington :


--
pull_requests: +14301
pull_request: https://github.com/python/cpython/pull/14484

___
Python tracker 

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



[issue35621] asyncio.create_subprocess_exec() only works with main event loop

2019-06-30 Thread Andrew Svetlov


Andrew Svetlov  added the comment:


New changeset 0d671c04c39b52e44597491b893eb0b6c86b3d45 by Andrew Svetlov in 
branch 'master':
bpo-35621: Support running subprocesses in asyncio when loop is executed in 
non-main thread  (GH-14344)
https://github.com/python/cpython/commit/0d671c04c39b52e44597491b893eb0b6c86b3d45


--

___
Python tracker 

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



[issue37440] httplib should enable post-handshake authentication for TLS 1.3

2019-06-30 Thread Florian Bruhin


Change by Florian Bruhin :


--
nosy: +The Compiler

___
Python tracker 

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



[issue37428] SSLContext.post_handshake_auth implicitly enables cert validation

2019-06-30 Thread Florian Bruhin


Change by Florian Bruhin :


--
nosy: +The Compiler

___
Python tracker 

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



[issue37451] Remove redudant test code in _testcapimodule.c

2019-06-30 Thread hai shi


Change by hai shi :


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

___
Python tracker 

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



[issue37451] Remove redudant test code in _testcapimodule.c

2019-06-30 Thread hai shi


New submission from hai shi :

the code in 
https://github.com/python/cpython/blob/master/Objects/unicodeobject.c#L3163-L3165
 looks redundant, due to 
https://github.com/python/cpython/blob/master/Objects/unicodeobject.c#L3163-L3165

--
messages: 346923
nosy: shihai1991
priority: normal
severity: normal
status: open
title: Remove redudant test code in _testcapimodule.c

___
Python tracker 

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



[issue36689] docs: os.path.commonpath raises ValueError for different drives

2019-06-30 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Yes, sure

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



[issue36689] docs: os.path.commonpath raises ValueError for different drives

2019-06-30 Thread Avinash Sajjanshetty


Avinash Sajjanshetty  added the comment:

status of issue should be closed? cos the related PR is already merged

--
nosy: +avi

___
Python tracker 

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



[issue37399] XML text behaviour change if there are comments

2019-06-30 Thread Stefan Behnel


Stefan Behnel  added the comment:

I'm working on a patch. It's not entirely trivial, so it might take a couple of 
days.

--
assignee:  -> scoder

___
Python tracker 

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



[issue37450] Generalize Euclidean distance function in the math module to Minkowski distance

2019-06-30 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +mark.dickinson, rhettinger, stutzbach

___
Python tracker 

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



[issue37450] Generalize Euclidean distance function in the math module to Minkowski distance

2019-06-30 Thread Rafael Villca Poggian


Change by Rafael Villca Poggian :


--
type:  -> enhancement

___
Python tracker 

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



[issue37450] Generalize Euclidean distance function in the math module to Minkowski distance

2019-06-30 Thread Rafael Villca Poggian


New submission from Rafael Villca Poggian :

Given that Euclidean distance function was added into the Math module, I think 
it would be better to have the generalized version of the function as an 
implementation of the Minkowski distance with p=2 by default, thus maintaining 
the use as Euclidean distance, providing the extra uses of Minkowski distance.

--
components: Library (Lib)
messages: 346919
nosy: nubol23
priority: normal
severity: normal
status: open
title: Generalize Euclidean distance function in the math module to Minkowski 
distance
versions: Python 3.9

___
Python tracker 

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



[issue29505] Submit the re, json, & csv modules to oss-fuzz testing

2019-06-30 Thread miss-islington


miss-islington  added the comment:


New changeset ffcc161c753a72e7c4237c1e3c433d47b020978e by Miss Islington (bot) 
in branch '3.8':
bpo-29505: Add more fuzzing for re.compile, re.load and csv.reader (GH-14255)
https://github.com/python/cpython/commit/ffcc161c753a72e7c4237c1e3c433d47b020978e


--

___
Python tracker 

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



[issue37199] Test suite fails when Ipv6 is unavailable

2019-06-30 Thread Zackery Spytz


Zackery Spytz  added the comment:

I've created a PR for this issue.

--
components: +Tests
nosy: +ZackerySpytz

___
Python tracker 

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



[issue36167] DOC: Incorrect capitalization in Programming FAQ

2019-06-30 Thread Avinash Sajjanshetty


Change by Avinash Sajjanshetty :


--
pull_requests: +14299
pull_request: https://github.com/python/cpython/pull/14482

___
Python tracker 

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



[issue36167] DOC: Incorrect capitalization in Programming FAQ

2019-06-30 Thread Prateek Nayak


Change by Prateek Nayak :


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

___
Python tracker 

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