[issue38623] Python documentation should mention how to find site-packages

2020-01-06 Thread miss-islington


Change by miss-islington :


--
pull_requests: +17301
pull_request: https://github.com/python/cpython/pull/17891

___
Python tracker 

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



[issue38623] Python documentation should mention how to find site-packages

2020-01-06 Thread Inada Naoki


Inada Naoki  added the comment:


New changeset ca94677a6216e2d41b04574986ce49d31a0b329c by Inada Naoki in branch 
'master':
bpo-38623: Doc: Add section for site module CLI. (GH-17858)
https://github.com/python/cpython/commit/ca94677a6216e2d41b04574986ce49d31a0b329c


--

___
Python tracker 

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



[issue38623] Python documentation should mention how to find site-packages

2020-01-06 Thread miss-islington


Change by miss-islington :


--
pull_requests: +17300
pull_request: https://github.com/python/cpython/pull/17890

___
Python tracker 

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



[issue37537] Compute allocated blocks in _Py_GetAllocatedBlocks()

2020-01-06 Thread Inada Naoki


Change by Inada Naoki :


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

___
Python tracker 

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



[issue37537] Compute allocated blocks in _Py_GetAllocatedBlocks()

2020-01-06 Thread Batuhan


Batuhan  added the comment:

Anything left on this issue, PR 14680 looks resolved this issue.

--
nosy: +BTaskaya

___
Python tracker 

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



[issue39242] Update news.gmane.org to news.gmane.io

2020-01-06 Thread Dong-hee Na


New submission from Dong-hee Na :

https://discuss.python.org/t/ot-gmane-server-moving/2967

AFAIK, we have several codes that use news.gmane.org.
According to article, don't we have to update it?
(sorry I am not a committer, so I don't have permission to write on that)

https://github.com/python/cpython/search?q=news.gmane.org_q=news.gmane.org

--
messages: 359491
nosy: corona10, pitrou
priority: normal
severity: normal
status: open
title: Update news.gmane.org to news.gmane.io

___
Python tracker 

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



[issue35459] Use PyDict_GetItemWithError() instead of PyDict_GetItem()

2020-01-06 Thread Raphaël M

Raphaël M  added the comment:

Thank you very much!

--

___
Python tracker 

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



[issue35459] Use PyDict_GetItemWithError() instead of PyDict_GetItem()

2020-01-06 Thread Inada Naoki


Inada Naoki  added the comment:

> I've tried writing some Python code to reproduce this bug, but I'm unable to 
> -- I should be missing something. Is there a simple snippet showing the 
> issue? 


Note that this is a bug from long ago.  Why this bug had lived long is it can 
not happen in regular cases.  So it is difficult to reproduce.

See PR 2.  _csv module is changed to use PyDict_GetItemWithError.
Let's try it on Python 3.7.

Python 3.7.6 (default, Dec 30 2019, 19:38:28)
[Clang 11.0.0 (clang-1100.0.33.16)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> class S(str):
...   def __hash__(self):
... raise MemoryError
...
>>> import _csv
>>> _csv.Dialect(S("excel"))
Traceback (most recent call last):
  File "", line 1, in 
_csv.Error: unknown dialect

You can see the MemoryError is suppressed.  Let's try it on Python 3.8.

$ python3
Python 3.8.1 (default, Jan  6 2020, 16:02:33)
 (snip)
>>> _csv.Dialect(S("excel"))
Traceback (most recent call last):
  File "", line 1, in 
  File "", line 3, in __hash__
MemoryError

You can see the MemoryError is not suppressed.

--

___
Python tracker 

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



[issue22606] Inconsistency between Python 2 and PyPy regarding future imports

2020-01-06 Thread Benjamin Peterson


Benjamin Peterson  added the comment:

If you fully compiled this code, it would fail. CPython checks the 
well-formedness of __future__ statements after ast parsing.

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

___
Python tracker 

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



[issue39236] [venv] Adding a .gitignore file to virtual environments

2020-01-06 Thread Anthony Sottile


Change by Anthony Sottile :


--
nosy: +Anthony Sottile

___
Python tracker 

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



[issue39234] `enum.auto()` incrementation value not specified.

2020-01-06 Thread Eric V. Smith


Eric V. Smith  added the comment:

Thanks for the PRs.

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



[issue39241] Popen of python3.6 hangs on os.read(errpipe_read, 50000)

2020-01-06 Thread Xu


New submission from Xu :

I have a piece code hangs on os.read(errpipe_read, 5)
So I compared the python3.6 with python2.7 on _execute_child, I saw:

for python2.7 we create the errpipe_read/write with pipe_cloexec()

1213 # For transferring possible exec failure from child to parent
1214 # The first char specifies the exception type: 0 means
1215 # OSError, 1 means some other error.
1216 errpipe_read, errpipe_write = self.pipe_cloexec()


while for python3.6 we create the errpipe_read/write with pipe()

1251 # For transferring possible exec failure from child to parent.
1252 # Data format: "exception name:hex errno:description"
1253 # Pickle is not used; it is complex and involves memory 
allocation.
1254 errpipe_read, errpipe_write = os.pipe()

Does that mean python3.6 doesn't set the the flag FD_CLOEXEC on the pipe ?

--
components: Library (Lib)
messages: 359486
nosy: liuxu1005
priority: normal
severity: normal
status: open
title: Popen of python3.6 hangs on os.read(errpipe_read, 5)
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



[issue39227] OverflowError in len(range(2**63))

2020-01-06 Thread Raymond Hettinger


Change by Raymond Hettinger :


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



[issue39240] keyerror in string format

2020-01-06 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Instead of doing lookups with square brackets, consider using the dict.get() 
method that returns a default value rather than raising a KeyError for a 
missing key.

composer2[input1]  --> composer2.get(input1, 0)

--
nosy: +rhettinger

___
Python tracker 

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



[issue39240] keyerror in string format

2020-01-06 Thread Eric V. Smith


Eric V. Smith  added the comment:

When creating a bug report, please show the actual errors that you get. 

This is not a bug in python. In line 5 you're looking for composer2['third'], 
so of course you'd need to define it.

--
components:  -Regular Expressions
nosy: +eric.smith
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed
type: compile error -> behavior

___
Python tracker 

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



[issue39240] keyerror in string format

2020-01-06 Thread Gerardo


New submission from Gerardo :

Hi, i think tha this is a problem, i'm not have mutch experiencing in 
programming with python. I have added in the file the line that create the 
problem and a line that make fully functional. Thanks for the time.
Gerry

--
components: Regular Expressions
files: test.py
messages: 359483
nosy: ezio.melotti, gerryc89, mrabarnett
priority: normal
severity: normal
status: open
title: keyerror in string format
type: compile error
versions: Python 3.8
Added file: https://bugs.python.org/file48830/test.py

___
Python tracker 

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



[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-01-06 Thread hai shi


hai shi  added the comment:

Compare to _Py_ForgetReference(), _Py_INC_REFTOTAL in _Py_NewReference() looks 
redundant.

REF: https://github.com/python/cpython/blob/master/Include/object.h#L442

master brach baseline in my vm:
```
sys.gettotalrefcount(): 18049
sys.gettotalrefcount(): 22463
```

after PR17883
```
sys.gettotalrefcount(): 17589
sys.gettotalrefcount(): 22000
```

--

___
Python tracker 

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



[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-01-06 Thread hai shi


Change by hai shi :


--
pull_requests: +17299
pull_request: https://github.com/python/cpython/pull/17883

___
Python tracker 

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



[issue39239] select.epoll.unregister(fd) should not ignore EBADF

2020-01-06 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue39239] select.epoll.unregister(fd) should not ignore EBADF

2020-01-06 Thread STINNER Victor


New submission from STINNER Victor :

The select.epoll.unregister(fd) method currently ignores EBADF error if the 
file descriptor fd is invalid.

I'm surprised by this undocumented behavior:
https://docs.python.org/dev/library/select.html#select.epoll.unregister

This behavior may lead to bugs if the file descriptor number has been recycled 
in the meanwhile. I'm not sure that it's a good idea to silently ignore the 
error.

See bpo-18748 for a similar issue: "io.IOBase destructor silence I/O error on 
close() by default".

Note: The method also ignores EBADF error if the epoll file descriptor has been 
closed.

The behavior is as old as the implementation of select.epoll, bpo-1657:

commit 0e9ab5f2f0f907b57c70557e21633ce8c341d1d1
Author: Christian Heimes 
Date:   Fri Mar 21 23:49:44 2008 +

Applied patch #1657 epoll and kqueue wrappers for the select module
The patch adds wrappers for the Linux epoll syscalls and the BSD kqueue 
syscalls. Thanks to Thomas Herve and the Twisted people for their support a
nd help.
TODO: Finish documentation documentation

Thomas Herve wrote a first implementation in bpo-1675118, but it seems like it 
was Christian Heimes who wrote the unregister() method.

--
components: Library (Lib)
messages: 359481
nosy: christian.heimes, vstinner
priority: normal
severity: normal
status: open
title: select.epoll.unregister(fd) should not ignore EBADF
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



[issue35459] Use PyDict_GetItemWithError() instead of PyDict_GetItem()

2020-01-06 Thread Raphaël M

Raphaël M  added the comment:

Any pointer would also be welcome, and a piece of code showing the bug would 
help me a lot. Thank you.

--

___
Python tracker 

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



[issue37788] fix for bpo-36402 (threading._shutdown() race condition) causes reference leak

2020-01-06 Thread STINNER Victor


STINNER Victor  added the comment:

I marked bpo-39201 as a duplicate of this issue.

--

___
Python tracker 

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



[issue39201] Threading.timer leaks memory in 3.8.0/3.8.1

2020-01-06 Thread STINNER Victor


STINNER Victor  added the comment:

I close this issue as a duplicate of bpo-37788.

--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> fix for bpo-36402 (threading._shutdown() race condition) causes 
reference leak

___
Python tracker 

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



[issue37788] fix for bpo-36402 (threading._shutdown() race condition) causes reference leak

2020-01-06 Thread STINNER Victor


STINNER Victor  added the comment:

I marked bpo-39074 as a duplicate of this issue.

--

___
Python tracker 

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



[issue39074] Threading memory leak in _shutdown_locks for non-daemon threads

2020-01-06 Thread STINNER Victor


STINNER Victor  added the comment:

Ok, I close this issue as a duplicate of bpo-37788.

--
nosy: +vstinner
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> fix for bpo-36402 (threading._shutdown() race condition) causes 
reference leak

___
Python tracker 

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



[issue39230] fail on datetime import if _datetime.py exists in PATH

2020-01-06 Thread STINNER Victor


STINNER Victor  added the comment:

> Sure, that's obvious for `datetime` and `sys`.  Less obvious for unexpected 
> conflicts with stdlib modules that begin with an underscore...

Yeah, sadly, these modules are less known, but cause the same kind of issues :-(

--

___
Python tracker 

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



[issue37387] test_compileall fails randomly on Windows when tests are run in parallel

2020-01-06 Thread STINNER Victor


STINNER Victor  added the comment:

x86 Windows7 3.8:
https://buildbot.python.org/all/#/builders/223/builds/59

FAIL: test_no_args_respects_force_flag 
(test.test_compileall.CommmandLineTestsNoSourceEpoch)
--
Traceback (most recent call last):
  File 
"D:\cygwin\home\db3l\buildarea\3.8.bolen-windows7\build\lib\test\test_py_compile.py",
 line 20, in wrapper
return fxn(*args, **kwargs)
  File 
"D:\cygwin\home\db3l\buildarea\3.8.bolen-windows7\build\lib\test\test_py_compile.py",
 line 20, in wrapper
return fxn(*args, **kwargs)
  File 
"D:\cygwin\home\db3l\buildarea\3.8.bolen-windows7\build\lib\test\test_compileall.py",
 line 322, in test_no_args_respects_force_flag
self.assertRunOK('-f', PYTHONPATH=self.directory)
  File 
"D:\cygwin\home\db3l\buildarea\3.8.bolen-windows7\build\lib\test\test_compileall.py",
 line 271, in assertRunOK
rc, out, err = script_helper.assert_python_ok(
  File 
"D:\cygwin\home\db3l\buildarea\3.8.bolen-windows7\build\lib\test\support\script_helper.py",
 line 157, in assert_python_ok
return _assert_python(True, *args, **env_vars)
  File 
"D:\cygwin\home\db3l\buildarea\3.8.bolen-windows7\build\lib\test\support\script_helper.py",
 line 143, in _assert_python
res.fail(cmd_line)
  File 
"D:\cygwin\home\db3l\buildarea\3.8.bolen-windows7\build\lib\test\support\script_helper.py",
 line 70, in fail
raise AssertionError("Process return code is %d\n"
AssertionError: Process return code is 1
command line: 
['D:\\cygwin\\home\\db3l\\buildarea\\3.8.bolen-windows7\\build\\PCbuild\\win32\\python_d.exe',
 '-X', 'faulthandler', '-S', '-m', 'compileall', '-f']

stdout:
---
(...)

Compiling 
'D:\\cygwin\\home\\db3l\\buildarea\\3.8.bolen-windows7\\build\\lib\\socketserver.py'...

Compiling 
'D:\\cygwin\\home\\db3l\\buildarea\\3.8.bolen-windows7\\build\\lib\\sre_compile.py'...

*** PermissionError: [WinError 5] Access is denied: 
'D:\\cygwin\\home\\db3l\\buildarea\\3.8.bolen-windows7\\build\\lib\\__pycache__\\sre_compile.cpython-38.pyc.12753880'
 -> 
'D:\\cygwin\\home\\db3l\\buildarea\\3.8.bolen-windows7\\build\\lib\\__pycache__\\sre_compile.cpython-38.pyc'

--

___
Python tracker 

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



[issue39238] test_asyncio: test_cancel_make_subprocess_transport_exec() hangs randomly on PPC64LE Fedora 3.x

2020-01-06 Thread STINNER Victor


New submission from STINNER Victor :

PPC64LE Fedora 3.x buildbot:
https://buildbot.python.org/all/#builders/11/builds/134

0:35:30 load avg: 0.00 [420/420/1] test_asyncio crashed (Exit code 1)
Timeout (0:15:00)!
Thread 0x3fff82de5330 (most recent call first):
  File 
"/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/selectors.py",
 line 468 in select
  File 
"/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/asyncio/base_events.py",
 line 1852 in _run_once
  File 
"/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/asyncio/base_events.py",
 line 596 in run_forever
  File 
"/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/asyncio/base_events.py",
 line 629 in run_until_complete
  File 
"/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/test/test_asyncio/test_subprocess.py",
 line 441 in test_cancel_make_subprocess_transport_exec
(...)
0:35:30 load avg: 0.00 Re-running test_asyncio in verbose mode
(...)
test_shell_loop_deprecated 
(test.test_asyncio.test_subprocess.SubprocessFastWatcherTests) ... ok
test_start_new_session 
(test.test_asyncio.test_subprocess.SubprocessFastWatcherTests) ... ok
test_stdin_broken_pipe 
(test.test_asyncio.test_subprocess.SubprocessFastWatcherTests) ... ok
test_stdin_not_inheritable 
(test.test_asyncio.test_subprocess.SubprocessFastWatcherTests) ... ok
test_stdin_stdout 
(test.test_asyncio.test_subprocess.SubprocessFastWatcherTests) ... ok
test_terminate (test.test_asyncio.test_subprocess.SubprocessFastWatcherTests) 
... ok
Timeout (0:15:00)!
Thread 0x3fffb25e5330 (most recent call first):
  File 
"/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/selectors.py",
 line 468 in select
  File 
"/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/asyncio/base_events.py",
 line 1852 in _run_once
  File 
"/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/asyncio/base_events.py",
 line 596 in run_forever
  File 
"/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/asyncio/base_events.py",
 line 629 in run_until_complete
  File 
"/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/test/test_asyncio/test_subprocess.py",
 line 441 in test_cancel_make_subprocess_transport_exec
  

--
components: Tests, asyncio
messages: 359473
nosy: asvetlov, pablogsal, vstinner, yselivanov
priority: normal
severity: normal
status: open
title: test_asyncio: test_cancel_make_subprocess_transport_exec() hangs 
randomly on PPC64LE Fedora 3.x
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



[issue39234] `enum.auto()` incrementation value not specified.

2020-01-06 Thread miss-islington


miss-islington  added the comment:


New changeset 24bcefcb74231476b055bb6f0726642abeb10f04 by Miss Islington (bot) 
(YoSTEALTH) in branch 'master':
bpo-39234: `enum.auto()` default initial value as 1 (GH-17878)
https://github.com/python/cpython/commit/24bcefcb74231476b055bb6f0726642abeb10f04


--
nosy: +miss-islington

___
Python tracker 

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



[issue39041] Support GitHub Actions in CI

2020-01-06 Thread miss-islington


miss-islington  added the comment:


New changeset 676b16c14040ddb9a2ef3408e66a77c1dfb8e841 by Miss Islington (bot) 
in branch '3.7':
bpo-39041: Fix coverage upload command for GitHub Actions (GH-17873)
https://github.com/python/cpython/commit/676b16c14040ddb9a2ef3408e66a77c1dfb8e841


--

___
Python tracker 

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



[issue39041] Support GitHub Actions in CI

2020-01-06 Thread miss-islington


miss-islington  added the comment:


New changeset fb59f5ffe80a1f2dcf7c6cbd2406e15bea49da21 by Miss Islington (bot) 
in branch '3.8':
bpo-39041: Fix coverage upload command for GitHub Actions (GH-17873)
https://github.com/python/cpython/commit/fb59f5ffe80a1f2dcf7c6cbd2406e15bea49da21


--

___
Python tracker 

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



[issue25172] Unix-only crypt should not be present on Windows.

2020-01-06 Thread Steve Dower


Change by Steve Dower :


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

___
Python tracker 

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



[issue25172] Unix-only crypt should not be present on Windows.

2020-01-06 Thread Steve Dower


Steve Dower  added the comment:

I started creating an example of improving the skip cases, and ended up just 
making a PR. It should:

* expect a helpful error on Windows
* work fine on other platforms with crypt
* skip all tests on other platforms without crypt

--

___
Python tracker 

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



[issue39041] Support GitHub Actions in CI

2020-01-06 Thread miss-islington


miss-islington  added the comment:


New changeset b1ce22d086660d2505010694c8813cc67adf8f9e by Miss Islington (bot) 
(Steve Dower) in branch 'master':
bpo-39041: Fix coverage upload command for GitHub Actions (GH-17873)
https://github.com/python/cpython/commit/b1ce22d086660d2505010694c8813cc67adf8f9e


--
nosy: +miss-islington

___
Python tracker 

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



[issue39041] Support GitHub Actions in CI

2020-01-06 Thread miss-islington


Change by miss-islington :


--
pull_requests: +17296
pull_request: https://github.com/python/cpython/pull/17880

___
Python tracker 

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



[issue39041] Support GitHub Actions in CI

2020-01-06 Thread miss-islington


Change by miss-islington :


--
pull_requests: +17295
pull_request: https://github.com/python/cpython/pull/17879

___
Python tracker 

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



[issue39234] `enum.auto()` incrementation value not specified.

2020-01-06 Thread YoSTEALTH


Change by YoSTEALTH :


--
pull_requests: +17294
pull_request: https://github.com/python/cpython/pull/17878

___
Python tracker 

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



[issue25172] Unix-only crypt should not be present on Windows.

2020-01-06 Thread Srinivas Nyayapati


Srinivas Nyayapati  added the comment:

@steve.dower - Does this fix need more work for android? @xdegaye says he does 
not need this for android anymore.

--

___
Python tracker 

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



[issue39237] Redundant call to round in delta_new

2020-01-06 Thread Alex Henrie


Change by Alex Henrie :


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

___
Python tracker 

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



[issue29154] 5 failures in test_doctest: ModuleNotFoundError: No module named 'IPython'

2020-01-06 Thread Batuhan


Batuhan  added the comment:

@Gerrit.Holl do you able to reproduce this with a clean python installation, as 
@eric.snow suggested there is a chance that some kind of pth hack that tried to 
inject ipython etc.

--
nosy: +BTaskaya

___
Python tracker 

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



[issue39237] Redundant call to round in delta_new

2020-01-06 Thread Alex Henrie


New submission from Alex Henrie :

The delta_new function in _datetimemodule.c currently contains the following 
code:

/* Round to nearest whole # of us, and add into x. */
double whole_us = round(leftover_us);
int x_is_odd;
PyObject *temp;

whole_us = round(leftover_us);

The second call to the round function produces the same result as the first 
call and can therefore be safely eliminated.

--
components: Library (Lib)
messages: 359465
nosy: alex.henrie
priority: normal
severity: normal
status: open
title: Redundant call to round in delta_new
type: performance
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



[issue22606] Inconsistency between Python 2 and PyPy regarding future imports

2020-01-06 Thread Batuhan


Batuhan  added the comment:

I guess this issue expired (due to python2).

--
nosy: +BTaskaya

___
Python tracker 

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



[issue39234] `enum.auto()` incrementation value not specified.

2020-01-06 Thread miss-islington


Change by miss-islington :


--
pull_requests: +17291
pull_request: https://github.com/python/cpython/pull/17875

___
Python tracker 

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



[issue39234] `enum.auto()` incrementation value not specified.

2020-01-06 Thread miss-islington


Change by miss-islington :


--
pull_requests: +17292
pull_request: https://github.com/python/cpython/pull/17876

___
Python tracker 

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



[issue39234] `enum.auto()` incrementation value not specified.

2020-01-06 Thread Ethan Furman


Ethan Furman  added the comment:


New changeset 2e9012a3e1e316c54e27f51ba5849ba06eab7da2 by Ethan Furman 
(YoSTEALTH) in branch 'master':
bpo-39234: Doc: `enum.auto()` incrementation value not specified. (GH-17872)
https://github.com/python/cpython/commit/2e9012a3e1e316c54e27f51ba5849ba06eab7da2


--

___
Python tracker 

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



[issue39233] glossary entry for parameter out-of-date for positional-only parameters

2020-01-06 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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

___
Python tracker 

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



[issue38901] [venv] Add a CLI flag to venv to use the pwd basename as the prompt

2020-01-06 Thread Brett Cannon


Brett Cannon  added the comment:

Any more feedback from anyone on the idea of using the basename of a directory 
if specified for `--prompt`?

--

___
Python tracker 

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



[issue39234] `enum.auto()` incrementation value not specified.

2020-01-06 Thread Ethan Furman


Ethan Furman  added the comment:

`auto()` starts with 1 because Enum numbering starts at 1 (which is in the 
docs, albeit buried in the Functional API section).

Thank you for your effort to save somebody else from that frustration, though, 
I appreciate it.

--
nosy: +ethan.furman

___
Python tracker 

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



[issue38901] [venv] Add a CLI flag to venv to use the pwd basename as the prompt

2020-01-06 Thread Brett Cannon


Change by Brett Cannon :


--
title: Add a CLI flag to venv to use the pwd basename as the prompt -> [venv] 
Add a CLI flag to venv to use the pwd basename as the prompt

___
Python tracker 

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



[issue38972] [venv] Link to instructions to change PowerShell execution policy for venv activation

2020-01-06 Thread Brett Cannon


Change by Brett Cannon :


--
title: Link to instructions to change PowerShell execution policy for venv 
activation -> [venv] Link to instructions to change PowerShell execution policy 
for venv activation

___
Python tracker 

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



[issue39158] ast.literal_eval() doesn't support empty sets

2020-01-06 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> "Safe" means safe from user input to literal_eval().

Yup, apologies. I had something in mind and I realized after writing my initial 
comment. That is why I said afterwards:

> and the security concern is non-existent.

--

___
Python tracker 

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



[issue39235] Generator expression has wrong line/col info when inside a Call object

2020-01-06 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

>Do you think it is okay to just remove the call to copy_location?

I think that because in that case the parenthesis is collapsed with function 
call parenthesis, the position of the AST node for the generator expression 
should point to the left parenthesis.

But I would suggest asking Serhiy (I added him to the noisy list) as he was the 
author of the PR.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue23147] Possible error in _header_value_parser.py

2020-01-06 Thread Batuhan


Batuhan  added the comment:

This issue looks resolved.

--
nosy: +BTaskaya

___
Python tracker 

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



[issue39236] [venv] Adding a .gitignore file to virtual environments

2020-01-06 Thread Brett Cannon


Change by Brett Cannon :


--
title: Adding a .gitignore file to virtual environments -> [venv] Adding a 
.gitignore file to virtual environments

___
Python tracker 

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



[issue39236] Adding a .gitignore file to virtual environments

2020-01-06 Thread Brett Cannon


New submission from Brett Cannon :

In a discussion on Twitter, the idea of having venv lay down a .gitignore file 
in a newly created virtual environment that consisted of nothing but `*` came 
up (https://twitter.com/codewithanthony/status/1213680829530099713). The 
purpose would be to help prevent people from inadvertently committing their 
venv to git. It seems pytest does something similar for .pytest_cache (got one 
complaint but have chosen to keep it otherwise).

To me this seems like a good enhancement. Since this would mostly benefit 
beginners then it should probably be an opt-out if we do it at all. Maybe make 
--no-ignore-file to opt out?

FYI Mercurial does not support subdirectory hgignore files like git does, so 
this may be git-specific (for now): 
https://www.selenic.com/mercurial/hgignore.5.html.

--
components: Library (Lib)
messages: 359459
nosy: brett.cannon, vinay.sajip, xtreak
priority: low
severity: normal
status: open
title: Adding a .gitignore file to virtual environments
type: enhancement
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



[issue39235] Generator expression has wrong line/col info when inside a Call object

2020-01-06 Thread Lysandros Nikolaou


Lysandros Nikolaou  added the comment:

Do you think it is okay to just remove the call to copy_location?

--

___
Python tracker 

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



[issue39235] Generator expression has wrong line/col info when inside a Call object

2020-01-06 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

I think that was introduced in  https://bugs.python.org/issue31241

--
nosy: +pablogsal

___
Python tracker 

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



[issue39235] Generator expression has wrong line/col info when inside a Call object

2020-01-06 Thread Lysandros Nikolaou


New submission from Lysandros Nikolaou :

A normal generator expression like (i for i in a) produces the following AST:

Module(
body=[
Expr(
value=GeneratorExp(
elt=Name(
id="i", ctx=Load(), lineno=1, col_offset=1, end_lineno=1, 
end_col_offset=2
),
generators=[
comprehension(
target=Name(
id="i",
ctx=Store(),
lineno=1,
col_offset=7,
end_lineno=1,
end_col_offset=8,
),
iter=Name(
id="a",
ctx=Load(),
lineno=1,
col_offset=12,
end_lineno=1,
end_col_offset=13,
),
ifs=[],
is_async=0,
)
],
lineno=1,
*col_offset=0,*
end_lineno=1,
*end_col_offset=14,*
),
lineno=1,
col_offset=0,
end_lineno=1,
end_col_offset=14,
)
],
type_ignores=[],
)

But when calling a function with a generator expression as an argument, 
something is off:

Module(
body=[
Expr(
value=Call(
func=Name(
id="f", ctx=Load(), lineno=1, col_offset=0, end_lineno=1, 
end_col_offset=1
),
args=[
GeneratorExp(
elt=Name(
id="i",
ctx=Load(),
lineno=1,
col_offset=2,
end_lineno=1,
end_col_offset=3,
),
generators=[
comprehension(
target=Name(
id="i",
ctx=Store(),
lineno=1,
col_offset=8,
end_lineno=1,
end_col_offset=9,
),
iter=Name(
id="a",
ctx=Load(),
lineno=1,
col_offset=13,
end_lineno=1,
end_col_offset=14,
),
ifs=[],
is_async=0,
)
],
lineno=1,
*col_offset=1,*
end_lineno=1,
*end_col_offset=2,*
)
],
keywords=[],
lineno=1,
col_offset=0,
end_lineno=1,
end_col_offset=15,
),
lineno=1,
col_offset=0,
end_lineno=1,
end_col_offset=15,
)
],
type_ignores=[],
)


I'm not sure if this is intentional or not, because there is a call to 
copy_location in Python/ast.c:3149. If this call to copy_location is removed, 
the inconsistency goes away.

--
components: Interpreter Core
messages: 359454
nosy: lys.nikolaou
priority: normal
severity: normal
status: open
title: Generator expression has wrong line/col info when inside a Call object
type: behavior
versions: Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

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



[issue39158] ast.literal_eval() doesn't support empty sets

2020-01-06 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

> The function literal_eval is not safe anymore as the 
> constructor can be intercepted

"Safe" means safe from user input to literal_eval().

If a person can already write arbitrary code that redefines a builtin, then 
they can already do anything they want.

--

___
Python tracker 

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



[issue39041] Support GitHub Actions in CI

2020-01-06 Thread Steve Dower


Change by Steve Dower :


--
pull_requests: +17289
pull_request: https://github.com/python/cpython/pull/17873

___
Python tracker 

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



[issue39234] `enum.auto()` incrementation value not specified.

2020-01-06 Thread YoSTEALTH


Change by YoSTEALTH :


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

___
Python tracker 

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



[issue39234] `enum.auto()` incrementation value not specified.

2020-01-06 Thread YoSTEALTH


New submission from YoSTEALTH :

# enum in C
# -
enum {
a,
b,
c
}
# a = 0
# b = 1
# b = 2

# enum in Python
# --
class Count(enum.IntEnum):
a = enum.auto()
b = enum.auto()
c = enum.auto()
# a = 1
# b = 2
# b = 3


I am not sure why the `enum.auto()` starts with 1 in Python but this has just 
wasted a week worth of my time.

--
assignee: docs@python
components: Documentation
messages: 359452
nosy: YoSTEALTH, docs@python
priority: normal
severity: normal
status: open
title: `enum.auto()` incrementation value not specified.
versions: Python 3.6, 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



[issue39233] glossary entry for parameter out-of-date for positional-only parameters

2020-01-06 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



[issue39233] glossary entry for parameter out-of-date for positional-only parameters

2020-01-06 Thread Mark Dickinson


New submission from Mark Dickinson :

The glossary entry for parameter[1] says:

> Python has no syntax for defining positional-only parameters.

Since PEP 570 landed in Python 3.8, that's no longer true.


[1] https://docs.python.org/3/glossary.html#term-parameter

--
assignee: docs@python
components: Documentation
messages: 359451
nosy: docs@python, mark.dickinson
priority: normal
severity: normal
status: open
title: glossary entry for parameter out-of-date for positional-only parameters
versions: Python 3.8, Python 3.9

___
Python tracker 

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



[issue30717] Add unicode grapheme cluster break algorithm

2020-01-06 Thread Paul Ganssle


Paul Ganssle  added the comment:

> Oh, also, if y'all are fine with binding to Rust (through a C ABI) I'd love 
> to help y'all use unicode-segmentation, which is much less work that pulling 
> in ICU. Otherwise if y'all have implementation questions I can answer them. 
> This spec is kinda tricky to implement efficiently, but it's not super hard.

Is the idea here that we'd take on a new dependency on the compiled 
`unicode-segmentation` binary, rather than adding Rust into our build system? 
Does `unicode-segmentation` support all platforms that CPython supports? I was 
under the impression that Rust requires llvm and llvm doesn't necessarily have 
the same support matrix as CPython (I'd love to be corrected if I'm wrong on 
this).

(Note: I don't actually know what the process is for taking on new dependencies 
like this, just trying to point at one possible stumbling block.)

--

___
Python tracker 

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



[issue39204] Automate adding Type Annotations to Documentation

2020-01-06 Thread Guido van Rossum


Guido van Rossum  added the comment:

Actually I agree with the OP that we could get some mileage out of joining 
typeshed with the docs, regardless of whether there are annotations in the 
stdlib.

--

___
Python tracker 

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



[issue39232] asyncio crashes when tearing down the proactor event loop

2020-01-06 Thread Michael Hall


New submission from Michael Hall :

When using asyncio.run for an asynchronous application utilizing ssl, on 
windows using the proactor event loop the application crashes when the loop is 
closed, completely skipping a finally block in the process.

This appears to be due to a __del__ method on transports used.

Manual handling of the event loop close while including a brief sleep appears 
to work as intended.

Both versions work fine with the selector event loop on linux.

This appears to be a somewhat known issue already, as it's been reported to 
aiohttp, however both the traceback, and the differing behavior seem to 
indicate this is an issue with the proactor event loop.

(On linux this still emits a resource warning without the sleep)

While I don't mind handling the loop cleanup, it seems like this case should 
also emit a resource warning rather than crashing.

If it's decided in which way this should be handled, I'm willing to contribute 
to or help test whatever direction the resolution for this should go. 

Traceback included below, toy version of the problem attached as code.

Exception ignored in: 
Traceback (most recent call last):
  File 
"C:\Users\Michael\AppData\Local\Programs\Python\Python38\lib\asyncio\proactor_events.py",
 line 116, in __del__
self.close()
  File 
"C:\Users\Michael\AppData\Local\Programs\Python\Python38\lib\asyncio\proactor_events.py",
 line 108, in close
self._loop.call_soon(self._call_connection_lost, None)
  File 
"C:\Users\Michael\AppData\Local\Programs\Python\Python38\lib\asyncio\base_events.py",
 line 715, in call_soon
self._check_closed()
  File 
"C:\Users\Michael\AppData\Local\Programs\Python\Python38\lib\asyncio\base_events.py",
 line 508, in _check_closed   
raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed

--
components: asyncio
files: example.py
messages: 359448
nosy: asvetlov, mikeshardmind, yselivanov
priority: normal
severity: normal
status: open
title: asyncio crashes when tearing down the proactor event loop
type: crash
versions: Python 3.8
Added file: https://bugs.python.org/file48829/example.py

___
Python tracker 

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



[issue38623] Python documentation should mention how to find site-packages

2020-01-06 Thread Brett Cannon


Brett Cannon  added the comment:

I agree with Inada-san that pointing out how to get the file path on a module 
is a better solution then explaining directory layouts which are borderline 
implementation details.

--

___
Python tracker 

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



[issue39204] Automate adding Type Annotations to Documentation

2020-01-06 Thread Brett Cannon


Brett Cannon  added the comment:

I think a bigger thing is to simply get type annotations to be used in the 
stdlib first, then we can worry about documenting them as part of the API. :)

--
nosy: +brett.cannon

___
Python tracker 

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



[issue39221] Cross compiled python installed wrong version of lib2to3/Grammar pickle

2020-01-06 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
versions:  -Python 2.7, Python 3.5, Python 3.6

___
Python tracker 

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



[issue39225] Python should warn when a global/local has the same name as a builtin

2020-01-06 Thread Brett Cannon


Brett Cannon  added the comment:

I agree with Eric that this is the realm of linters as there are legitimate 
reasons sometimes to mask and redefine built-ins.

Thanks for the idea, Reuven, but I'm closing the issue.

--
nosy: +brett.cannon
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



[issue39226] venv does not include pythonXX.lib

2020-01-06 Thread Brett Cannon


Brett Cannon  added the comment:

When have you seen this work previously? On my Windows 10 machine there is no 
Scripts\libs directory for Python 3.7, let alone a python37.lib file in any 
directory that I can find.

--
nosy: +brett.cannon, vinay.sajip

___
Python tracker 

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



[issue39231] Mistaken notion in tutorial

2020-01-06 Thread Robert


New submission from Robert :

https://docs.python.org/3/tutorial/controlflow.html
4.7.8. Function Annotations
[...] "The following example has a positional argument, a keyword argument, and 
the return value annotated:"

It is not a "positional argument" but an "optional argument".

--
assignee: docs@python
components: Documentation
messages: 359443
nosy: docs@python, r0b
priority: normal
severity: normal
status: open
title: Mistaken notion in tutorial
type: enhancement

___
Python tracker 

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



[issue39230] fail on datetime import if _datetime.py exists in PATH

2020-01-06 Thread mmckerns


mmckerns  added the comment:

Sure, that's obvious for `datetime` and `sys`.  Less obvious for unexpected 
conflicts with stdlib modules that begin with an underscore...

--

___
Python tracker 

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



[issue29778] _Py_CheckPython3 uses uninitialized dllpath when embedder sets module path with Py_SetPath

2020-01-06 Thread STINNER Victor


STINNER Victor  added the comment:

Oops, I'm guilty of pushing this change! Sorry & thanks for the fix.

if (_Py_dll_path == NULL) {
/* Already set: nothing to do */
return _PyStatus_OK();
}

--

___
Python tracker 

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



[issue29778] _Py_CheckPython3 uses uninitialized dllpath when embedder sets module path with Py_SetPath

2020-01-06 Thread miss-islington


miss-islington  added the comment:


New changeset a9a43c221bf3896ed1d1c2eee2531b7121cf78e4 by Miss Islington (bot) 
in branch '3.8':
bpo-29778: Fix incorrect NULL check in _PyPathConfig_InitDLLPath() (GH-17818)
https://github.com/python/cpython/commit/a9a43c221bf3896ed1d1c2eee2531b7121cf78e4


--
nosy: +miss-islington

___
Python tracker 

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



[issue29778] _Py_CheckPython3 uses uninitialized dllpath when embedder sets module path with Py_SetPath

2020-01-06 Thread miss-islington


Change by miss-islington :


--
pull_requests: +17287
pull_request: https://github.com/python/cpython/pull/17871

___
Python tracker 

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



[issue29778] _Py_CheckPython3 uses uninitialized dllpath when embedder sets module path with Py_SetPath

2020-01-06 Thread Steve Dower


Change by Steve Dower :


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



[issue29778] _Py_CheckPython3 uses uninitialized dllpath when embedder sets module path with Py_SetPath

2020-01-06 Thread Steve Dower


Steve Dower  added the comment:

Thanks, Anthony! And congratulations on becoming a CPython contributor!

--

___
Python tracker 

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



[issue29778] _Py_CheckPython3 uses uninitialized dllpath when embedder sets module path with Py_SetPath

2020-01-06 Thread Steve Dower


Steve Dower  added the comment:


New changeset 7b79dc9200a19ecbac667111dffd58e314be02a8 by Steve Dower (Anthony 
Wee) in branch 'master':
bpo-29778: Fix incorrect NULL check in _PyPathConfig_InitDLLPath() (GH-17818)
https://github.com/python/cpython/commit/7b79dc9200a19ecbac667111dffd58e314be02a8


--

___
Python tracker 

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



[issue39041] Support GitHub Actions in CI

2020-01-06 Thread Steve Dower


Steve Dower  added the comment:


New changeset 0048833e1308d39dc9c6489da7872ade0f14486f by Steve Dower (Miss 
Islington (bot)) in branch '3.8':
bpo-39041: Add GitHub Actions support (GH-17594)
https://github.com/python/cpython/commit/0048833e1308d39dc9c6489da7872ade0f14486f


--

___
Python tracker 

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



[issue39041] Support GitHub Actions in CI

2020-01-06 Thread Steve Dower


Steve Dower  added the comment:


New changeset acf5e5f3f42a3d2985499df82331705edbe717be by Steve Dower (Miss 
Islington (bot)) in branch '3.7':
bpo-39041: Add GitHub Actions support (GH-17594)
https://github.com/python/cpython/commit/acf5e5f3f42a3d2985499df82331705edbe717be


--

___
Python tracker 

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



[issue39209] Crash on REPL mode with long text copy and paste

2020-01-06 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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



[issue39209] Crash on REPL mode with long text copy and paste

2020-01-06 Thread miss-islington


miss-islington  added the comment:


New changeset b2e281aaa2e4a1f24671d293dfd06b23bb052e47 by Miss Islington (bot) 
in branch '3.8':
bpo-39209: Manage correctly multi-line tokens in interactive mode (GH-17860)
https://github.com/python/cpython/commit/b2e281aaa2e4a1f24671d293dfd06b23bb052e47


--
nosy: +miss-islington

___
Python tracker 

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



[issue35561] Valgrind reports Syscall param epoll_ctl(event) points to uninitialised byte(s)

2020-01-06 Thread STINNER Victor


STINNER Victor  added the comment:

> Initialize ev.data to 0

I dislike this option, since the code is legit: Valgrind produces a false alarm.

> Use Misc/valgrind-python.supp to ignore this *false alarm*

I prefer this option.

--

___
Python tracker 

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



[issue39041] Support GitHub Actions in CI

2020-01-06 Thread miss-islington


Change by miss-islington :


--
pull_requests: +17286
pull_request: https://github.com/python/cpython/pull/17869

___
Python tracker 

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



[issue39041] Support GitHub Actions in CI

2020-01-06 Thread miss-islington


Change by miss-islington :


--
pull_requests: +17285
pull_request: https://github.com/python/cpython/pull/17868

___
Python tracker 

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



[issue35561] Valgrind reports Syscall param epoll_ctl(event) points to uninitialised byte(s)

2020-01-06 Thread STINNER Victor


STINNER Victor  added the comment:

On my Fedora 31, epoll_event structure is defined in sys/epoll.h as:

typedef union epoll_data
{
  void *ptr;
  int fd;
  uint32_t u32;
  uint64_t u64;
} epoll_data_t;

struct epoll_event
{
  uint32_t events;  /* Epoll events */
  epoll_data_t data;/* User data variable */
} __EPOLL_PACKED;


I can reproduce the issue using this Python script:

import select
p = select.epoll()
p.register(1, select.EPOLLIN)
p.poll(0)

The Linux syscall is defined as:

asmlinkage long sys_epoll_ctl(int epfd, int op, int fd,
struct epoll_event __user *event);

It's implemented in fs/eventpoll.c:

https://github.com/torvalds/linux/blob/c79f46a282390e0f5b306007bf7b11a46d529538/fs/eventpoll.c#L2077-L2083

Valgrind complains that ev.data is only partially initialized: it's a 64-bit 
structure, but we only set ev.data.fd. I guess that the glibc implements 
epoll_ctl() as a raw system call: Valgrind is unable to know if it's ok to only 
partially initialize the epoll_data union.


Benjamin: "I suspect Valgrind is being too conservative. union epoll_data is 64 
bits wide but the file descriptor only occupies the first 32 bits. The last 32 
bits don't need to be initialized by the application."

Right. But Valgrind is not smart enough.

I see 2 options:

* Initialize ev.data to 0
* Use Misc/valgrind-python.supp to ignore this *false alarm*

--
nosy: +vstinner

___
Python tracker 

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



[issue39209] Crash on REPL mode with long text copy and paste

2020-01-06 Thread miss-islington


Change by miss-islington :


--
pull_requests: +17284
pull_request: https://github.com/python/cpython/pull/17867

___
Python tracker 

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



[issue39209] Crash on REPL mode with long text copy and paste

2020-01-06 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 5ec91f78d59d9c39b984f284e00cd04b96ddb5db by Pablo Galindo in 
branch 'master':
bpo-39209: Manage correctly multi-line tokens in interactive mode (GH-17860)
https://github.com/python/cpython/commit/5ec91f78d59d9c39b984f284e00cd04b96ddb5db


--

___
Python tracker 

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



[issue39230] fail on datetime import if _datetime.py exists in PATH

2020-01-06 Thread STINNER Victor


STINNER Victor  added the comment:

This issue is not a bug. You should not use the same module name, than a stdlib 
module. For example, if you have a "sys.py" file in your Python path 
(PYTHONPATH), you will get big troubles.

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

___
Python tracker 

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



[issue39212] Show qualified function name when giving arguments error

2020-01-06 Thread Ram Rachum


Ram Rachum  added the comment:

> But I *did* get that text. I'm asking how you got the *different* text 
> which you gave in your initial request.

Oh, right. Looking back, turns out Wing IDE did that for me. Didn't notice, 
sorry.

> So in my opinion, and I recognise that you may disagree, this is only of 
> benefit in a minority of cases. For the majority of cases, it will only 
> be additional noise in the message that adds nothing that wasn't already 
> obvious from the source line.

I understand your perspective.

One correction though regarding adding noise to the error. You gave this 
example:

builtins.TypeError: package.some_module.MyClass.__init__ takes 1 positional 
argument but 2 were given

While actually it'll be:

TypeError: MyClass.__init__ takes 1 positional argument but 2 were given

Since __qualname__ only includes the class, not its module. So it's quite a bit 
shorter.

--

___
Python tracker 

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



[issue39230] fail on datetime import if _datetime.py exists in PATH

2020-01-06 Thread mmckerns


New submission from mmckerns :

In Lib/datetime.py, there's an import: `from _datetime import *`
which will fail if `_datetime.py` exists in the current directory, or earlier 
in the path than Lib.  For reference, see:
https://github.com/numpy/numpy/issues/15257

--
components: Library (Lib)
messages: 359429
nosy: mmckerns
priority: normal
severity: normal
status: open
title: fail on datetime import if _datetime.py exists in PATH
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



[issue34480] _markupbase.py fails with UnboundLocalError on invalid keyword in marked section

2020-01-06 Thread Ezio Melotti


Ezio Melotti  added the comment:

I think so.
It might be worth double-checking if BeautifulSoup (and possibly other 3rd 
party libs) use _markupbase.py and/or ParserBase.error().  If they do, giving 
them a heads up and/or going through a regular deprecation process might be 
good, otherwise PR 8562 can be reopened and merged after removing the call to 
self.error() in ParserBase.parse_marked_section().

--

___
Python tracker 

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



[issue25872] multithreading traceback KeyError when modifying file

2020-01-06 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Thanks Michael, reopening. I was wrong while trying the reproducer since map is 
lazy in Python 3 and threads were not executed.

--
resolution: wont fix -> 
stage: resolved -> 
status: closed -> open
versions: +Python 3.9 -Python 2.7

___
Python tracker 

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



[issue39220] constant folding affects annotations despite 'from __future__ import annotations'

2020-01-06 Thread Pablo Galindo Salgado

Pablo Galindo Salgado  added the comment:

>> I don't have a particularly deep opinion on what should be done, just a bit 
>> of weirdness I hit upon while implementing the PEP in PyPy. fwiw, we 
>> implement it as an AST transformer that the compiler runs before running the 
>> optimizer to make sure that the AST optimizations don't get applied to 
>> annotions. The transformer replaces all annotations with a Constant ast 
>> node, containing the unparsed string.


I have given it a try in PR 17866 and it was not as invasive as I imagine, so 
if Łukasz agrees, we can go ahead :)

--

___
Python tracker 

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



[issue39220] constant folding affects annotations despite 'from __future__ import annotations'

2020-01-06 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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

___
Python tracker 

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



[issue38907] http.server (command) fails to bind dual-stack on Windows

2020-01-06 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

In PR 17378, we discussed and I believe the conclusion is that the fix in the 
other PR(s) is sufficient to address the deficiency.

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



[issue38907] http.server (command) fails to bind dual-stack on Windows

2020-01-06 Thread Jason R. Coombs


Jason R. Coombs  added the comment:


New changeset 33cb4a62bf6848093b7a05c9794582d204798b1b by Jason R. Coombs (Miss 
Islington (bot)) in branch '3.8':
bpo-38907: Suppress any exception when attempting to set V6ONLY. (GH-17864) 
(GH-17865)
https://github.com/python/cpython/commit/33cb4a62bf6848093b7a05c9794582d204798b1b


--

___
Python tracker 

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



[issue39200] Fix inaccurate TypeError messages when calling with insufficient arguments

2020-01-06 Thread Dong-hee Na


Dong-hee Na  added the comment:

@pablogsal 
PR 17813 is merged. 
If you don't mind, can we review PR 17814 that will be applied or not?

--

___
Python tracker 

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



  1   2   >