[issue40670] supplying an empty string to timeit causes an IndentationError

2020-05-21 Thread Florian Dahlitz


Change by Florian Dahlitz :


--
nosy: +DahlitzFlorian

___
Python tracker 

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



[issue29981] Update Index for set, dict, and generator 'comprehensions'

2020-05-21 Thread Florian Dahlitz


Florian Dahlitz  added the comment:

I guess it would have been good if I waited submitting a PR until you replied 
to my message. This way, I would have known that two separate PRs would be 
better suited here - sorry for that.

Nevertheless, I read the discussions here and in PR #995 and I'm pretty sure 
that the proposed changes do fit into the documentation (pretty similar to 
those from PR #995).

I'm eager to hear your or other people's feedback - thanks!

--

___
Python tracker 

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



[issue40707] Popen.communicate documentation does not say how to get the return code

2020-05-21 Thread Gareth Rees


New submission from Gareth Rees :

When using subprocess.Popen.communicate(), it is natural to wonder how to get
the exit code of the subprocess. However, the documentation [1] says:

Interact with process: Send data to stdin. Read data from stdout and
stderr, until end-of-file is reached. Wait for process to terminate. The
optional input argument should be data to be sent to the child process, or
None, if no data should be sent to the child. If streams were opened in
text mode, input must be a string. Otherwise, it must be bytes.

communicate() returns a tuple (stdout_data, stderr_data). The data will be
strings if streams were opened in text mode; otherwise, bytes.

If you can guess that communicate() might set returncode, then you can find
what you need in the documentation for that attribute [2]:

The child return code, set by poll() and wait() (and indirectly by
communicate()).

I suggest that the documentation for communicate() be updated to mention that
it sets the returncode attribute. This would be consistent with poll() and
wait(), which already mention this.

[1]: 
https://docs.python.org/3/library/subprocess.html#subprocess.Popen.communicate
[2]: 
https://docs.python.org/3/library/subprocess.html#subprocess.Popen.returncode

--
assignee: docs@python
components: Documentation
messages: 369502
nosy: docs@python, g...@garethrees.org
priority: normal
severity: normal
status: open
title: Popen.communicate documentation does not say how to get the return code
type: enhancement
versions: Python 3.10, Python 3.5, 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



[issue40707] Popen.communicate documentation does not say how to get the return code

2020-05-21 Thread Gareth Rees


Change by Gareth Rees :


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

___
Python tracker 

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



[issue40670] supplying an empty string to timeit causes an IndentationError

2020-05-21 Thread Florian Dahlitz


Florian Dahlitz  added the comment:

Calling timeit from command-line with the empty string defaults to 'pass'. I 
suggest to adopt this behaviour for calling timeit.timeit in the REPL as 
@edison.abahurire already suggested. I would be happy to submit a PR for it.

--

___
Python tracker 

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



[issue40708] Malfunctioning of '\r'

2020-05-21 Thread Sanmitha


New submission from Sanmitha :

'\r' in python 3.7.2, 3.7.4, 3.8.2, 2.x versions doesn't give the desired output
Eg:
print("computer\rscience")
The expected output of the above code is : sciencer
But it displays : computerscience without functioning of \r

--
assignee: terry.reedy
components: IDLE
messages: 369504
nosy: Sanmitha, terry.reedy
priority: normal
severity: normal
status: open
title: Malfunctioning of '\r'
type: performance
versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue40708] Clearing the screen of IDLE interactive mode in Windows

2020-05-21 Thread Sanmitha


Sanmitha  added the comment:

Clearing the screen of IDLE interactive mode using the following code:
import os
os.system("cls")
It doesn't clear the screen in Windows

--
title: Malfunctioning of '\r' -> Clearing the screen of IDLE interactive mode 
in Windows

___
Python tracker 

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



[issue40670] supplying an empty string to timeit causes an IndentationError

2020-05-21 Thread Florian Dahlitz


Change by Florian Dahlitz :


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

___
Python tracker 

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



[issue40670] supplying an empty string to timeit causes an IndentationError

2020-05-21 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Accepting an empty string in CLI is just an artifact of the implementation.  
There was no intention to support it. It will fail if pass a space:

./python -m timeit ' '

or two empty arguments:
IndentationError:
./python -m timeit '' ''

I do not see this is an issue. Garbage in -- garbage out. IndentationError is a 
subclass of SyntaxError, so if you handle it programmatically, it does not 
matter.

Of course we try to catch some user errors and provide informative traceback. 
timeit now correctly handles most of code which interferes with the control 
flow in functions and loops: 'return', 'yield', 'break', 'await'.

But it is still possible to bypass the validation. For example:

./python -m timeit -s 'while False:' -s 'pass' 'break'

I think there is an infinite number of ways to fool timeit. And an empty string 
is just one of them, not special enough to add a special handling in the code.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue40691] misleading output from difflib unified_diff

2020-05-21 Thread Florian Dahlitz


Change by Florian Dahlitz :


--
nosy: +DahlitzFlorian

___
Python tracker 

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



[issue40701] tempfile mixes str and bytes in an inconsistent manner

2020-05-21 Thread Florian Dahlitz


Change by Florian Dahlitz :


--
nosy: +DahlitzFlorian

___
Python tracker 

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



[issue40696] "await" hangs in Python3.9.0b1.

2020-05-21 Thread Chris Jerdonek


Change by Chris Jerdonek :


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

___
Python tracker 

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



[issue40670] supplying an empty string to timeit causes an IndentationError

2020-05-21 Thread Florian Dahlitz


Florian Dahlitz  added the comment:

I see your point and agree with you. However, IMHO the CLI and the direct 
function call should behave the same way to not confuse users. The opened PR 
ensures that.

--

___
Python tracker 

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



[issue40709] Malfunctioning of '\r'

2020-05-21 Thread Sanmitha


New submission from Sanmitha :

The escape sequence '\r' (carriage return) doesn't function in 3.x and 2.x 
versions.
Eg:
print("computer\rscience")
Expected output : sciencer
But, it displays computerscience without the functioning of'\r'

--
assignee: terry.reedy
components: IDLE
files: error
messages: 369508
nosy: Sanmitha, terry.reedy
priority: normal
severity: normal
status: open
title: Malfunctioning of '\r'
type: performance
versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8
Added file: https://bugs.python.org/file49174/error

___
Python tracker 

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



[issue40709] Malfunctioning of '\r'

2020-05-21 Thread Sanmitha


Sanmitha  added the comment:

The escape sequence '\r' (carriage return) doesn't function in 3.x and 2.x 
versions.
Eg:
print("computer\rscience")
Expected output : sciencer
But, it displays computerscience without the functioning of'\r'

--
Added file: https://bugs.python.org/file49175/error

___
Python tracker 

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



[issue40696] "await" hangs in Python3.9.0b1.

2020-05-21 Thread Chris Jerdonek


Chris Jerdonek  added the comment:

I just posted a draft PR that implements the narrower fix:
https://github.com/python/cpython/pull/20287
I confirmed that the Django test passes with it. I also included two regression 
tests: one using only generators, and one more like the Django test that awaits 
a task.

My solution was to update the exception context in gen_send_ex() using 
_PyErr_SetObject() instead of _PyErr_ChainExceptions() -- because 
_PyErr_SetObject() does the cycle detection we've been discussing, and 
_PyErr_ChainExceptions() doesn't.

While _PyErr_SetObject()'s cycle detection isn't complete in that it can't 
detect cycles that begin further down the chain, it's good enough for this case.

--

___
Python tracker 

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



[issue40701] tempfile mixes str and bytes in an inconsistent manner

2020-05-21 Thread Eric L.


Eric L.  added the comment:

In the meantime, I noticed the following in addition:

[ericl@tuxedo ~]$ python3.9
Python 3.9.0a6 (default, Apr 28 2020, 00:00:00) 
[GCC 10.0.1 20200430 (Red Hat 10.0.1-0.14)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tempfile
>>> tempfile.tempdir = b'/tmp'
>>> tempfile.gettempdir()
b'/tmp'
>>> tempfile.tempdir = '/tmp'
>>> tempfile.gettempdirb()
b'/tmp'

This actually explicitly hurts the interface description which states that 
tempfile.gettempdir() returns a string.

"Encouraged" by this discovery, I've tried to write a patch of tempfile.py 
addressing the issues discovered. It's my first patch ever of Python so bare 
with me. The default remains string but if someone _explicitly_ sets tempdir to 
bytes, it'll become bytes. I've tried all the commands listed previously and it 
all looks consistent to me.

--
keywords: +patch
Added file: https://bugs.python.org/file49176/tempfile.py.diff

___
Python tracker 

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



[issue40710] Malfunctioning of '\r'

2020-05-21 Thread Sanmitha


Change by Sanmitha :


--
assignee: terry.reedy
components: IDLE
nosy: Sanmitha Sadhishkumar, terry.reedy
priority: normal
severity: normal
status: open
title: Malfunctioning of '\r'
type: performance
versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue40710] Malfunctioning of '\r'

2020-05-21 Thread Sanmitha


New submission from Sanmitha :

The escape sequence '\r' (carriage return) doesn't function in 3.x and 2.x 
versions.
Eg:
print("computer\rscience")
Expected output : sciencer
But, it displays computerscience without the functioning of'\r'

--
Added file: https://bugs.python.org/file49177/r

___
Python tracker 

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



[issue40711] Clearing the screen of IDLE interactive mode in Windows

2020-05-21 Thread Sanmitha


Change by Sanmitha :


--
assignee: terry.reedy
components: IDLE
nosy: Sanmitha Sadhishkumar, terry.reedy
priority: normal
severity: normal
status: open
title: Clearing the screen of IDLE interactive mode in Windows
type: performance
versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue40711] Clearing the screen of IDLE interactive mode in Windows

2020-05-21 Thread Sanmitha


New submission from Sanmitha :

Clearing the screen of IDLE interactive mode using the following code:
import os
os.system("cls")
It doesn't clear the screen in Windows. Actually these two statements have no 
effect at all.

--
Added file: https://bugs.python.org/file49178/Error_clearing screen

___
Python tracker 

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



[issue40696] "await" hangs in Python3.9.0b1.

2020-05-21 Thread Chris Jerdonek


Chris Jerdonek  added the comment:

Also, I just want to point out one thing about _PyErr_SetObject(). I believe it 
can detect cycles of arbitrary length (which is what the while loop is for). 
It's just that it can only detect cycles that involve the first node. So for 
things to fail with _PyErr_SetObject(), someone would need to mess with 
exceptions further down the chain. So I *think* hangs should be pretty unlikely 
with the narrower fix.

--

___
Python tracker 

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



[issue40710] Malfunctioning of '\r'

2020-05-21 Thread pmp-p


pmp-p  added the comment:

Hi, i can't reproduce on standard terminals, what is your OS version and 
terminal application ( also please state value of $TERM )

--
nosy: +pmpp

___
Python tracker 

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



[issue40709] Malfunctioning of '\r'

2020-05-21 Thread Ezio Melotti


Ezio Melotti  added the comment:

The behavior of \r depends on the operating system and terminal you are using, 
and not on Python itself.

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



[issue40710] Malfunctioning of '\r'

2020-05-21 Thread Ezio Melotti


Ezio Melotti  added the comment:

The behavior of \r depends on the operating system and terminal you are using, 
and not on Python itself.

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



[issue40708] Clearing the screen of IDLE interactive mode in Windows

2020-05-21 Thread Ezio Melotti


Change by Ezio Melotti :


--
assignee: terry.reedy -> ezio.melotti
nosy: +ezio.melotti
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Clearing the screen of IDLE interactive mode in Windows
type: performance -> behavior

___
Python tracker 

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



[issue40701] tempfile mixes str and bytes in an inconsistent manner

2020-05-21 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
nosy: +gregory.p.smith

___
Python tracker 

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



[issue40712] fstrings are not docstrings

2020-05-21 Thread radkujawa


New submission from radkujawa :

see example:

>>> def f():
... f"""asdf"""
... pass
... 
>>> f.__doc__
>>> def f():
... """asdf"""
... pass
... 
>>> f.__doc__
'asdf'
>>>

--
components: Tests
messages: 369518
nosy: radkujawa
priority: normal
severity: normal
status: open
title: fstrings are not docstrings
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



[issue40712] fstrings are not docstrings

2020-05-21 Thread radkujawa


radkujawa  added the comment:

duplicate of https://bugs.python.org/issue28739

behaviour described in:
https://docs.python.org/3/reference/lexical_analysis.html#formatted-string-literals

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



[issue39782] local varible referenced a Exception won't be collected in function

2020-05-21 Thread Rémi Lapeyre

Change by Rémi Lapeyre :


--
nosy: +remi.lapeyre
nosy_count: 2.0 -> 3.0
pull_requests: +19562
pull_request: https://github.com/python/cpython/pull/20288

___
Python tracker 

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



[issue29847] Path takes and ignores **kwargs

2020-05-21 Thread Rémi Lapeyre

Rémi Lapeyre  added the comment:

PurePath subclasses cannot support kwargs as __new__() does not accept **kwargs:


>>> from pathlib import PurePath
>>> class MyPurePath(PurePath):
... def __init__(self, *args, **kargs): pass
... 
>>> MyPurePath('foo', spam=True)
Traceback (most recent call last):
  File "", line 1, in 
TypeError: __new__() got an unexpected keyword argument 'spam'


The behaviour for this should probably be made the same for both Path and 
PurePath.

--
nosy: +remi.lapeyre

___
Python tracker 

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



[issue40705] use-after-free in _zoneinfo.c's module_free function

2020-05-21 Thread Paul Ganssle


Change by Paul Ganssle :


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



[issue39783] Optimize construction of Path from other Paths by just returning the same object?

2020-05-21 Thread Rémi Lapeyre

Change by Rémi Lapeyre :


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

___
Python tracker 

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



[issue39782] local varible referenced a Exception won't be collected in function

2020-05-21 Thread Rémi Lapeyre

Change by Rémi Lapeyre :


--
pull_requests:  -19562

___
Python tracker 

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



[issue40710] Malfunctioning of '\r' (ii)

2020-05-21 Thread Sanmitha


Sanmitha  added the comment:

The escape sequence'\r' doesn't work in Windows operating system. All the 
versions including windows 10 doesn't support.

--
resolution: not a bug -> 
status: closed -> open
title: Malfunctioning of '\r' -> Malfunctioning of '\r' (ii)
Added file: https://bugs.python.org/file49179/r

___
Python tracker 

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



[issue40696] Exception handling with "await" can hang in Python3.9.0b1

2020-05-21 Thread Chris Jerdonek


Change by Chris Jerdonek :


--
components: +Interpreter Core -asyncio
title: "await" hangs in Python3.9.0b1. -> Exception handling with "await" can 
hang in Python3.9.0b1
type:  -> behavior
versions: +Python 3.10

___
Python tracker 

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



[issue40679] show class name in method invocation TypeError

2020-05-21 Thread Chris Jerdonek


Change by Chris Jerdonek :


--
components: +Interpreter Core
versions: +Python 3.10 -Python 3.9

___
Python tracker 

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



[issue40273] mappingproxy isn't reversible

2020-05-21 Thread Rémi Lapeyre

Rémi Lapeyre  added the comment:

I think this issue can be closed thanks to Zackery Spytz.

--
nosy: +remi.lapeyre

___
Python tracker 

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



[issue40713] _zoneinfo.c can use dst_offset without initialization in parse_tz_str()

2020-05-21 Thread Rémi Lapeyre

Change by Rémi Lapeyre :


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

___
Python tracker 

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



[issue40713] _zoneinfo.c can use dst_offset without initialization in parse_tz_str()

2020-05-21 Thread Rémi Lapeyre

New submission from Rémi Lapeyre :

Here's the warning given by clang:


/Users/remi/src/cpython/Modules/_zoneinfo.c:1487:9: warning: variable 
'dst_offset' is used uninitialized whenever 'if'
  condition is true [-Wsometimes-uninitialized]
if (*p == '\0') {
^~
/Users/remi/src/cpython/Modules/_zoneinfo.c:1544:50: note: uninitialized use 
occurs here
build_tzrule(std_abbr, dst_abbr, std_offset, dst_offset, start, end, out);
 ^~
/Users/remi/src/cpython/Modules/_zoneinfo.c:1487:5: note: remove the 'if' if 
its condition is always false
if (*p == '\0') {
^
/Users/remi/src/cpython/Modules/_zoneinfo.c:1460:32: note: initialize the 
variable 'dst_offset' to silence this warning
long std_offset, dst_offset;
   ^
= 0
/Users/remi/src/cpython/Modules/_zoneinfo.c:1910:19: warning: suggest braces 
around initialization of subobject
  [-Wmissing-braces]
_tzrule rv = {0};
  ^
  {}

Looking at the code path, the unitialized dst_offset may create a ZoneInfo with 
a garbage value in dstoff with some inputs so this should be backported to 
Python3.9 too.

--
components: Library (Lib)
messages: 369523
nosy: remi.lapeyre
priority: normal
severity: normal
status: open
title: _zoneinfo.c can use dst_offset without initialization in parse_tz_str()
type: behavior
versions: Python 3.10, Python 3.9

___
Python tracker 

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



[issue40690] unittest: if FunctionTestCase is imported, the loader loads "tests" from it

2020-05-21 Thread Rémi Lapeyre

Rémi Lapeyre  added the comment:

Hi Vitalii, can you give more context about why you are writing this code, what 
you expect it to do and why is there a bug?

--
nosy: +remi.lapeyre

___
Python tracker 

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



[issue23188] Provide a C helper function to chain raised (but not yet caught) exceptions

2020-05-21 Thread Chris Jerdonek


Change by Chris Jerdonek :


--
nosy: +chris.jerdonek

___
Python tracker 

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



[issue40273] mappingproxy isn't reversible

2020-05-21 Thread Raymond Hettinger


Change by Raymond Hettinger :


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



[issue39573] [C API] Make PyObject an opaque structure in the limited C API

2020-05-21 Thread Dong-hee Na


Change by Dong-hee Na :


--
pull_requests: +19565
pull_request: https://github.com/python/cpython/pull/20290

___
Python tracker 

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



[issue40714] Remove compile warning from _zoneinfo.c

2020-05-21 Thread Dong-hee Na


New submission from Dong-hee Na :

/Users/corona10/oss/cpython/Modules/_zoneinfo.c:1487:9: warning: variable
  'dst_offset' is used uninitialized whenever 'if' condition is true
  [-Wsometimes-uninitialized]
if (*p == '\0') {
^~
/Users/corona10/oss/cpython/Modules/_zoneinfo.c:1544:50: note: uninitialized use
  occurs here
build_tzrule(std_abbr, dst_abbr, std_offset, dst_offset, start, end, out);
 ^~
/Users/corona10/oss/cpython/Modules/_zoneinfo.c:1487:5: note: remove the 'if' if
  its condition is always false
if (*p == '\0') {
^
/Users/corona10/oss/cpython/Modules/_zoneinfo.c:1460:32: note: initialize the
  variable 'dst_offset' to silence this warning
long std_offset, dst_offset;
   ^
= 0
/Users/corona10/oss/cpython/Modules/_zoneinfo.c:1910:19: warning: suggest braces
  around initialization of subobject [-Wmissing-braces]
_tzrule rv = {0};
  ^
  {}

--
messages: 369525
nosy: corona10
priority: normal
severity: normal
status: open
title: Remove compile warning from _zoneinfo.c
type: enhancement
versions: Python 3.10

___
Python tracker 

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



[issue40714] Remove compile warning from _zoneinfo.c

2020-05-21 Thread Dong-hee Na


Change by Dong-hee Na :


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

___
Python tracker 

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



[issue40714] Remove compile warning from _zoneinfo.c

2020-05-21 Thread Dong-hee Na


Dong-hee Na  added the comment:

It happened from clang compiler of macOS.
Clang 11.0.3 (clang-1103.0.32.29)]

--
nosy: +p-ganssle

___
Python tracker 

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



[issue40714] Remove compile warning from _zoneinfo.c

2020-05-21 Thread Dong-hee Na


Change by Dong-hee Na :


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



[issue40715] Pegen: dict unpacking inside dict comprehension

2020-05-21 Thread Batuhan Taskaya


New submission from Batuhan Taskaya :

>>> {**{} for a in [1]}
ValueError: field 'key' is required for DictComp

should be

>>> {**{} for a in [1]}
  File "", line 1
{**{} for a in [1]}
 ^
SyntaxError: dict unpacking cannot be used in dict comprehension

--
messages: 369527
nosy: BTaskaya
priority: normal
severity: normal
status: open
title: Pegen: dict unpacking inside dict comprehension

___
Python tracker 

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



[issue40715] Pegen: dict unpacking inside dict comprehension

2020-05-21 Thread Batuhan Taskaya


Change by Batuhan Taskaya :


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

___
Python tracker 

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



[issue40714] Remove compile warning from _zoneinfo.c

2020-05-21 Thread Dong-hee Na


Dong-hee Na  added the comment:


New changeset a487a39dca4c41305928c7dfdbcb0b3aa344683b by Dong-hee Na in branch 
'master':
bpo-40714: Remove compile warning from _zoneinfo.c (GH-20291)
https://github.com/python/cpython/commit/a487a39dca4c41305928c7dfdbcb0b3aa344683b


--

___
Python tracker 

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



[issue40714] Remove compile warning from _zoneinfo.c

2020-05-21 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 2.0 -> 3.0
pull_requests: +19568
pull_request: https://github.com/python/cpython/pull/20293

___
Python tracker 

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



[issue40714] Remove compile warning from _zoneinfo.c

2020-05-21 Thread miss-islington


miss-islington  added the comment:


New changeset c817a1c4de1ff1f475776fd1fe8fe158695e53a5 by Miss Islington (bot) 
in branch '3.9':
[3.9] bpo-40714: Remove compile warning from _zoneinfo.c (GH-20291) (GH-20293)
https://github.com/python/cpython/commit/c817a1c4de1ff1f475776fd1fe8fe158695e53a5


--

___
Python tracker 

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



[issue40714] Remove compile warning from _zoneinfo.c

2020-05-21 Thread Dong-hee Na


Change by Dong-hee Na :


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



[issue40716] Pegen: improve error messages for unparenthesized from imports with trailing comma

2020-05-21 Thread Batuhan Taskaya

New submission from Batuhan Taskaya :

$ python
Python 3.10.0a0 (heads/bpo-x:f2947e354c, May 21 2020, 18:54:57) 
[GCC 9.2.1 20191008] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from x import y,
  File "", line 1
from x import y,
^
SyntaxError: invalid syntax
>>> 
(.venv) (Python 3.10.0a0) [  8:44ÖS ]  [ 
isidentical@x200:~/cpython/cpython(bpo-x✗) ]
 $ python -X oldparser
Python 3.10.0a0 (heads/bpo-x:f2947e354c, May 21 2020, 18:54:57) 
[GCC 9.2.1 20191008] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from x import y,
  File "", line 1
SyntaxError: trailing comma not allowed without surrounding parentheses

--
messages: 369530
nosy: BTaskaya
priority: normal
severity: normal
status: open
title: Pegen: improve error messages for unparenthesized from imports with 
trailing comma

___
Python tracker 

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



[issue40715] Pegen: dict unpacking inside dict comprehension

2020-05-21 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
nosy: +gvanrossum, lys.nikolaou, pablogsal

___
Python tracker 

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



[issue40176] unterminated string literal tokenization error messages could be better

2020-05-21 Thread Batuhan Taskaya


Change by Batuhan Taskaya :


--
pull_requests: +19569
pull_request: https://github.com/python/cpython/pull/20294

___
Python tracker 

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



[issue40716] Pegen: improve error messages for unparenthesized from imports with trailing comma

2020-05-21 Thread Batuhan Taskaya


Change by Batuhan Taskaya :


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

___
Python tracker 

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



[issue40176] unterminated string literal tokenization error messages could be better

2020-05-21 Thread Batuhan Taskaya


Change by Batuhan Taskaya :


--
pull_requests:  -19569

___
Python tracker 

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



[issue40717] pl.python.org has expired cert and links to nonexistent django.pl page

2020-05-21 Thread Hanno Boeck


New submission from Hanno Boeck :

I'm not sure if this is a good place to report this, but I haven't found a 
separate bug tracker or feedback contact for the webpages.

https://pl.python.org/
has an expired certificate and it contains a prominent link to django.pl, which 
itself returns a DNS SERVFAIL error.

--
assignee: docs@python
components: Documentation
messages: 369531
nosy: docs@python, hanno
priority: normal
severity: normal
status: open
title: pl.python.org has expired cert and links to nonexistent django.pl page

___
Python tracker 

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



[issue40334] PEP 617: new PEG-based parser

2020-05-21 Thread Batuhan Taskaya


Change by Batuhan Taskaya :


--
pull_requests: +19571
pull_request: https://github.com/python/cpython/pull/20296

___
Python tracker 

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



[issue40217] The garbage collector doesn't take in account that objects of heap allocated types hold a strong reference to their type

2020-05-21 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Actually, I have been thinking about this more and I cannot really trace how 
the bug could happen. We control the type allocation, but Py_tp_alloc controls 
the instance allocation and that can be anything, the current patch should not 
interfere with that.

Petr, do you have a reproducer? I tried to create a reproducer of a type that 
overrides Py_tp_alloc but not Py_tp_traverse (therefore it does not implement 
gc support) and I cannot make it crash.

--

___
Python tracker 

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



[issue40718] Support out-of-band pickling for builtin types

2020-05-21 Thread jakirkham


New submission from jakirkham :

It would be nice (where possible) to support out-of-band pickling of builtin 
`bytes`-like types. This would allow binary data from these objects to be 
shipped along separately zero-copy and later reconstructed during unpickling.

It seems that `bytes`, `bytearray`, and `array` would be good candidates for 
this behavior. Not sure if `mmap` or `memoryview` would make sense as it might 
not be clear on how to reconstruct them during unpickling, but if someone sees 
a way those would be nice to support too.

To illustrate this a bit, here is the behavior with a `bytes` object today:

```
In [1]: import pickle

In [2]: b = b"abc"

In [3]: l = []

In [4]: p = pickle.dumps(b, protocol=5, buffer_callback=l.append)

In [5]: l
Out[5]: []
```

With this change, we would see this behavior instead:

```
In [1]: import pickle

In [2]: b = b"abc"

In [3]: l = []

In [4]: p = pickle.dumps(b, protocol=5, buffer_callback=l.append)

In [5]: l
Out[5]: []
```

(This is my first Python bug submission. So apologies if I got turned around 
here. Please go easy on me :)

--
messages: 369533
nosy: jakirkham
priority: normal
severity: normal
status: open
title: Support out-of-band pickling for builtin types
type: performance
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



[issue40713] _zoneinfo.c can use dst_offset without initialization in parse_tz_str()

2020-05-21 Thread Paul Ganssle


Paul Ganssle  added the comment:

This is a duplicate of bpo-40714. It's a bit of an overzealous compiler warning 
(as far as I can tell it's not true that the uninitialized value would ever be 
used), but we fixed it anyway in GH-20291.

Thanks for the report!

--
nosy: +p-ganssle
resolution:  -> duplicate
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



[issue40717] pl.python.org has expired cert and links to nonexistent django.pl page

2020-05-21 Thread Ama Aje My Fren


Ama Aje My Fren  added the comment:

Hello,

I am not absolutely sure but I suspect this should be directed to the
infrastructure team. There is an infrastructure email list. I am hoping one
can write to them without being a member of the group as I have done.

Thanks

On Thu, May 21, 2020 at 9:20 PM Hanno Boeck  wrote:

>
> New submission from Hanno Boeck :
>
> I'm not sure if this is a good place to report this, but I haven't found a
> separate bug tracker or feedback contact for the webpages.
>
> https://pl.python.org/
> has an expired certificate and it contains a prominent link to django.pl,
> which itself returns a DNS SERVFAIL error.
>
> --
> assignee: docs@python
> components: Documentation
> messages: 369531
> nosy: docs@python, hanno
> priority: normal
> severity: normal
> status: open
> title: pl.python.org has expired cert and links to nonexistent django.pl
> page
>
> ___
> Python tracker 
> 
> ___
> ___
> docs mailing list -- d...@python.org
> To unsubscribe send an email to docs-le...@python.org
> https://mail.python.org/mailman3/lists/docs.python.org/
> Member address: amaajemyf...@gmail.com
>

--
nosy: +amaajemyfren

___
Python tracker 

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



[issue40334] PEP 617: new PEG-based parser

2020-05-21 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset f50516e6a978ee694232512399dd1ab47aaebab1 by Batuhan Taskaya in 
branch 'master':
bpo-40334: Correctly generate C parser when assigned var is None (GH-20296)
https://github.com/python/cpython/commit/f50516e6a978ee694232512399dd1ab47aaebab1


--

___
Python tracker 

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



[issue40717] pl.python.org has expired cert and links to nonexistent django.pl page

2020-05-21 Thread Ernest W. Durbin III

Ernest W. Durbin III  added the comment:

pl.python.org is a delegated domain.

I’ve contacted them repeatedly as we monitor *.python.org public CT records
for expiring certificates with no response.

-Ernest

On May 21, 2020 at 4:23:16 PM, Ama Aje My Fren (amaajemyf...@gmail.com)
wrote:

Hello,

I am not absolutely sure but I suspect this should be directed to the
infrastructure team. There is an infrastructure email list. I am hoping one
can write to them without being a member of the group as I have done.

Thanks

On Thu, May 21, 2020 at 9:20 PM Hanno Boeck  wrote:

>
> New submission from Hanno Boeck :
>
> I'm not sure if this is a good place to report this, but I haven't found a
> separate bug tracker or feedback contact for the webpages.
>
> https://pl.python.org/
> has an expired certificate and it contains a prominent link to django.pl,
> which itself returns a DNS SERVFAIL error.
>
> --
> assignee: docs@python
> components: Documentation
> messages: 369531
> nosy: docs@python, hanno
> priority: normal
> severity: normal
> status: open
> title: pl.python.org has expired cert and links to nonexistent django.pl
> page
>
> ___
> Python tracker 
> 
> ___
> ___
> docs mailing list -- d...@python.org
> To unsubscribe send an email to docs-le...@python.org
> https://mail.python.org/mailman3/lists/docs.python.org/
> Member address: amaajemyf...@gmail.com
>

Infrastructure mailing list
infrastruct...@python.org
https://mail.python.org/mailman/listinfo/infrastructure
Unsubscribe:
https://mail.python.org/mailman/options/infrastructure/ewdurbin%40gmail.com

--
nosy: +EWDurbin

___
Python tracker 

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



[issue40717] pl.python.org has expired cert and links to nonexistent django.pl page

2020-05-21 Thread Ernest W. Durbin III

Ernest W. Durbin III  added the comment:

Correction, pl.python.org is just a single record.

-Ernest

On May 21, 2020 at 4:26:48 PM, Ernest W. Durbin III (ewdur...@gmail.com)
wrote:

pl.python.org is a delegated domain.

I’ve contacted them repeatedly as we monitor *.python.org public CT records
for expiring certificates with no response.

-Ernest

On May 21, 2020 at 4:23:16 PM, Ama Aje My Fren (amaajemyf...@gmail.com)
wrote:

Hello,

I am not absolutely sure but I suspect this should be directed to the
infrastructure team. There is an infrastructure email list. I am hoping one
can write to them without being a member of the group as I have done.

Thanks

On Thu, May 21, 2020 at 9:20 PM Hanno Boeck  wrote:

>
> New submission from Hanno Boeck :
>
> I'm not sure if this is a good place to report this, but I haven't found a
> separate bug tracker or feedback contact for the webpages.
>
> https://pl.python.org/
> has an expired certificate and it contains a prominent link to django.pl,
> which itself returns a DNS SERVFAIL error.
>
> --
> assignee: docs@python
> components: Documentation
> messages: 369531
> nosy: docs@python, hanno
> priority: normal
> severity: normal
> status: open
> title: pl.python.org has expired cert and links to nonexistent django.pl
> page
>
> ___
> Python tracker 
> 
> ___
> ___
> docs mailing list -- d...@python.org
> To unsubscribe send an email to docs-le...@python.org
> https://mail.python.org/mailman3/lists/docs.python.org/
> Member address: amaajemyf...@gmail.com
>

Infrastructure mailing list
infrastruct...@python.org
https://mail.python.org/mailman/listinfo/infrastructure
Unsubscribe:
https://mail.python.org/mailman/options/infrastructure/ewdurbin%40gmail.com

--

___
Python tracker 

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



[issue40717] pl.python.org has expired cert and links to nonexistent django.pl page

2020-05-21 Thread Ernest W. Durbin III

Ernest W. Durbin III  added the comment:

Apologies, the correction was… incorrect.

pl.python.org is delegated in its entirety.

I’ve contacted the admins and given them final notice to renew the
certificate. This is a recurring issue that is seen in our CT log
monitoring. If it continues they risk their subdomain delegation.

-Ernest

On May 21, 2020 at 4:27:20 PM, Ernest W. Durbin III (ewdur...@gmail.com)
wrote:

Correction, pl.python.org is just a single record.

-Ernest

On May 21, 2020 at 4:26:48 PM, Ernest W. Durbin III (ewdur...@gmail.com)
wrote:

pl.python.org is a delegated domain.

I’ve contacted them repeatedly as we monitor *.python.org public CT records
for expiring certificates with no response.

-Ernest

On May 21, 2020 at 4:23:16 PM, Ama Aje My Fren (amaajemyf...@gmail.com)
wrote:

Hello,

I am not absolutely sure but I suspect this should be directed to the
infrastructure team. There is an infrastructure email list. I am hoping one
can write to them without being a member of the group as I have done.

Thanks

On Thu, May 21, 2020 at 9:20 PM Hanno Boeck  wrote:

>
> New submission from Hanno Boeck :
>
> I'm not sure if this is a good place to report this, but I haven't found a
> separate bug tracker or feedback contact for the webpages.
>
> https://pl.python.org/
> has an expired certificate and it contains a prominent link to django.pl,
> which itself returns a DNS SERVFAIL error.
>
> --
> assignee: docs@python
> components: Documentation
> messages: 369531
> nosy: docs@python, hanno
> priority: normal
> severity: normal
> status: open
> title: pl.python.org has expired cert and links to nonexistent django.pl
> page
>
> ___
> Python tracker 
> 
> ___
> ___
> docs mailing list -- d...@python.org
> To unsubscribe send an email to docs-le...@python.org
> https://mail.python.org/mailman3/lists/docs.python.org/
> Member address: amaajemyf...@gmail.com
>

Infrastructure mailing list
infrastruct...@python.org
https://mail.python.org/mailman/listinfo/infrastructure
Unsubscribe:
https://mail.python.org/mailman/options/infrastructure/ewdurbin%40gmail.com

--

___
Python tracker 

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



[issue40716] Pegen: improve error messages for unparenthesized from imports with trailing comma

2020-05-21 Thread Lysandros Nikolaou


Change by Lysandros Nikolaou :


--
nosy: +gvanrossum, lys.nikolaou, pablogsal

___
Python tracker 

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



[issue40719] Add pt-br to the language switcher at the Python 3.6 and 2.7 docs website

2020-05-21 Thread Rafael Fontenelle


New submission from Rafael Fontenelle :

Thanks to bpo-38592, pt-br is listed in 3.8 and 3.7 versions.  Now, pt-br 
team's repository has 3.6 and 2.7 branches daily pomerged from 3.8 branch.  So, 
I believe it would nice to have it in those older versions' language switcher.

--
assignee: docs@python
components: Documentation
messages: 369540
nosy: docs@python, rffontenelle
priority: normal
severity: normal
status: open
title: Add pt-br to the language switcher at the Python 3.6 and 2.7 docs website
type: enhancement
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



[issue40176] unterminated string literal tokenization error messages could be better

2020-05-21 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 72e0aa2fd2b9c6da2caa5a9ef54f6495fc2890b0 by Batuhan Taskaya in 
branch 'master':
bpo-40176: Improve error messages for trailing comma on from import (GH-20294)
https://github.com/python/cpython/commit/72e0aa2fd2b9c6da2caa5a9ef54f6495fc2890b0


--
nosy: +pablogsal

___
Python tracker 

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



[issue40719] Add pt-br to the language switcher at the Python 3.6 and 2.7 docs website

2020-05-21 Thread Rafael Fontenelle


Change by Rafael Fontenelle :


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

___
Python tracker 

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



[issue40176] unterminated string literal tokenization error messages could be better

2020-05-21 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
pull_requests: +19573
pull_request: https://github.com/python/cpython/pull/20302

___
Python tracker 

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



[issue40716] Pegen: improve error messages for unparenthesized from imports with trailing comma

2020-05-21 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
pull_requests: +19575
pull_request: https://github.com/python/cpython/pull/20302

___
Python tracker 

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



[issue40176] unterminated string literal tokenization error messages could be better

2020-05-21 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
pull_requests:  -19573

___
Python tracker 

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



[issue40176] unterminated string literal tokenization error messages could be better

2020-05-21 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
pull_requests: +19576
pull_request: https://github.com/python/cpython/pull/20302

___
Python tracker 

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



[issue40176] unterminated string literal tokenization error messages could be better

2020-05-21 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 275d7e1080d0007a82965d1ac510abb0ae8d7821 by Pablo Galindo in 
branch '3.9':
[3.9] bpo-40176: Improve error messages for trailing comma on from import 
(GH-20294) (GH-20302)
https://github.com/python/cpython/commit/275d7e1080d0007a82965d1ac510abb0ae8d7821


--

___
Python tracker 

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



[issue40176] unterminated string literal tokenization error messages could be better

2020-05-21 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
pull_requests:  -19576

___
Python tracker 

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



[issue40720] accessing mmap of file that is overwritten causes bus error

2020-05-21 Thread Marten H. van Kerkwijk


New submission from Marten H. van Kerkwijk :

While debugging a strange failure with tests and np.memmap, I realized that the 
following direct use of mmap reliably leads to a bus error. Here, obviously 
mmap'ing a file, closing it, opening the file for writing but not writing 
anything, and then again accessing the mmap is not something one should do (but 
a test case did it anyway), but it would nevertheless be nice to avoid a crash!
```
import mmap


with open('test.dat', 'wb') as fh:
fh.write(b'abcdefghijklmnopqrstuvwxyz')


with open('test.dat', 'rb') as fh:
mm = mmap.mmap(fh.fileno(), 0, access=mmap.ACCESS_READ)


with open('test.dat', 'wb') as fh:
pass  # Note: if something is written, then I get no bus error.


mm[2]
```

--
components: Library (Lib)
messages: 369543
nosy: mhvk
priority: normal
severity: normal
status: open
title: accessing mmap of file that is overwritten causes bus error
type: crash
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



[issue40721] PEP0435 (enums) -- there is no standard on enum item letters case

2020-05-21 Thread Марк Коренберг

New submission from Марк Коренберг :

Example from PEP0435:

(https://www.python.org/dev/peps/pep-0435)

>>> from enum import Enum
>>> class Color(Enum):
... red = 1
... green = 2
... blue = 3

Example from Python documentation:

(https://docs.python.org/3/library/enum.html)

>>> from enum import Enum
>>> class Color(Enum):
... RED = 1
... GREEN = 2
... BLUE = 3
...

So, what are the rules for naming enum members?
CamelCase ? snake_case ? ALL_CAPS ?

Someone should explain how should we format sources. So various linters may 
check for that.

--
assignee: docs@python
components: Documentation
messages: 369544
nosy: docs@python, socketpair
priority: normal
severity: normal
status: open
title: PEP0435 (enums) -- there is no standard on enum item letters case
versions: Python 3.10, 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



[issue40721] PEP0435 (enums) -- there is no standard on enum item letters case

2020-05-21 Thread Марк Коренберг

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

FYI: PEP8 does not mention enums.

--

___
Python tracker 

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



[issue40721] PEP0435 (enums) -- there is no standard on enum item letters case

2020-05-21 Thread Rémi Lapeyre

Rémi Lapeyre  added the comment:

There is no official way, you can find both in the Python tree: all caps at 
https://github.com/python/cpython/blob/master/Lib/ast.py#L615-L636 and snake 
case at https://github.com/python/cpython/blob/master/Lib/uuid.py#L76-L79.

I think it's common to use all caps for those that are used as flags (i.e. 
where each value is a power of 2 and that may be combined using bigs 
operations) but there is no one true way that you can enforced, it depends on 
the context. 

Also, note that pep8 covers the code of Python, it's not a rule that must be 
blindly applied to all Python code and that you may ignore it for various 
reasons: 
https://www.python.org/dev/peps/pep-0008/#a-foolish-consistency-is-the-hobgoblin-of-little-minds.

--
nosy: +remi.lapeyre

___
Python tracker 

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



[issue40690] unittest: if FunctionTestCase is imported, the loader loads "tests" from it

2020-05-21 Thread Vitalii


Vitalii  added the comment:

If you make an import in a module with your tests

>From unittest import FunctionTestCase

then you will have 1 extra test in that module (the imported one), moreover, 
that test will be broken.

--

___
Python tracker 

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



[issue40715] Pegen: dict unpacking inside dict comprehension

2020-05-21 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 4.0 -> 5.0
pull_requests: +19577
pull_request: https://github.com/python/cpython/pull/20303

___
Python tracker 

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



[issue40715] Pegen: dict unpacking inside dict comprehension

2020-05-21 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset b8a65ec1d3d4660d0ee38a9765d98f5cdcabdef5 by Batuhan Taskaya in 
branch 'master':
bpo-40715: Reject dict unpacking on dict comprehensions (GH-20292)
https://github.com/python/cpython/commit/b8a65ec1d3d4660d0ee38a9765d98f5cdcabdef5


--

___
Python tracker 

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



[issue40716] Pegen: improve error messages for unparenthesized from imports with trailing comma

2020-05-21 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



[issue40715] Pegen: dict unpacking inside dict comprehension

2020-05-21 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



[issue40722] test_ttk_guionly times out on Ubuntu CI

2020-05-21 Thread Dennis Sweeney


New submission from Dennis Sweeney :

One of the tests (test_ttk_guionly.test_variable_change) on the Ubuntu CI is 
intermittently hanging on this code:


https://github.com/python/cpython/blob/e42b705188271da108de42b55d9344642170aa2b/Lib/tkinter/test/test_ttk/test_extensions.py#L147

def test_variable_change(self):
x = ttk.LabeledScale(self.root)
x.pack()
x.wait_visibility()
^^^

The failure at https://github.com/python/cpython/runs/697113653 gave the logs:

0:28:29 load avg: 0.00 [425/425/1] test_ttk_guionly crashed (Exit code 1)
Timeout (0:20:00)!
Thread 0x7fa268d0c080 (most recent call first):
File "/home/runner/work/cpython/cpython/Lib/tkinter/__init__.py", line 697 
in wait_visibility
File 
"/home/runner/work/cpython/cpython/Lib/tkinter/test/test_ttk/test_extensions.py",
 line 147 in test_variable_change
...

The same did not happen when I re-ran the CI checks. I thought I remembered a 
similar issue in the past, but I couldn't find an bpo issue about it.

--
components: Tkinter
messages: 369549
nosy: Dennis Sweeney
priority: normal
severity: normal
status: open
title: test_ttk_guionly times out on Ubuntu CI
type: behavior
versions: Python 3.10, Python 3.9

___
Python tracker 

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



[issue40715] Pegen: dict unpacking inside dict comprehension

2020-05-21 Thread miss-islington


miss-islington  added the comment:


New changeset d00aaf306aecf2d4bf9c9aebc9bc35ed03b1a7d0 by Miss Islington (bot) 
in branch '3.9':
bpo-40715: Reject dict unpacking on dict comprehensions (GH-20292)
https://github.com/python/cpython/commit/d00aaf306aecf2d4bf9c9aebc9bc35ed03b1a7d0


--

___
Python tracker 

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



[issue40710] Malfunctioning of '\r' (ii)

2020-05-21 Thread Ezio Melotti


Ezio Melotti  added the comment:

Correct.  This is a Windows issue, not a Python one.

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

___
Python tracker 

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



[issue40711] Clearing the screen of IDLE interactive mode in Windows

2020-05-21 Thread Ezio Melotti


Ezio Melotti  added the comment:

The cls command only works when Python is executed within a Windows terminal.  
In other contexts (such as IDLE), the command doesn't work.

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



[issue40334] PEP 617: new PEG-based parser

2020-05-21 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 10.0 -> 11.0
pull_requests: +19578
pull_request: https://github.com/python/cpython/pull/20307

___
Python tracker 

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



[issue40334] PEP 617: new PEG-based parser

2020-05-21 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset ae145833025b0156ee2a28219e3370f3b27b2a36 by Lysandros Nikolaou in 
branch 'master':
bpo-40334: Produce better error messages for non-parenthesized genexps 
(GH-20153)
https://github.com/python/cpython/commit/ae145833025b0156ee2a28219e3370f3b27b2a36


--

___
Python tracker 

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



[issue40334] PEP 617: new PEG-based parser

2020-05-21 Thread miss-islington


miss-islington  added the comment:


New changeset 55c89235247d9dbe8a4463c9c64edc7e48826a44 by Miss Islington (bot) 
in branch '3.9':
bpo-40334: Produce better error messages for non-parenthesized genexps 
(GH-20153)
https://github.com/python/cpython/commit/55c89235247d9dbe8a4463c9c64edc7e48826a44


--

___
Python tracker 

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



[issue40723] IDLE: make autocomplete test run without __main__.__file__

2020-05-21 Thread Terry J. Reedy


New submission from Terry J. Reedy :

import test.test_idle as ti
import unittest as u
u.main(ti)

has one failure:
Traceback (most recent call last):
  File "C:\Programs\Python39\lib\idlelib\idle_test\test_autocomplete.py", line 
230, in test_fetch_completions
if __main__.__file__ != ac.__file__:
AttributeError: module '__main__' has no attribute '__file__'

ac = autocomplete. The condition is followed by 
self.assertNotIn('AutoComplete', small)  # See issue 36405

which is false when ac is run as main to run the test.  Adding 
"hasattr(__main__, '__file__') and " to the beginning of the condition should 
be sufficient.  I should add a note to #36405 explaining this conditional 
assertion better.

--
assignee: terry.reedy
components: IDLE
messages: 369555
nosy: terry.reedy
priority: normal
severity: normal
stage: needs patch
status: open
title: IDLE: make autocomplete test run without __main__.__file__
type: behavior
versions: Python 3.10, 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



[issue40723] IDLE: make autocomplete test run without __main__.__file__

2020-05-21 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

This is currently the only occurrence of __main__.__file__ in idlelib.

--

___
Python tracker 

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



[issue40696] Exception handling with "await" can hang in Python3.9.0b1

2020-05-21 Thread Chris Jerdonek


Chris Jerdonek  added the comment:

Mariusz, someone may also want to review Django's code there. Raising an 
exception that would otherwise create a cycle in the chain could be obscuring 
another issue, or there could be more straightforward alternatives. (The Python 
issue will still be fixed of course.)

--

___
Python tracker 

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



[issue40685] IDLE: Document info needed for 'not working' reports.

2020-05-21 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

'Not working' reports lacking information needed to respond, whether to help 
the reporter of fix a bug, are a common beginner mistake.  The problem is 
especially acute for IDLE since it is especially targeted at beginners, who may 
not know the difference between generic python problems and specific IDLE (or 
tkinter) problems (or even user code bugs).  And beginners may not understand 
'try running python (or IDLE) in a command line (or terminal or console)'.  And 
beginning programmers who have never shared software with other may have no 
idea what (relatively) large volume of information the authors may to proceed. 
So I am making this issue about adding information to the IDLE doc about things 
a user should try and information to include when reporting.

--
stage:  -> needs patch
status: pending -> open
title: IDLE not working -> IDLE: Document info needed for 'not working' reports.
versions: +Python 3.10 -Python 3.8

___
Python tracker 

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



[issue40718] Support out-of-band pickling for builtin types

2020-05-21 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +pitrou

___
Python tracker 

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



  1   2   >