[issue40591] \r broken in IDLE

2020-05-11 Thread wyz23x2


New submission from wyz23x2 :

When you run this code:

import time
for i in range(10):
print(f"\r{i}", end='', flush=True)
time.sleep(1)
print('\n')

On CMD it prints 0 at the first time, then it will erase it and print the 
increased i. But on IDLE it just prints "0123456789" -- that isn't right.

--
assignee: terry.reedy
components: IDLE
messages: 368616
nosy: terry.reedy, wyz23x2
priority: normal
severity: normal
status: open
title: \r broken in IDLE
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



[issue29587] Generator/coroutine 'throw' discards exc_info state, which is bad

2020-05-11 Thread Chris Jerdonek


Chris Jerdonek  added the comment:

Would someone be able to approve / take a look at this small PR addressing 
another aspect of this issue?
https://github.com/python/cpython/pull/19858
I'm hoping it can be part of 3.9, and the deadline is just a week away.

It builds on the already merged PR to address an "Example 3" of this issue (the 
"yield from" case as opposed to the "yield" case, which the merged PR 
addressed):

Example 3:

def f():
yield

def g():
try:
raise KeyError('a')
except Exception:
yield from f()

gen = g()
gen.send(None)
gen.throw(ValueError)

--
Output without PR:

Traceback (most recent call last):
  File "/.../test-example3.py", line 12, in 
gen.throw(ValueError)
  File "/.../test-example3.py", line 8, in g
yield from f()
  File "/.../test-example3.py", line 2, in f
yield
ValueError

--
Output with PR:

Traceback (most recent call last):
  File "/.../test-example3.py", line 6, in g
raise KeyError('a')
KeyError: 'a'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/.../test-example3.py", line 12, in 
gen.throw(ValueError)
  File "/.../test-example3.py", line 8, in g
yield from f()
  File "/.../test-example3.py", line 2, in f
yield
ValueError

--

___
Python tracker 

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



[issue40257] Improve the use of __doc__ in pydoc

2020-05-11 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

help(1) as well as help(int) output the help for int. The only difference is 
that the former has the first line "Help on int object:", and the latter -- 
"Help on class int in module builtins:".

If IPython wants to output the help on the instance, it should change the 
implementation of `?` and `??`. It would be better if it correctly attribute 
the source of the docstring: the object itself, its class or its superclass. It 
was difficult to distinguish these cases before, now it is easier.

By the way, I just tried IPython 5.5.0 with Python 3.6.9, and it does not 
output the docstring either:

In [1]: a = 1

In [2]: a??
Type:int
String form: 1

--

___
Python tracker 

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



[issue40503] PEP 615: Add zoneinfo module

2020-05-11 Thread Thomas Wouters


Thomas Wouters  added the comment:

The normal way to do this (for make/autoconf) is to add a --with-tzpath 
argument to configure.ac, and a make variable to pass it to the compilation of 
anything that needs it. You can then access it from Python code with 
sysconfig.get_config_var().

In configure.ac, AC_SUBST(TZPATH) makes configure replace @TZPATH@ in the 
Makefile with the value you set to $TZPATH in configure.ac.  You then either 
add that to the global PY_CFLAGS_NODIST, or modify the build rule for the 
module that needs it to pass it along. (See for example how 
GITTAG/GITVERSION/GITBRANCH are passed to Modules/getbuildinfo.o.)

AC_ARG_WITH() is how you add a new --with-* argument to configure. The usual 
way people do this is by copying one of the other AC_ARG_WITH blocks and 
modifying it to suit their needs. It's a mixture of m4 and shell that can be a 
bit annoying to get right, but it's pretty flexible. Run autoreconf to 
regenerate configure. You can manually check that the shell in configure makes 
sense.

Something will have to be done on the Windows side as well, but I'm not sure 
what. Adding Steve Dower for that.

--
nosy: +steve.dower

___
Python tracker 

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



[issue40592] `Shutil.which` incosistent with windows's `where`

2020-05-11 Thread Dawid Gosławski

New submission from Dawid Gosławski :

Shutil's which implementation does not work correctly when someone set's empty 
item in `PATHEXT` environment variable. Example:

set PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.RB;.RBW;

I'm not 100% sure how I got this in my PATHEXT config, I wasn't changing that 
so maybe some bugged uninstaller not removed it's extension correctly.

This makes things confusing as Windows will find correctly binary, but Python 
will return nothing, due to this part:

```
if any(cmd.lower().endswith(ext.lower()) for ext in pathext):
files = [cmd]
```

pathext is initialized as `pathext = os.environ.get("PATHEXT", 
"").split(os.pathsep)`, which ends producing '' as last element

Because any string ends with empty string (''), files list will have plain 
version added like `git`, which will then fail executable check.

Workaround is to use full name `git.exe`

Filtering out empty strings would fix that.

--
components: Library (Lib)
messages: 368620
nosy: alkuzad
priority: normal
severity: normal
status: open
title: `Shutil.which` incosistent with windows's `where`

___
Python tracker 

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



[issue40584] PyType_FromModuleAndSpec function should add the process of tp_vectorcall_offset

2020-05-11 Thread Petr Viktorin


Petr Viktorin  added the comment:

That seems reasonable. See the discussion around 
https://bugs.python.org/issue38140 for context.

Note that __dictoffset__ and __weaklistoffset__ are also exposed as members (in 
PyMemberDef type_members) and documented (Doc/c-api/structures.rst). A new 
__vectorcalloffset__ should have that as well.

--

___
Python tracker 

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



[issue40592] `Shutil.which` incosistent with windows's `where`

2020-05-11 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
components: +Windows
nosy: +paul.moore, steve.dower, tim.golden, zach.ware

___
Python tracker 

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



[issue40593] Improve error reporting for invalid character in source code

2020-05-11 Thread Serhiy Storchaka

New submission from Serhiy Storchaka :

Currently you get SyntaxError with message "invalid character in identifier" in 
two cases:

1. The source code contains some non-ASCII non-identifier character. Usually it 
happens when you copy code from internet page or PDF file which was "improved" 
by some enhachaizer which replaces spaces with non-breacking  spaces, ASCII 
minus with a dash or Unicode minus, ASCII quotes with fancy Unicode quotes. 
They do not look like a part of identifier at all. The error message also does 
not say what character is invalid, and it is hard to find the culprit because 
they look too similar to correct characters (especially with some monospace 
fonts).

See 
https://mail.python.org/archives/list/python-id...@python.org/thread/ILMNJ46EAL4ENYK7LLDLGIMYQKZAMMWU/
 for discussion.

2. Other case is very special -- when the source code contains the declaration 
for the utf-8 encoding followed by non-UTF-8 bytes sequences. It is rarely 
happen in real world.

The proposed PR improves errors for these cases.

>>> print(123—45)
  File "", line 1
print(123—45)
 ^
SyntaxError: invalid character '—' (U+2014)

* The error message no longer contains misleading "in identifier".

* The error message contains the invalid character, literal and its hexcode.

* The caret points on the invalid character. Previously it pointed on the last 
non-ascii or non-alphabetical character followed the invalid character (5 in 
the above example).

* For the special case of non-decodable UTF-8 sequence the syntax error message 
is more informative: "(unicode error) 'utf-8' codec can't decode byte 0xff 
...". Although this case needs further improvements.

--
components: Interpreter Core
messages: 368622
nosy: serhiy.storchaka
priority: normal
severity: normal
status: open
title: Improve error reporting for invalid character in source code
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



[issue40593] Improve error reporting for invalid character in source code

2020-05-11 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue40594] urljoin since 3.5 incorrectly filters out double slashes

2020-05-11 Thread David Bell


New submission from David Bell :

In Python 3.5 the urljoin function was rewritten to be RFC 3986 compliant and 
fix long standing issues. In the initial rewrite duplicate slashes were added 
by accident, and so code was added to prevent that. The discussion is here: 
https://bugs.python.org/issue22118

The code within urljoin is this:

# filter out elements that would cause redundant slashes on re-joining
# the resolved_path
segments[1:-1] = filter(None, segments[1:-1])

This seems sensible, you would not want double slashes in a URL, right? The 
problem is: double slashes are perfectly legal in a URI/URL, and for reasons I 
don't understand, they are in use in the wild. The code above was written to 
remove them because urljoin accidentally introduced them, the problem is that 
it also removes intentional double slashes:

>>> urljoin("http://www.example.com/";, "this//double/path")
'http://www.example.com/this/double/path'

Where as the expected result should be:

'http://www.example.com/this//double/path'

I suggest that the fix for this is to remove the aforementioned filter code, 
e.g. remove this:

# filter out elements that would cause redundant slashes on re-joining
# the resolved_path
segments[1:-1] = filter(None, segments[1:-1])

...and remove this code too:

if base_parts[-1] != '':
# the last item is not a directory, so will not be taken into account
# in resolving the relative path
del base_parts[-1]

and instead simply add:

del base_parts[-1]

...because the last part of the split base URL should always be deleted. If the 
last element of the list (the base URL split) is an empty string, then the URL 
ended with a slash, and so we should remove the last element otherwise a double 
slash will occur when we combine it with the second parameter to urljoin. If 
the last element is not an empty string then the last part of the URL was not a 
directory, and should be removed. Thus the last element should always be 
removed. 

By following this logic the "remove all double slashes" filter is not 
necessary, because the cause of the accidental addition of double slashes is 
removed.

--
components: Library (Lib)
messages: 368623
nosy: David Bell
priority: normal
severity: normal
status: open
title: urljoin since 3.5 incorrectly filters out double slashes
type: behavior
versions: 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



[issue40546] Inconsistencies between PEG parser and traceback SyntaxErrors

2020-05-11 Thread Lysandros Nikolaou


Lysandros Nikolaou  added the comment:

Guido:
> I wonder if this is the fix we're looking for?

I think this is the most sensible thing to do, yes. I guess, we also have to 
change both parsers to match this behaviour, right?

--

___
Python tracker 

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



[issue40546] Inconsistencies between PEG parser and traceback SyntaxErrors

2020-05-11 Thread Guido van Rossum


Guido van Rossum  added the comment:

I would carefully think about the meaning of that line and see if there are 
other permutations, e.g. min(Len(blah), offset - 1) ?

It would,be nice to specify what we need here from both parsers and from both 
code chunks for error printing.

--

___
Python tracker 

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



[issue40477] Launcher on Catalina

2020-05-11 Thread Glenn Travis


Glenn Travis  added the comment:

I tried to report this concern under Documentation, but got shot down as 
duplicate.

I have the same results. I tried to make Launcher the default "Open With" 
application for a script, also tried dragging (and Option dragging) the script 
to the Launcher, neither worked. 

I have received several results:
1. Nothing happens
2. Preference window opens
3. Launcher window with a run button opens; the run button does nothing.

--
nosy: +TotallyLost

___
Python tracker 

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



[issue40495] compileall: option to hardlink duplicate optimization levels bytecode cache files

2020-05-11 Thread STINNER Victor

STINNER Victor  added the comment:

Is it possible that the PYC file of optimization level 0 content is modified if 
the PY file content changed, with would make PYC files or optimization level 1 
and 2 inconsistent?

Christian Heimes:
> Python's import system is fully compatible with this approach. importlib 
> never directly writes to a .pyc file. Instead it always creates a new 
> temporary file next to the .pyc file and then overrides the .pyc file with an 
> atomic file system operation. See _write_atomic() in 
> Lib/importlib/_bootstrap_external.py.

It seems like importlib doesn't have the issue because it doesn't open PYC file 
to write its content, but _write_atomic() creates a *new* file and then call 
os.replace() to rename the temporary file to the PYC final name.

Alright, I think that I understood :-)

--

PYC file became more complicated with PEP 552. Here are my own notes to try to 
understand how it's supposed to be used.


Python 3.9 now has _imp.check_hash_based_pycs string which can be overriden by 
--check-hash-based-pycs command line option. It can have 3 values:
* "always"
* "never"
* "default"

These values are defined by the PEP 552:

* "never" causes the interpreter to always assume hash-based pycs are valid
* "default" means the check_source flag in hash-based pycs determines 
invalidation
* "always" causes the interpreter to hash the source file for invalidation 
regardless of value of check_source bit

When a PYC file is created, it has a "check_source" bit:

* Bit set: If the check_source flag is set, Python will determine the validity 
of the pyc by hashing the source file and comparing the hash with the expected 
hash in the pyc. If the pyc needs to be regenerated, it will be regenerated as 
a hash-based pyc again with the check_source flag set.
* Bit unset, Python will simply load the pyc without checking the hash of the 
source file. The expectation in this case is that some external system (e.g., 
the local Linux distribution’s package manager) is responsible for keeping pycs 
up to date, so Python itself doesn’t have to check.

I mostly copied/pasted the PEP 552 :-)

py_compile and compileall have a new invalidation_mode which can have 3 values:

class PycInvalidationMode(Enum):
TIMESTAMP
CHECKED_HASH
UNCHECKED_HASH

The default is compiled in py_compile by:

def _get_default_invalidation_mode():
if os.environ.get('SOURCE_DATE_EPOCH'):
return PycInvalidationMode.CHECKED_HASH
else:
return PycInvalidationMode.TIMESTAMP

importlib: SourceLoader.get_code(filename) uses:

flags = _classify_pyc(data, fullname, exc_details)
bytes_data = memoryview(data)[16:]
hash_based = flags & 0b1 != 0
if hash_based:
check_source = flags & 0b10 != 0
if (_imp.check_hash_based_pycs != 'never' and
(check_source or
 _imp.check_hash_based_pycs == 'always')):
source_bytes = self.get_data(source_path)
source_hash = _imp.source_hash(
_RAW_MAGIC_NUMBER,
source_bytes,
)
_validate_hash_pyc(data, source_hash, fullname,
   exc_details)
else:
_validate_timestamp_pyc(
data,
source_mtime,
st['size'],
fullname,
exc_details,
)

--
nosy: +vstinner

___
Python tracker 

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



[issue40495] compileall: option to hardlink duplicate optimization levels bytecode cache files

2020-05-11 Thread STINNER Victor


STINNER Victor  added the comment:

While reviewing PR 19901, I was confused by py_compile and compileall 
documentation which is outdated: it doesn't mention that optimize argument can 
be a list of integers.

https://docs.python.org/dev/library/py_compile.html#py_compile.compile
"optimize controls the optimization level and is passed to the built-in 
compile() function. The default of -1 selects the optimization level of the 
current interpreter."

https://docs.python.org/dev/library/compileall.html#compileall.compile_dir
"optimize specifies the optimization level for the compiler. It is passed to 
the built-in compile() function."

--

___
Python tracker 

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



[issue40495] compileall: option to hardlink duplicate optimization levels bytecode cache files

2020-05-11 Thread Miro Hrončok

Miro Hrončok  added the comment:

> Is it possible that the PYC file of optimization level 0 content is modified 
> if the PY file content changed, with would make PYC files or optimization 
> level 1 and 2 inconsistent? ...

Note that there is a test exactly for this, in case the implementation is 
changed in the future.

--

___
Python tracker 

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



[issue40495] compileall: option to hardlink duplicate optimization levels bytecode cache files

2020-05-11 Thread STINNER Victor


STINNER Victor  added the comment:

Currently, it's possible to implement this optimization using the Unix command 
"hardlink". Example:

hardlink -c -v /usr/lib64/python3.8/__pycache__/*.pyc

On my Fedora 32, this command says:

Directories:   1
Objects: 520
Regular files:   519
Comparisons: 133
Linked:  133
Saved:   2220032

For example, string.cpython-38.pyc and string.cpython-38.opt-1.pyc become hard 
links.

--

___
Python tracker 

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



[issue40495] compileall: option to hardlink duplicate optimization levels bytecode cache files

2020-05-11 Thread STINNER Victor


STINNER Victor  added the comment:

> Currently, it's possible to implement this optimization using the Unix 
> command "hardlink".

PR 19901 avoids the dependency on external "hardlink" command.

In practice, PR 19901 only impacts newly written PYC files, whereas using 
manually the "hardlink" command cannot track which files are not or not. 
"hardlink" command is less practice, PR 19901 avoids modifying PYC files that 
we don't "own".

--

___
Python tracker 

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



[issue40257] Improve the use of __doc__ in pydoc

2020-05-11 Thread Matthias Bussonnier

Matthias Bussonnier  added the comment:

> Can you all please decide which issue to use?

We can stay here, I opened the other issue before figuring out this was the 
cause.

> If IPython wants to output the help on the instance, it should change the 
> implementation of `?` and `??`. It would be better if it correctly attribute 
> the source of the docstring: the object itself, its class or its superclass. 
> It was difficult to distinguish these cases before, now it is easier.

Sure I can do that, but this issue feel like a important semantic change of 
`inspect.getdoc()`, it may be documented but there is no warning or deprecation 
of behavior. It is also likely to affect untested code (documentation 
generation).

If you decide that this change of behavior is the one you want I'll be happy to 
support you – I just want to make sure the impact on the rest of the ecosystem. 
IPython/Jupyter is likely not the only one to rely on inspect.getdoc behavior, 
I'm thinking pycharm, spyder, sphinx will likely be impacted. I can see 
`inspect.getdoc()` in the source of even scipy/numpy and rarely in tests.


I would prefer new functions with clearer behavior and for example returning a 
sequence of tuple (docs, where it comes from) potentially deprecating 
inspect.getdocs() than a change of behavior that remove data where their used 
to be some


>  I just tried IPython 5.5.0

(You may want to update to 5.10, and do you have reason to still be on 5 and 
not 7 ?)

--

___
Python tracker 

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



[issue40584] PyType_FromModuleAndSpec function should add the process of tp_vectorcall_offset

2020-05-11 Thread hai shi


hai shi  added the comment:

> Note that __dictoffset__ and __weaklistoffset__ are also exposed as members 
> (in PyMemberDef type_members) and documented (Doc/c-api/structures.rst). A 
> new __vectorcalloffset__ should have that as well.

Thanks for your comment, petr. And I updated the doc in PR20026.

--

___
Python tracker 

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



[issue40503] PEP 615: Add zoneinfo module

2020-05-11 Thread Paul Ganssle


Change by Paul Ganssle :


--
pull_requests: +19343
pull_request: https://github.com/python/cpython/pull/20034

___
Python tracker 

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



[issue40503] PEP 615: Add zoneinfo module

2020-05-11 Thread Paul Ganssle


Paul Ganssle  added the comment:

Thanks Thomas, that was super helpful. I've created GH-20034 to add in the 
compile-time arguments on POSIX systems at least, do you mind having a look?

For the moment I have made it non-configurable on Windows, but I think the 
right thing to do is to add an argument to PCbuild\build.bat. Hopefully Steve 
can point me in the right direction for mapping that argument (or something 
else) to a new config variable in sysconfig.

--

___
Python tracker 

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



[issue40536] Addition of a "list of available time zones" function to zoneinfo

2020-05-11 Thread Paul Ganssle


Change by Paul Ganssle :


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

___
Python tracker 

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



[issue40536] Addition of a "list of available time zones" function to zoneinfo

2020-05-11 Thread Paul Ganssle


Change by Paul Ganssle :


--
pull_requests:  -19344

___
Python tracker 

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



[issue40595] AttributeError from type annotation

2020-05-11 Thread Taylor Robie


New submission from Taylor Robie :

Consider the following:
```
import re

class MyClass(object):
def re(self):
pass

def foo(self, m: re.Match):
pass
```

Even though `re` and `MyClass.re` are distinct namespaces, the type annotation 
misses that fact (presumably there is an issue with how it is parsing the AST) 
and attempts to access MyClass.re.Match, resulting in:

`AttributeError: 'function' object has no attribute 'Match'`

Commenting out the definition of `MyClass.re` or reversing the definition order 
resolves the issue.

--
components: Interpreter Core
messages: 368635
nosy: robieta
priority: normal
severity: normal
status: open
title: AttributeError from type annotation
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



[issue40591] \r broken in IDLE

2020-05-11 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

This is known, has been discussed on previous issues (can't find numbers now), 
and is not a bug. Your code outputs a stream of 21 characters to 'file' 
sys.stdout, which for code executed by IDLE is, by default, directed to Shell. 
The effect of outputting Ascii control characters to a display device depends 
on the device.  On a hard-copy printing terminal, the source from which \r in 
particular was taken, the effect of your code would be the 10 digits printed on 
top of each other.  In an edit box on a screen, such as this Comment box on 
Firefox, characters are normally just inserted as received.  If I type 0, Left, 
1, Left, , 9, the result is '9876543210'.

The current intended Shell behavior is what you see -- display (or not)  chars 
as received.  Changes have been rejected in the past but I am considering 
adding a 'terminal' mode.

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



[issue40596] str.isidentifier() does not work with non-BMP non-canonicalized strings on Windows

2020-05-11 Thread Serhiy Storchaka


New submission from Serhiy Storchaka :

>>> import _testcapi
>>> u = '\U0001d580\U0001d593\U0001d58e\U0001d588\U0001d594\U0001d589\U0001d58a'
>>> u.isidentifier()
True
>>> _testcapi.unicode_legacy_string(u).isidentifier()
False

--
components: Interpreter Core
messages: 368637
nosy: serhiy.storchaka, vstinner
priority: normal
severity: normal
status: open
title: str.isidentifier() does not work with non-BMP non-canonicalized strings 
on Windows
type: behavior
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



[issue40596] str.isidentifier() does not work with non-BMP non-canonicalized strings on Windows

2020-05-11 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue28577] ipaddress.ip_network(...).hosts() returns nothing for an IPv4 /32

2020-05-11 Thread Pete Wicken


Pete Wicken  added the comment:

The patch for this has been merged - I guess this can be closed now?

--

___
Python tracker 

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



[issue40561] Add docstrings for webbrowser open functions

2020-05-11 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset ef7973a981ff8f4687ef3fdb85a69fa15aa11fe5 by Brad Solomon in 
branch 'master':
bpo-40561: Add docstrings for webbrowser open functions (GH-1)
https://github.com/python/cpython/commit/ef7973a981ff8f4687ef3fdb85a69fa15aa11fe5


--

___
Python tracker 

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



[issue40561] Add docstrings for webbrowser open functions

2020-05-11 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue40561] Add docstrings for webbrowser open functions

2020-05-11 Thread miss-islington


Change by miss-islington :


--
pull_requests: +19347
pull_request: https://github.com/python/cpython/pull/20037

___
Python tracker 

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



[issue40595] AttributeError from type annotation

2020-05-11 Thread Eric V. Smith


Eric V. Smith  added the comment:

This is not an annotations-only issue. This is no different from:


import re

class MyClass(object):
def re(self):
pass

m = re.Match

Which gives the same error. It's being evaluated at class scope.

--
nosy: +eric.smith

___
Python tracker 

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



[issue40597] generated email message exceeds RFC-mandated limit of 998 characters

2020-05-11 Thread Arkadiusz Hiler


New submission from Arkadiusz Hiler :

RFC5322[0] in section 2.1.1 mandates that the line cannot be longer than 998 
characters and should not be longer than 78 characters (excluding CRLF). When 
we use raw_data_manager (default for EmailPolicy, EmailMessage) it does the 
correct thing as long as the message contains characters outside of 7bit 
US-ASCII set - base64 or qp Content-Transfer-Encoding which respects the line 
wrapping at 78 characters.

However if our message is limited the characters from the 7bit US-ASCII set no 
transfer encoding is applied, and such messages can easily go beyond 78 or even 
998 characters.


[0]: https://tools.ietf.org/html/rfc5322.html#section-2.1.1

--
components: email
messages: 368641
nosy: barry, ivyl, r.david.murray
priority: normal
severity: normal
status: open
title: generated email message exceeds RFC-mandated limit of 998 characters
type: behavior
versions: 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



[issue40561] Add docstrings for webbrowser open functions

2020-05-11 Thread miss-islington


miss-islington  added the comment:


New changeset 61b49a00e755136586e991c971c47f38bb5e4d23 by Miss Islington (bot) 
in branch '3.7':
bpo-40561: Add docstrings for webbrowser open functions (GH-1)
https://github.com/python/cpython/commit/61b49a00e755136586e991c971c47f38bb5e4d23


--

___
Python tracker 

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



[issue40561] Add docstrings for webbrowser open functions

2020-05-11 Thread miss-islington


miss-islington  added the comment:


New changeset a63c61168588937c482435d0432c753de4844c46 by Miss Islington (bot) 
in branch '3.8':
bpo-40561: Add docstrings for webbrowser open functions (GH-1)
https://github.com/python/cpython/commit/a63c61168588937c482435d0432c753de4844c46


--

___
Python tracker 

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



[issue40597] generated email message exceeds RFC-mandated limit of 998 characters

2020-05-11 Thread Arkadiusz Hiler


Change by Arkadiusz Hiler :


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

___
Python tracker 

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



[issue40561] Add docstrings for webbrowser open functions

2020-05-11 Thread Terry J. Reedy


Change by Terry J. Reedy :


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



[issue40595] AttributeError from type annotation

2020-05-11 Thread Taylor Robie


Taylor Robie  added the comment:

Ah, I see. If this is intended behavior (which is sounds like it is?) feel free 
to close. Thanks!

--

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


Change by Pablo Galindo Salgado :


--
pull_requests: +19349
pull_request: https://github.com/python/cpython/pull/20039

___
Python tracker 

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



[issue40480] "fnmatch" exponential execution time

2020-05-11 Thread Ned Batchelder


Ned Batchelder  added the comment:

This change has caused a problem for coverage.py.  The full details are here: 
https://github.com/nedbat/coveragepy/issues/988#issuecomment-626926513

Coverage.py combines fnmatch-produced regexes by joining them with pipes into 
one larger regex.  The \ group in the regexes now makes that larger regex 
invalid.

--
nosy: +nedbat

___
Python tracker 

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



[issue40597] generated email message exceeds RFC-mandated limit of 998 characters

2020-05-11 Thread R. David Murray


R. David Murray  added the comment:

The PR looks good to me, but I describe the change differently.  I'm not sure 
how I missed this in the original implementation, since I obviously checked it 
for the 8bit case.  Too long ago to remember :)

--

___
Python tracker 

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



[issue19956] inspect.getsource(obj.foo) fails when foo is an injected method constructed from another method

2020-05-11 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

I am working on an explanation of why I paused the PR.

--
versions: +Python 3.9 -Python 3.5

___
Python tracker 

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



[issue40553] Python 3.8.2 Mac freezing/not responding when saving new programs

2020-05-11 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Mat Wichmann responded
"we had three of these in the last few weeks sent to
webmas...@python.org.  I just went back and pinged those folks with a
request to look in on the issue, and contribute to it if they had
anything new/useful to add."

--

___
Python tracker 

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



[issue40503] PEP 615: Add zoneinfo module

2020-05-11 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Do we need the C implementation if there is the Python implementation?

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue40553] Python 3.8.2 Mac freezing/not responding when saving new programs

2020-05-11 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Raymond, can you run the tests I suggested above?

--

___
Python tracker 

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



[issue40596] str.isidentifier() does not work with non-BMP non-canonicalized strings on Windows

2020-05-11 Thread STINNER Victor


STINNER Victor  added the comment:

It's maybe time to speed up the deprecation of the legacy C API using 
Py_UNICODE...

--

___
Python tracker 

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



[issue40596] str.isidentifier() does not work with non-BMP non-canonicalized strings on Windows

2020-05-11 Thread STINNER Victor


STINNER Victor  added the comment:

My previous change on this function:

commit f3e7ea5b8c220cd63101e419d529c8563f9c6115
Author: Victor Stinner 
Date:   Tue Feb 11 14:29:33 2020 +0100

bpo-39500: Document PyUnicode_IsIdentifier() function (GH-18397)

PyUnicode_IsIdentifier() does not call Py_FatalError() anymore if the
string is not ready.

--

___
Python tracker 

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



[issue36346] Prepare for removing the legacy Unicode C API

2020-05-11 Thread STINNER Victor


STINNER Victor  added the comment:

> bpo-36346: array: Don't use deprecated APIs (GH-19653)

Thanks INADA-san! Another nail into Py_UNICODE coffin!

--

___
Python tracker 

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



[issue40598] round() does not return an integer when given a numpy float64

2020-05-11 Thread Michael Garbutt


New submission from Michael Garbutt :

The round() helptext states "The return value is an integer if ndigits is 
omitted or None.  Otherwise the return value has the same type as the number."

When given a numpy float64, the return type is also float64, rather than the 
expected int.

>>> import numpy as np
>>> value = np.float64(2.1)
>>> round(value)
2.0
>>> type(round(value))


Observed in Python 3.8.2, output of pip freeze:
certifi==2020.4.5.1
mkl-fft==1.0.15
mkl-random==1.1.0
mkl-service==2.3.0
numpy==1.18.1
six==1.14.0

Also in Python 3.7.2, output of pip freeze:

--
components: Library (Lib)
messages: 368654
nosy: MichaelCG8
priority: normal
severity: normal
status: open
title: round() does not return an integer when given a numpy float64
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



[issue40480] "fnmatch" exponential execution time

2020-05-11 Thread Tim Peters


Tim Peters  added the comment:

Ned, would it be possible to rewrite code of the form:

if giant pasted regexp matches:

to:

if any(p matches for p in patterns):

That should work under any version of Python.

There's no guarantee that regexps _can_ be pasted together and still work, so I 
can't call this change "a bug".  That pasting regexps together "worked" before 
was an implementation accident.

I'd be happy to change it anyway, except I know of no way to use Python's re 
engine without backreferences that can avoid exponential-time behavior in some 
cases.  In some other regexp engines, yes (e.g., as the code comments note, in 
those that support "atomic grouping"), but not in Python's.  Nor does Python's 
re engine support reusing backreference names or numbers.

So I know of no way to restore the ability to paste regexps together that 
wouldn't reintroduce the possiblity of exponential time failure :-(

--

___
Python tracker 

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



[issue40503] PEP 615: Add zoneinfo module

2020-05-11 Thread Paul Ganssle


Paul Ganssle  added the comment:

I mean, theoretically we don't "need" it, but it's much, much faster, and 
without it nearly every operation that needs time zone offsets will be slower 
than pytz (which has a mechanism for caching).

Also, I've already written it, so I see no reason why not use it.

--

___
Python tracker 

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



[issue40574] segfault causing regression from PEP 573 implementation (PyQt5)

2020-05-11 Thread STINNER Victor


STINNER Victor  added the comment:

> I think I have figured out the problem.  I had a locally built and cached 
> wheel of PyQt5-sip from before PEP573 went in.  If that wheel is used for 
> later commits I get the segfault, if I rebuilt the wheel from source it works.

Hum, I'm not sure that I understand well. Is there a bug in Python or not?

It seems when in my tests, pip of Python 3.9 installed wheel package marked as 
"python38". I understand that the ABI didn't change and we are all good.

I suggest to close the issue.

--

___
Python tracker 

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



[issue40503] PEP 615: Add zoneinfo module

2020-05-11 Thread Paul Ganssle

Paul Ganssle  added the comment:

Here are some benchmarks run using the latest implementation. The pure Python 
code is pretty optimized, but the C code is still ~4-5x faster.

Running from_utc in zone Europe/Paris
c_zoneinfo: mean: 494.82 ns ± 3.80 ns; min: 489.23 ns (k=5, N=50)
py_zoneinfo: mean: 2.48 µs ± 79.17 ns; min: 2.42 µs (k=5, N=10)
dateutil: mean: 10.41 µs ± 209.97 ns; min: 10.17 µs (k=5, N=5)
pytz: mean: 4.69 µs ± 252.70 ns; min: 4.39 µs (k=5, N=5)

Running to_utc in zone Europe/Paris
c_zoneinfo: mean: 539.61 ns ± 25.68 ns; min: 514.39 ns (k=5, N=50)
py_zoneinfo: mean: 2.01 µs ± 61.69 ns; min: 1.94 µs (k=5, N=10)
dateutil: mean: 7.88 µs ± 506.89 ns; min: 7.25 µs (k=5, N=5)
pytz: mean: 773.02 ns ± 14.11 ns; min: 759.56 ns (k=5, N=50)

Running utcoffset in zone Europe/Paris
c_zoneinfo: mean: 329.34 ns ± 36.31 ns; min: 302.88 ns (k=5, N=100)
py_zoneinfo: mean: 1.57 µs ± 9.58 ns; min: 1.55 µs (k=5, N=20)
dateutil: mean: 6.28 µs ± 86.61 ns; min: 6.16 µs (k=5, N=5)
pytz: mean: 461.47 ns ± 2.07 ns; min: 458.91 ns (k=5, N=50)


`utcoffset()` is very likely to be called possibly many times in certain hot 
loops (including implicitly as it's part of hash and equality checks).

--

___
Python tracker 

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



[issue40584] PyType_FromModuleAndSpec function should add the process of tp_vectorcall_offset

2020-05-11 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 86d69444e7cfe758212956df0be0ec7b8a4251a6 by Hai Shi in branch 
'master':
bpo-40584: Update PyType_FromModuleAndSpec() to process tp_vectorcall_offset 
(GH-20026)
https://github.com/python/cpython/commit/86d69444e7cfe758212956df0be0ec7b8a4251a6


--

___
Python tracker 

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



[issue40584] PyType_FromModuleAndSpec function should add the process of tp_vectorcall_offset

2020-05-11 Thread STINNER Victor


STINNER Victor  added the comment:

Thanks Hai Shi!

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



[issue40584] PyType_FromModuleAndSpec function should add the process of tp_vectorcall_offset

2020-05-11 Thread STINNER Victor


Change by STINNER Victor :


--
stage: resolved -> patch review

___
Python tracker 

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



[issue40500] test_multiprocessing_fork leaks processes on PPC64LE RHEL8 LTO + PGO 3.x

2020-05-11 Thread STINNER Victor


STINNER Victor  added the comment:

PPC64LE RHEL8 LTO + PGO 3.x:
https://buildbot.python.org/all/#/builders/450/builds/361

0:02:28 load avg: 6.47 [398/423/1] test_multiprocessing_spawn failed (env 
changed) (2 min 3 sec) -- running: test_asyncio (51.1 sec), test_peg_generator 
(47.7 sec), test_concurrent_futures (53.3 sec)
Warning -- multiprocessing.Manager still has [, ] active children 
after 5.115746586991008 seconds
Warning -- multiprocessing.Manager still has [, ] active children 
after 5.11747344958 seconds
Warning -- multiprocessing.Manager still has [, ] active children 
after 5.116073776007397 seconds

--

___
Python tracker 

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



[issue40553] Python 3.8.2 Mac freezing/not responding when saving new programs

2020-05-11 Thread Ned Deily


Ned Deily  added the comment:

>To debug, and test Raymond's hypothesis, someone please try this minimal 
>(IDLE-free) code to show the dialog and print the return.  
>This does not display a preview, even after selecting a location, such as 
>Documents, on the 3rd line.

Terry, I'm not sure I know what you mean here by preview. Do you mean the 
Column view of the Save sheet?  As "Bev in TX" explained in the quote you 
supplied earlier, the standard macOS Save or Save As save sheet which nearly 
all macOS apps use including Tk in IDLE has several settings, settings that are 
usually remembered across application invocations. By default initially, a 
compact display is given with boxes for Save As, Tags, and a pull-down Where 
list of folders.  To its right, there should be an button with a "V" icon.  
When pressed, the "V" changes to a "^" and the Save sheet expands to show more 
stuff.  What stuff it shows depends on the setting of the view options which 
can be accessed by clicking on the button with an array of six little squares 
on it, usually towards the upper left side of the Save sheet.  In it are the 
three main Show Items as options: "Icons", "List", "Columns". There are other 
options in there, too. So when discussing the appearance of macOS Open or Sa
 ve dialog sheets, one has to be really precise about what options are in 
effect for that particular Save. Those are under the control of the user and, 
again, are remembered by the operating system. Note also that for Save using he 
column view, the system does not show previews of existing files; it does for 
Open files, which you should be able to see if you substitute tk_getOpenFile in 
your test code.

In any case, I ran your test on both 10.15 and 10.14 and so far have still seen 
no problems, no hanging. I don't doubt these reports that people are seeing 
hangs but we still need to be able to reproduce them.  

FWIW, for every macOS Python installer before it is permitted to be released, I 
run a smoke test that, among other things, does essentially does what is 
reported here: launch IDLE.app, open a new file window, add a few lines 
including a print function, preess F5 to Run bringing up the Save dialog, Save 
the file, and verify that the expected output shows up in the IDLE shell 
window. Each installer is tested on at least one macOS system level, always the 
latest release and usually at least one older release. In years of doing this, 
I've never seen a hang like those being reported. So that's why I'm 
particularly curious about this because there is a lot of baseline experience 
over many releases of macOS, Python, and Tk for that matter. We'll keep 
searching.  But it would still be *really* helpful if, as I requested before, 
someone who does see these hangs and can reliably reproduce them, documents 
*exactly* all the steps to do so, from exactly how IDLE is launches to exactly 
how the Sav
 e dialog is invoked (by menu bar or keyboard shortcut or ...) and what options 
of the Save dialog are in effect.

--

___
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-11 Thread Guido van Rossum


Guido van Rossum  added the comment:


New changeset 27c0d9b54abaa4112d5a317b8aa78b39ad60a808 by Shantanu in branch 
'master':
bpo-40334: produce specialized errors for invalid del targets (GH-19911)
https://github.com/python/cpython/commit/27c0d9b54abaa4112d5a317b8aa78b39ad60a808


--

___
Python tracker 

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



[issue40599] Improve error messages with expected keywords

2020-05-11 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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

___
Python tracker 

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



[issue40599] Improve error messages with expected keywords

2020-05-11 Thread Pablo Galindo Salgado


New submission from Pablo Galindo Salgado :

Using the new parser, we could improve the plain "syntax error" messages with 
the tokens/keywords that would have made the parser advance. There is a proof 
of concept in https://github.com/python/cpython/pull/20039 you can play with.

I would like to get some initial opinions on the idea before going deeper in 
the issue :)

--
components: Interpreter Core
messages: 368664
nosy: gvanrossum, lys.nikolaou, pablogsal
priority: normal
severity: normal
status: open
title: Improve error messages with expected keywords
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



[issue40288] atexit module should not be loaded more than once per interpreter

2020-05-11 Thread STINNER Victor


STINNER Victor  added the comment:

I created bpo-40600: "Add an option to disallow creating more than one instance 
of a module".

--

___
Python tracker 

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



[issue40600] Add an option to disallow creating more than one instance of a module

2020-05-11 Thread STINNER Victor


New submission from STINNER Victor :

When a C extension module is created with PyModuleDef_Init(), it becomes 
possible to create more than one instance of the module.

It would take significant effort to modify some extensions to make their code 
fully ready to have two isolated module.

For example, the atexit module calls _Py_PyAtExit() to register itself into the 
PyInterpreterState. If the module is created more than once, the most recently 
created module wins, and calls registered on other atexit instances are ignore: 
see bpo-40288.

One simple option would be to simply disallow loading the module more than once 
per interpreter.

Also, some extensions are not fully compatible with subinterpreters. It may be 
interesting to allow to load them in a subinterpreter if it's not already 
loaded in another interpreter, like another subinterpreter or the main 
interpreter. It would be only load it once per Python *process*. For example, 
numpy would be a good candidate for such option.

I'm not sure fow a module should announced in its definition that it should not 
be loaded more than once.

--
components: Extension Modules
messages: 368665
nosy: corona10, eric.snow, vstinner
priority: normal
severity: normal
status: open
title: Add an option to disallow creating more than one instance of a module
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



[issue40334] PEP 617: new PEG-based parser

2020-05-11 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
pull_requests:  -19349

___
Python tracker 

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



[issue40077] Convert static types to PyType_FromSpec()

2020-05-11 Thread STINNER Victor


STINNER Victor  added the comment:

See also bpo-40601: [C API] Hide static types from the limited C API.

--

___
Python tracker 

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



[issue40601] [C API] Hide static types from the limited C API

2020-05-11 Thread STINNER Victor


STINNER Victor  added the comment:

See also bpo-40077: "Convert static types to PyType_FromSpec()".

--

___
Python tracker 

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



[issue40601] [C API] Hide static types from the limited C API

2020-05-11 Thread STINNER Victor


New submission from STINNER Victor :

"Statically allocated types" prevents to get per-interpreter GIL: bpo-40512. 
These types are currently shared by all interpreters.

Eric Snow proposed the idea of creating a heap allocated type in 
subintepreters. But we should take care of direct usage of the statically 
allocated type.

For example, Objects/longobject.c defines "PyTypeObject PyLong_Type = {...};". 
This type is exposed in the limited C API (!) in Include/longobject.c:

PyAPI_DATA(PyTypeObject) PyLong_Type;

It's used but such macro:

#define PyLong_CheckExact(op) Py_IS_TYPE(op, &PyLong_Type)

I don't think that these types are directly accessed in C extensions built with 
the limited C API. My expectation is that the type is only exposed for 
"CheckExact" macros.

Currently, 100 statically allocated types are declared in Python header files:

$ grep -F '(PyTypeObject)' Include/ -R
Include/cpython/fileobject.h:PyAPI_DATA(PyTypeObject) PyStdPrinter_Type;
(...)
Include/object.h:PyAPI_DATA(PyTypeObject) PySuper_Type; /* built-in 'super' */
Include/methodobject.h:PyAPI_DATA(PyTypeObject) PyCFunction_Type;

Most of them seem to be exposed in the limited C API.

I propose to break the limited C API backward compatibility on purpose by 
removing these type definitions form the limited C API.

For "CheckExact" macros, we can continue to provide them in the limited C API 
but as function calls. So a built C extension would no longer access directly 
the type, but only do function calls.

--
components: C API
messages: 368667
nosy: vstinner
priority: normal
severity: normal
status: open
title: [C API] Hide static types from the limited C API
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



[issue40512] Meta issue: per-interpreter GIL

2020-05-11 Thread STINNER Victor


STINNER Victor  added the comment:

"Static" types are shared by all interpreters. We should convert them to heap 
allocated types using PyType_FromSpec(), see:

* bpo-40077: Convert static types to PyType_FromSpec()
* bpo-40601: [C API] Hide static types from the limited C API

--

___
Python tracker 

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



[issue40598] round() does not return an integer when given a numpy float64

2020-05-11 Thread Eric V. Smith


Eric V. Smith  added the comment:

Wouldn't float64's __round__ method be in complete control of this? For 
python's float:

>>> x = 3.4
>>> type(x.__round__(1))

>>> type(x.__round__())


And Decimal:

>>> from decimal import Decimal
>>> x = Decimal('3.4')
>>> type(x.__round__(1))

>>> type(x.__round__())



Of course, numpy may have good reasons for what they're doing.

--
nosy: +eric.smith

___
Python tracker 

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



[issue40598] round() does not return an integer when given a numpy float64

2020-05-11 Thread STINNER Victor


STINNER Victor  added the comment:

> The round() helptext states "The return value is an integer if ndigits is 
> omitted or None.  Otherwise the return value has the same type as the number."

round(number) is documented to call number.__round__:

https://docs.python.org/dev/library/functions.html#round
For a general Python object number, round delegates to number.__round__.

It's not a bug, Python works as expected.

It's better to refer to the main documentation. Docstrings are short and 
incomplete on purpose. I close the issue.

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



[issue40257] Improve the use of __doc__ in pydoc

2020-05-11 Thread Guido van Rossum


Guido van Rossum  added the comment:

I'm making this a release blocker -- please everybody come to an agreement or 
ask on python-dev.

--
priority: normal -> release blocker
resolution: fixed -> remind

___
Python tracker 

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



[issue38078] IDLE: Don't run internal code in user namespace.

2020-05-11 Thread Zackery Spytz


Change by Zackery Spytz :


--
keywords: +patch
nosy: +ZackerySpytz
nosy_count: 1.0 -> 2.0
pull_requests: +19351
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/20040

___
Python tracker 

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



[issue40599] Improve error messages with expected keywords

2020-05-11 Thread Guido van Rossum


Guido van Rossum  added the comment:

Hmm... The errors get long, and by focusing only on keywords they can be 
misleading. E.g.

>>> from x import a b c
  File "", line 1
from x import a b c
^
SyntaxError: Invalid syntax. Expected one of: as
>>> 

But the most likely error is omission of a comma.

>>> if x y: pass
  File "", line 1
if x y: pass
 ^
SyntaxError: Invalid syntax. Expected one of: not, is, or, in, and, if
>>> 

But the most likely error is probably a comparison operator.

And so on. Here's a nice one:

>>> /
  File "", line 1
/
^
SyntaxError: Invalid syntax. Expected one of: for, pass, lambda, False, global, 
True, __new_parser__, if, raise, continue, not, break, while, None, del, 
nonlocal, import, assert, return, class, with, def, try, from, yield
>>> 

(Huh, where did it get __new_parser__?)

The beauty of Python's detail-free syntax error is that it doesn't tell you 
what it expects -- because parsers are dumb, what the parser expected is rarely 
what's wrong with your code -- and it requires the user to understand how the 
parser works to interpret the error message.

--

___
Python tracker 

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



[issue40574] segfault causing regression from PEP 573 implementation (PyQt5)

2020-05-11 Thread Thomas Caswell


Thomas Caswell  added the comment:

The path is

 - on a commit prior to e1becf46b4e3ba6d7d32ebf4bbd3e0804766a423 install 
pyqt-sip.  pip will build a wheel for you called 
PyQt5_sip-12.7.2-cp39-cp39-linux_x86_64.whl
 - on a commit after e1becf46b4e3ba6d7d32ebf4bbd3e0804766a423 if you do `pip 
install pyqt-sip` pip will discover the wheel from the previous install in it's 
cache and use it, but the ABI has changed (?) which leads to a segfault.  If 
you do `pip install pyqt5-sip --no-binary pyqt5-sip` or clear the cache then 
things work correctly

I suspect that this also means that wheels made with the early alphas will not 
work future 3.9 (pre-)releases, however I am not sure if that is a problem or 
not (given that it is all pre-releases).

I am going to close this as I think if there is a bug, it would be better 
addressed in the packaging space.

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



[issue40601] [C API] Hide static types from the limited C API

2020-05-11 Thread STINNER Victor


STINNER Victor  added the comment:

> I propose to break the limited C API backward compatibility on purpose by 
> removing these type definitions form the limited C API.

Hum. How would a C extension subclass the Python int type (PyLong_Type) if it's 
no longer exposed? One option is to add one function per type, like:

PyObject* Py_GetLongType(void);

It would return a *strong reference* to the type (PyLong_Type).

Another option is to get the type from builtins module or builtins dictionary 
(PyInterpreterState.builtins). But there is no simple C function to get a 
builtin object. It requires many calls, handle errors, etc. Maybe a generic 
helper like the following function would help:

PyObject *Py_GetBuiltin(const char *name);

Note: PyEval_GetBuiltins() exposes the builtins of the *current frame* which 
maybe not be what you may expect.

Currently, Py_GetBuiltin(name) is not needed since basically *all* Python 
builtins are *directly* exposed in the C API...

--

___
Python tracker 

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



[issue31436] test_socket.SendfileUsingSendfileTest.testWithTimeoutTriggeredSend fails due to sendfile completing before timeout

2020-05-11 Thread Thomas Chan


Change by Thomas Chan :


--
nosy: +tchan

___
Python tracker 

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



[issue36702] test_dtrace failed

2020-05-11 Thread Thomas Chan


Change by Thomas Chan :


--
nosy: +tchan

___
Python tracker 

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



[issue40599] Improve error messages with expected keywords

2020-05-11 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> SyntaxError: Invalid syntax. Expected one of: for, pass, lambda, False, 
> global, True, __new_parser__, if, raise, continue, not, break, while, None, 
> del, nonlocal, import, assert, return, class, with, def, try, from, yield

Haha, that is a good point. It also reveals the easter egg :)

> The beauty of Python's detail-free syntax error is that it doesn't tell you 
> what it expects -- because parsers are dumb, what the parser expected is 
> rarely what's wrong with your code -- and it requires the user to understand 
> how the parser works to interpret the error message.

Right, I think will be very difficult to actually give you something very close 
to what the actual problem is.

I started this draft based on some similar errors that I have seen in other 
parsers but is true that with the exception of rust, all other grammars I 
explored and played with were mucn simpler, so the errors were not super 
verbose.

I think i will close the issue and the PR unless you think there is something 
worth exploring/discussing left, as it does not look that we can get something 
less verbose in an easy way.

--

___
Python tracker 

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



[issue40599] Improve error messages with expected keywords

2020-05-11 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> (Huh, where did it get __new_parser__?)

>From here:

https://github.com/python/cpython/blob/master/Parser/pegen/parse.c#L67

--

___
Python tracker 

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



[issue40599] Improve error messages with expected keywords

2020-05-11 Thread Guido van Rossum


Guido van Rossum  added the comment:

I had hoped that error labels would get us closer to error recovery, but it 
appears that is still quite elusive. :-(

--

___
Python tracker 

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



[issue40599] Improve error messages with expected keywords

2020-05-11 Thread Lysandros Nikolaou


Lysandros Nikolaou  added the comment:

I also concur with Guido here. I have played around with other languages and I 
dislike getting a long list of expected tokens, that are not helpful, if not 
actually confusing sometimes.

I think that the current generic SyntaxError description together with the 
error caret actually does a good job of directing someone to close where the 
error is, without providing too much information that might be misleading.

--

___
Python tracker 

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



[issue39465] Design a subinterpreter friendly alternative to _Py_IDENTIFIER

2020-05-11 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue40599] Improve error messages with expected keywords

2020-05-11 Thread Guido van Rossum


Guido van Rossum  added the comment:

In response to my PEG blogs last year someone showed me an entirely different 
algorithm, based on first looking for matching parentheses (and other matching 
things), then for operators by priority, and so on. The approach was designed 
with C in mind but looked like it would fit reasonably well with Python, once 
you view e.g. ':' as an operator of a certain priority, and figure out what to 
do with indentation.

This would actually be closer to the old approach, accepting "a+1 = b" 
initially as an assignment and then rejecting "a+1" as a target.

I wonder if we could (eventually) use this approach as a fallback when a syntax 
error is found. But it is an entirely different theoretical framework, so we 
should probably not hurry with this.

IOW I'm okay with closing this issue.

--

___
Python tracker 

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



[issue40599] Improve error messages with expected keywords

2020-05-11 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
resolution:  -> rejected
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue39465] Design a subinterpreter friendly alternative to _Py_IDENTIFIER

2020-05-11 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 4804b5b3df82e7892ca0550b02f902bcfc16bb48 by Victor Stinner in 
branch 'master':
bpo-39465: Don't access directly _Py_Identifier members (GH-20043)
https://github.com/python/cpython/commit/4804b5b3df82e7892ca0550b02f902bcfc16bb48


--

___
Python tracker 

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



[issue40480] "fnmatch" exponential execution time

2020-05-11 Thread Anthony Sottile


Anthony Sottile  added the comment:

one way might be to give the groups "unique" names (perhaps hashing the input 
string?)  ((this is what I attempted to do in a little bit of code which tried 
to "backport" (group)*+ and (group)++))

--
nosy: +Anthony Sottile

___
Python tracker 

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



[issue40571] Make lru_cache(maxsize=None) more discoverable

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



[issue40571] Make lru_cache(maxsize=None) more discoverable

2020-05-11 Thread Raymond Hettinger


Raymond Hettinger  added the comment:


New changeset 21cdb711e3b1975398c54141e519ead02670610e by Raymond Hettinger in 
branch 'master':
bpo-40571: Make lru_cache(maxsize=None) more discoverable (GH-20019)
https://github.com/python/cpython/commit/21cdb711e3b1975398c54141e519ead02670610e


--

___
Python tracker 

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



[issue40602] Move Modules/hashtable.h to Include/internal/pycore_hashtable.h

2020-05-11 Thread STINNER Victor


New submission from STINNER Victor :

Python/mashal.c uses Modules/hashtable.h.

Python/mashal.c indirectly gets Modules/hashtable.c implementation via 
Modules/_tracemalloc.c which is built as a builtin module.

I propose to make the "hashtable" more standard:

* Move Modules/hashtable.h to Include/internal/pycore_hashtable.h
* Move Modules/hashtable.c to Python/hashtable.c

Attached PR implements this change but also changes the default memory 
allocator to PyMem_Malloc/PyMem_Free which is faster than 
PyMem_RawMalloc/PyMem_RawFree (current default) for memory blocks <= 512 bytes.

It remains an internal C API which cannot be used outside CPython.

--
components: C API
messages: 368685
nosy: vstinner
priority: normal
severity: normal
status: open
title: Move Modules/hashtable.h to Include/internal/pycore_hashtable.h
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



[issue40480] "fnmatch" exponential execution time

2020-05-11 Thread Tim Peters


Tim Peters  added the comment:

I don't want something probabilistic.  Fix it or don't ;-)

One thing that would work, but at the cost of non-determinism:  do the same as 
now, but obtain the number part of the group name by applying next() to a 
module-global private instance of itertools.count().  That will keep the 
numbers increasing "forever", and across calls.  The point to using .count() is 
that it's atomic (i.e., won't repeat a number if multiple threads happen to be 
constructing regexps simultaneously).

It's a darned silly amount of effort, though ;-)

--

___
Python tracker 

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



[issue40602] Move Modules/hashtable.h to Include/internal/pycore_hashtable.h

2020-05-11 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue40574] segfault causing regression from PEP 573 implementation (PyQt5)

2020-05-11 Thread STINNER Victor


STINNER Victor  added the comment:

The stable ABI should not change between Python 3.8 and 3.9.

In practice, it seems like something changed. But without any gdb traceback, I 
cannot tell what.

I suggest to try again when beta1 will be released. The ABI should be way more 
stable after beta1.

--

___
Python tracker 

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



[issue39465] Design a subinterpreter friendly alternative to _Py_IDENTIFIER

2020-05-11 Thread STINNER Victor


STINNER Victor  added the comment:

I created bpo-40602: "Move Modules/hashtable.h to 
Include/internal/pycore_hashtable.h".

--

___
Python tracker 

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



[issue39481] Implement PEP 585 (Type Hinting Generics In Standard Collections)

2020-05-11 Thread Batuhan Taskaya


Change by Batuhan Taskaya :


--
pull_requests: +19354
pull_request: https://github.com/python/cpython/pull/20045

___
Python tracker 

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



[issue40602] Move Modules/hashtable.h to Include/internal/pycore_hashtable.h

2020-05-11 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset b617993b7c0b0f6f679ef7003a62d0318b6d6af9 by Victor Stinner in 
branch 'master':
bpo-40602: Rename hashtable.h to pycore_hashtable.h (GH-20044)
https://github.com/python/cpython/commit/b617993b7c0b0f6f679ef7003a62d0318b6d6af9


--

___
Python tracker 

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



[issue40602] Move Modules/hashtable.h to Include/internal/pycore_hashtable.h

2020-05-11 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +19355
pull_request: https://github.com/python/cpython/pull/20046

___
Python tracker 

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



[issue38872] Document exec symbol for codeop.compile_command

2020-05-11 Thread Joannah Nanjekye


Change by Joannah Nanjekye :


--
keywords: +patch
nosy: +nanjekyejoannah
nosy_count: 4.0 -> 5.0
pull_requests: +19356
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/20047

___
Python tracker 

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



[issue39465] Design a subinterpreter friendly alternative to _Py_IDENTIFIER

2020-05-11 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +19357
pull_request: https://github.com/python/cpython/pull/20048

___
Python tracker 

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



[issue40602] Move Modules/hashtable.h to Include/internal/pycore_hashtable.h

2020-05-11 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset d0919f0d6bb757b6bcfd7b2e15656d318c9d5cd9 by Victor Stinner in 
branch 'master':
bpo-40602: _Py_hashtable_new() uses PyMem_Malloc() (GH-20046)
https://github.com/python/cpython/commit/d0919f0d6bb757b6bcfd7b2e15656d318c9d5cd9


--

___
Python tracker 

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



  1   2   >