[issue41978] numpy, scipy packages failed to install via pip - Windows 10 Pro 64 bit

2020-10-09 Thread Jürgen Gmach

Jürgen Gmach  added the comment:

While e.g. numpy already shows Python 3.9 support on their GitHub repository ( 
https://github.com/numpy/numpy/blob/master/setup.py ), there is no Python 3.9 
compatible package on PyPI yet ( https://pypi.org/project/numpy/#files ).

I guess you have to wait a bit more until there will be a new release.

Also, this is the cpython issue tracker. When you have problems with a specific 
package, it is best to seek help at their issue tracker. For numpy this would 
be https://github.com/numpy/numpy/issues

Actually, there is already an issue on their tracker about support for Python 
3.9
https://github.com/numpy/numpy/issues/17482

I suggest to close this issue here.

--
nosy: +jugmac00

___
Python tracker 

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



[issue41978] numpy, scipy packages failed to install via pip - Windows 10 Pro 64 bit

2020-10-09 Thread Christian Heimes

Christian Heimes  added the comment:

As Jürgen said numpy does not provide binaries for Python 3.9 yet. Please 
report the issue with numpy and request builds for Python 3.9.

--
nosy: +christian.heimes
resolution:  -> third party
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue41979] PEG parser doesn't accept extended unpacking in with statement

2020-10-09 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
nosy: +benjamin.peterson, gvanrossum, pablogsal

___
Python tracker 

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



[issue41979] PEG parser doesn't accept extended unpacking in with statement

2020-10-09 Thread Joshua Oreman


New submission from Joshua Oreman :

On Python 3.9.0 with the new PEG parser, the following statement produces a 
SyntaxError:

with contextlib.nullcontext(range(1, 5)) as (first, *rest, last):
print(first, rest, last)

On 3.8.x, or 3.9.0 with -X oldparser, it succeeds and prints "1 [2, 3] 4" as 
expected.

As I understand it, the thing after 'as' is an assignment target and should 
accept anything that can go on the LHS of an equals sign.

--
components: Interpreter Core
messages: 378305
nosy: Joshua Oreman
priority: normal
severity: normal
status: open
title: PEG parser doesn't accept extended unpacking in with statement
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



[issue41490] Update bundled pip to 20.2.1 and setuptools to 49.2.1

2020-10-09 Thread STINNER Victor


STINNER Victor  added the comment:

setuptools is still more recent in 3.9 than in master. Look at PR 21748.

Can someone try to update setuptools in master?

--

___
Python tracker 

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



[issue41963] ConfigParser: stripping of comments should be documented

2020-10-09 Thread Jürgen Gmach

Jürgen Gmach  added the comment:

pymotw.com shows a big red warning about comments not being preserved:

https://pymotw.com/3/configparser/

--

___
Python tracker 

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



[issue41974] Remove complex.__float__, complex.__floordiv__, etc

2020-10-09 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue41974] Remove complex.__float__, complex.__floordiv__, etc

2020-10-09 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset e2ec0b27c02a158d0007c11dcc1f2d7a95948712 by Serhiy Storchaka in 
branch 'master':
bpo-41974: Remove complex.__float__, complex.__floordiv__, etc (GH-22593)
https://github.com/python/cpython/commit/e2ec0b27c02a158d0007c11dcc1f2d7a95948712


--

___
Python tracker 

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



[issue41980] Argparse documentation is slightly misleading

2020-10-09 Thread Yannick Gingras


New submission from Yannick Gingras :

In argparse.rst, while documenting ArgumentParser.add_subparsers, ``prog`` is 
described on line 1630 as:
  usage information that will be displayed with sub-command help,
  by default the name of the program and any positional arguments 
  before the subparser argument

This is confusing since ``prog`` is actually a very small prefix of the usage 
message.  Describing this parameter as "name of the program" or event "name of 
the program with sub-commands" would be more clear.

--
components: Library (Lib)
messages: 378316
nosy: ygingras
priority: normal
severity: normal
status: open
title: Argparse documentation is slightly misleading
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



[issue24653] Mock.assert_has_calls([]) is surprising for users

2020-10-09 Thread Irit Katriel


Irit Katriel  added the comment:

I agree that the confusion was probably due to assumptions rather than a 
misreading of the doc, and I would not object to closing this issue.

However, Robert did object so I would like to suggest an adjustment that may 
help:

Currently the documentation of assert_not_called is just after that of 
assert_has_calls.   If we reverse their order, then there can be less room for 
confusion about how to check that nothing was called - you would read that 
first. 

https://docs.python.org/3/library/unittest.mock.html#unittest.mock.Mock.assert_has_calls

--
nosy: +iritkatriel
versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.4, Python 3.5, Python 
3.6

___
Python tracker 

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



[issue41831] Restore default __str__ of tkinter.EventType

2020-10-09 Thread miss-islington


Change by miss-islington :


--
pull_requests: +21598
pull_request: https://github.com/python/cpython/pull/22617

___
Python tracker 

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



[issue41831] Restore default __str__ of tkinter.EventType

2020-10-09 Thread miss-islington


miss-islington  added the comment:


New changeset 86938548d5829400065d2705e3d25604c14b23b7 by Miss Skeleton (bot) 
in branch '3.8':
bpo-41831: Add tests for tkinter.Event.__repr__ (GH-22354)
https://github.com/python/cpython/commit/86938548d5829400065d2705e3d25604c14b23b7


--

___
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-10-09 Thread Saiyang Gou


Change by Saiyang Gou :


--
nosy: +gousaiyang
nosy_count: 6.0 -> 7.0
pull_requests: +21599
pull_request: https://github.com/python/cpython/pull/22619

___
Python tracker 

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



[issue41987] singledispatchmethod raises an error when relying on a forward declaration

2020-10-09 Thread Glyph Lefkowitz


New submission from Glyph Lefkowitz :

This example:


from __future__ import annotations
from functools import singledispatchmethod


class Comparable:
@singledispatchmethod
def compare(self, arg: object):
raise NotImplementedError("what")

@compare.register
def _(self, arg: Comparable):
return "somewhat similar"


print(Comparable().compare(Comparable()))


Produces this result:

  File 
"/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/typing.py", 
line 518, in _evaluate
eval(self.__forward_code__, globalns, localns),
  File "", line 1, in 
NameError: name 'Comparable' is not defined

It seems like perhaps singledispatchmethod should defer its type evaluation to 
its first invocation?

--
components: Library (Lib)
messages: 378346
nosy: glyph
priority: normal
severity: normal
stage: needs patch
status: open
title: singledispatchmethod raises an error when relying on a forward 
declaration
type: behavior
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



[issue41831] Restore default __str__ of tkinter.EventType

2020-10-09 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 43c3eafa1bcdc522870e112d3e2d67ce2451c34b by Miss Skeleton (bot) 
in branch '3.9':
bpo-41831: Add tests for tkinter.Event.__repr__ (GH-22354) (GH-22617)
https://github.com/python/cpython/commit/43c3eafa1bcdc522870e112d3e2d67ce2451c34b


--

___
Python tracker 

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



[issue41831] Restore default __str__ of tkinter.EventType

2020-10-09 Thread miss-islington


miss-islington  added the comment:


New changeset f8ebb7b62ea266df5c6e0f910b7a6b0eb73deee4 by Miss Skeleton (bot) 
in branch '3.8':
bpo-41831: Restore str implementation of __str__ in tkinter.EventType (GH-22355)
https://github.com/python/cpython/commit/f8ebb7b62ea266df5c6e0f910b7a6b0eb73deee4


--

___
Python tracker 

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



[issue41831] Restore default __str__ of tkinter.EventType

2020-10-09 Thread miss-islington


miss-islington  added the comment:


New changeset 1f75fc7a9d9efbced2e0b0001ac148268a626d63 by Miss Skeleton (bot) 
in branch '3.9':
bpo-41831: Restore str implementation of __str__ in tkinter.EventType (GH-22355)
https://github.com/python/cpython/commit/1f75fc7a9d9efbced2e0b0001ac148268a626d63


--

___
Python tracker 

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



[issue41831] Restore default __str__ of tkinter.EventType

2020-10-09 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue41986] Py_FileSystemDefaultEncodeErrors and Py_UTF8Mode are not available with limited API

2020-10-09 Thread Serhiy Storchaka


New submission from Serhiy Storchaka :

Py_FileSystemDefaultEncodeErrors was added to limited API in 3.7 and 
Py_UTF8Mode -- in 3.7. But in 3.8 their declarations are not available if 
Py_LIMITED_API is defined because they were moved to different header file 
included only if Py_LIMITED_API is not defined.

--
components: C API
messages: 378340
nosy: serhiy.storchaka, vstinner
priority: normal
severity: normal
status: open
title: Py_FileSystemDefaultEncodeErrors and Py_UTF8Mode are not available with 
limited API
type: behavior
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



[issue41831] Restore default __str__ of tkinter.EventType

2020-10-09 Thread miss-islington


Change by miss-islington :


--
pull_requests: +21603
pull_request: https://github.com/python/cpython/pull/22623

___
Python tracker 

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



[issue41831] Restore default __str__ of tkinter.EventType

2020-10-09 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset eb38c6b7aa35d3003ec0958533421902d19ce408 by Serhiy Storchaka in 
branch 'master':
bpo-41831: Restore str implementation of __str__ in tkinter.EventType (GH-22355)
https://github.com/python/cpython/commit/eb38c6b7aa35d3003ec0958533421902d19ce408


--

___
Python tracker 

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



[issue41831] Restore default __str__ of tkinter.EventType

2020-10-09 Thread miss-islington


Change by miss-islington :


--
pull_requests: +21602
pull_request: https://github.com/python/cpython/pull/22622

___
Python tracker 

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



[issue41940] AMD64 Debian root 3.x: tests fail because downloaded files start with:

2020-10-09 Thread Emmanuel Arias


Change by Emmanuel Arias :


--
nosy: +eamanu

___
Python tracker 

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



[issue41940] AMD64 Debian root 3.x: tests fail because downloaded files start with:

2020-10-09 Thread Emmanuel Arias


Emmanuel Arias  added the comment:

Hi,

seems that this test doesn't occur ? or I'm very wrong? 

https://buildbot.python.org/all/#/builders/345

--

___
Python tracker 

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



[issue41985] Argument Clinic: add converter for file descriptor

2020-10-09 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue41984] Empty __slots__ can create untracked reference cycles

2020-10-09 Thread Brandt Bucher

New submission from Brandt Bucher :

Currently, we don't track instances of certain heap types based on the 
assumption that "no members" == "no reference cycles".

Unfortunately, it's still possible to create untracked reference cycles with 
one's parents. The following program leaks memory:

while True:
    class C:
        __slots__ = ()
    C.i = C()
    del C

The fix is simple: track all instances of user-defined classes, no exceptions. 
I'm not sure we were actually getting any real wins from the old behavior 
anyways.

--
assignee: brandtbucher
components: Interpreter Core
messages: 378337
nosy: brandtbucher, pablogsal
priority: low
severity: normal
status: open
title: Empty __slots__ can create untracked reference cycles
type: resource usage
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



[issue41985] Argument Clinic: add converter for file descriptor

2020-10-09 Thread Serhiy Storchaka


New submission from Serhiy Storchaka :

Local converters for file descriptors which uses PyObject_AsFileDescriptor() 
are defined and used in several files: Modules/fcntlmodule.c, 
Modules/posixmodule.c, Modules/selectmodule.c, Modules/termios.c.

The proposed PR replaces them all with a global private function 
_PyLong_FileDescriptor_Converter() and adds corresponding Argument Clinic 
converter "fildes".

In future it could be used in more places, allowing to pass a file with 
fileno() method to functions which accept file descriptor.

--
components: Argument Clinic
messages: 378338
nosy: larry, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Argument Clinic: add converter for file descriptor
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



[issue41805] types.GenericAlias and types.Union have no documentation

2020-10-09 Thread Ken Jin


Change by Ken Jin :


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

___
Python tracker 

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



[issue41831] Restore default __str__ of tkinter.EventType

2020-10-09 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 3.0 -> 4.0
pull_requests: +21597
pull_request: https://github.com/python/cpython/pull/22616

___
Python tracker 

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



[issue41831] Restore default __str__ of tkinter.EventType

2020-10-09 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset f25323a307a72c40862c87c2df822f83be6645da by Serhiy Storchaka in 
branch 'master':
bpo-41831: Add tests for tkinter.Event.__repr__ (GH-22354)
https://github.com/python/cpython/commit/f25323a307a72c40862c87c2df822f83be6645da


--

___
Python tracker 

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



[issue41984] Empty __slots__ can create untracked reference cycles

2020-10-09 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Thanks for noticing this, Brandt!

> The fix is simple: track all instances of user-defined classes, no exceptions

I have the fear that this may increase the time of collections substantially 
because even if many of them won't have references at all, they still net to be 
visited and they count towards the time complexity of the algorithm that 
detects isolated sub-cycles. I mention this because this could affect an 
unbounded number of instances per type. For example, some of the types that are 
untracked.

Maybe I am missing something but we could mark them as having GC support 
unconditionally but still leave them untracking and unconditionally add a 
tracking call on setattribute.

--
nosy: +nascheme, tim.peters

___
Python tracker 

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



[issue41986] Py_FileSystemDefaultEncodeErrors and Py_UTF8Mode are not available with limited API

2020-10-09 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue41756] Do not always use exceptions to return result from coroutine

2020-10-09 Thread Yury Selivanov


Yury Selivanov  added the comment:


New changeset 037245c5ac46c3436f617a1f5d965929754be239 by Vladimir Matveev in 
branch 'master':
bpo-41756: Add PyIter_Send function (#22443)
https://github.com/python/cpython/commit/037245c5ac46c3436f617a1f5d965929754be239


--

___
Python tracker 

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



[issue41987] singledispatchmethod raises an error when relying on a forward declaration

2020-10-09 Thread Batuhan Taskaya


Batuhan Taskaya  added the comment:

AFAIK the normal way of registering types (dispatcher.register()) also 
requires that registered type be defined at the execution type. I guess, if we 
are going to support such a thing, we might end up with supporting passing 
strings into the .register() as the initial argument of matching type to be 
consistent. Anyways, this would be a feature request for 3.10+, so changing the 
version info.

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



[issue41988] No hyphen in broken up word in documentation

2020-10-09 Thread Henk-Jaap Wagenaar


New submission from Henk-Jaap Wagenaar :

In the decimal module documentation:

https://docs.python.org/3/library/decimal.html

Arithmetic is broken up for me as "Arith\nmetic", not the missing hyphen, 
unless I am mistaken it should be "Arith-\nmetic". Is this a Sphinx issue? Is 
this a browser issue? Is this an issue on our end? Later it does break 
"Applications" correctly.

See attached screenshot.

--
assignee: docs@python
components: Documentation
files: Screenshot 2020-10-09 at 21.43.50.png
messages: 378351
nosy: cryvate, docs@python
priority: normal
severity: normal
status: open
title: No hyphen in broken up word in documentation
versions: Python 3.10, Python 3.8, Python 3.9
Added file: https://bugs.python.org/file49504/Screenshot 2020-10-09 at 
21.43.50.png

___
Python tracker 

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



[issue41987] singledispatchmethod raises an error when relying on a forward declaration

2020-10-09 Thread Glyph Lefkowitz

Glyph Lefkowitz  added the comment:

The behavior is the same with a traditional quoted forward declaration, so it’s 
not specific to the __future__ import; I just phrased the example that way to 
show how it’s going to look in the future and to illustrate how it might crop 
up in a way which is maximally confusing to users less familiar with the 
internals of type annotations.

--

___
Python tracker 

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



[issue41988] No hyphen in broken up word in documentation

2020-10-09 Thread Mariatta


Mariatta  added the comment:

In the source code, we wrote it as "arithmetic" in one word.

https://raw.githubusercontent.com/python/cpython/master/Doc/library/decimal.rst

So I think this is either Sphinx or Docutils issue.

--
nosy: +Mariatta

___
Python tracker 

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



[issue41984] Empty __slots__ can create untracked reference cycles

2020-10-09 Thread Brandt Bucher

Brandt Bucher  added the comment:

> Maybe I am missing something but we could mark them as having GC support 
> unconditionally but still leave them untracking and unconditionally add a 
> tracking call on setattribute.

Hm, I’m not sure that would be enough. Consider the case of a class that 
registers its instances in a collection of some sort:

while True:
class D:
__slots__ = ()
registry = []
def __init__(self):
self.registry.append(self)
for i in range(100):
D() and None  # Suppress REPL output.
del D

This is probably more common (and problematic) than my example above.

At the same time, I agree that it’s not *ideal* to track all of these objects 
automatically. Anyone setting __slots__ is probably planning on creating lots 
of “cheap” instances. If they do accidentally create cycles, though, I feel the 
memory hit then would be worse than any collection overhead.

I’m just not sure I see a way to fix this without tracking them all.

--

___
Python tracker 

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



[issue38153] Normalize hashing algorithm names

2020-10-09 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

looks like it, thanks!

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



[issue34706] Signature.from_callable sometimes drops subclassing

2020-10-09 Thread Gregory P. Smith


Change by Gregory P. Smith :


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

___
Python tracker 

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



[issue41987] singledispatchmethod raises an error when relying on a forward declaration

2020-10-09 Thread Batuhan Taskaya


Change by Batuhan Taskaya :


--
nosy: +BTaskaya

___
Python tracker 

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



[issue41984] Empty __slots__ can create untracked reference cycles

2020-10-09 Thread Pablo Galindo Salgado

Pablo Galindo Salgado  added the comment:

> I’m just not sure I see a way to fix this without tracking them all.

IIRC we do skip the GC flags for user-created types only when the subtype is 
not adding new variables *and* the base class is not a GC class by itself. This 
includes the case with __slots__ but is not limited to. If I recall correctly, 
there is a bunch of metaclasses that fall into this category and some other 
minor things so maybe is not that bad to unconditionally make all user objects 
tracked.

In any case I think is prudent to run the performance test suite with PGO/LTO + 
CPU isolation to get an idea. Unfortinately we already have some unwanted 3.9 
performance regressions of unknown origin and I would like to not add to it if 
we can.

--

___
Python tracker 

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



[issue34706] Signature.from_callable sometimes drops subclassing

2020-10-09 Thread Irit Katriel


Irit Katriel  added the comment:

This seems complete, can it be closed?

--
nosy: +iritkatriel

___
Python tracker 

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



[issue41989] htmlparser unclosed script tag causes data loss

2020-10-09 Thread Waylan Limberg


New submission from Waylan Limberg :

When the `close` method of the HtmlParser is called, any cached text data is 
generally flushed and passed to a `data` event; except when in `data_mode`. 
Specifically, if an unclosed `script` or `style` tag has been encountered, a 
call to `close` does not flush the data.

A simple test which demonstrates the issue is attached.

I see that in Lib/html/parser.py#L244-L249 there are two nested if statements 
which both check for `not self.cdata_elem`. Obviously, if we got past the first 
one, that situation will never exist for the nested one. Somehow this block of 
code needs a branch for when `self.cdata_elem` is True.

I should note that the input is invalid HTML. However, the existing behavior 
results in data loss. Within any other unclosed tag (other than `script` or 
`style`) any data is still flushed and passed to a `data` event. I would expect 
the same behavior here. Although, the data escaping behavior should perhaps be 
applied as it is with data within properly closed tags.

--
components: Library (Lib)
files: test_html.py
messages: 378359
nosy: waylan
priority: normal
severity: normal
status: open
title: htmlparser unclosed script tag causes data loss
type: behavior
versions: Python 3.10, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 
3.9
Added file: https://bugs.python.org/file49505/test_html.py

___
Python tracker 

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



[issue41987] singledispatchmethod raises an error when relying on a forward declaration

2020-10-09 Thread Guido van Rossum


Guido van Rossum  added the comment:

This behavior (only relevant with `from __future__ import annotations`) has 
been around since @singledispatchmethod was introduced in 3.8, so I agree we 
should treat it as a feature request.

In the meantime, maybe a workaround is to move the register call out of the 
class? It looks a little bit ugly but probably works.

(Disclaimer: I'm not familiar with singledispatchmethod.)

--
nosy: +ethan smith

___
Python tracker 

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



[issue38153] Normalize hashing algorithm names

2020-10-09 Thread Irit Katriel


Irit Katriel  added the comment:

Can this be closed?

--
nosy: +iritkatriel

___
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-10-09 Thread Chih-Hsuan Yen


Change by Chih-Hsuan Yen :


--
nosy:  -yan12125

___
Python tracker 

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



[issue41985] Argument Clinic: add converter for file descriptor

2020-10-09 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 9975cc5008c795e069ce11e2dbed2110cc12e74e by Serhiy Storchaka in 
branch 'master':
bpo-41985: Add _PyLong_FileDescriptor_Converter and AC converter for "fildes". 
(GH-22620)
https://github.com/python/cpython/commit/9975cc5008c795e069ce11e2dbed2110cc12e74e


--

___
Python tracker 

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



[issue39679] functools: singledispatchmethod doesn't work with classmethod

2020-10-09 Thread Glyph Lefkowitz


Glyph Lefkowitz  added the comment:

I also just discovered this.  I thought it must have regressed at some point 
but I see the docs say "new in 3.8" and I'm using 3.8.

Is there a "no CI for examples in the docs" issue that this could be linked to?

--
nosy: +glyph

___
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-10-09 Thread miss-islington


miss-islington  added the comment:


New changeset b2c0a43699bd9023a69e3fa554f5488a2e17e278 by Saiyang Gou in branch 
'master':
bpo-39481: Fix duplicate SimpleQueue type in test_genericalias.py (GH-22619)
https://github.com/python/cpython/commit/b2c0a43699bd9023a69e3fa554f5488a2e17e278


--
nosy: +miss-islington

___
Python tracker 

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



[issue41985] Argument Clinic: add converter for file descriptor

2020-10-09 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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

___
Python tracker 

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



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

2020-10-09 Thread Saiyang Gou


Change by Saiyang Gou :


--
pull_requests: +21604
pull_request: https://github.com/python/cpython/pull/22624

___
Python tracker 

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



[issue41371] test_zoneinfo fails when lzma module is unavailable

2020-10-09 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Thanks @doodspav for the report and Thanks nathan for the patch. This somehow 
missed 3.9.0 but will be available in 3.9.1. I am closing the issue. Feel free 
to reopen this or a new issue to implement suggestions by Paul in msg374822.

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



[issue41371] test_zoneinfo fails when lzma module is unavailable

2020-10-09 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:


New changeset 20bdeedfb4ebd250dad9834c96cb858d83c896cb by Karthikeyan 
Singaravelan in branch '3.9':
[3.9] bpo-41371: Handle lzma lib import error in test_zoneinfo.py (GH-21734) 
(GH-22039)
https://github.com/python/cpython/commit/20bdeedfb4ebd250dad9834c96cb858d83c896cb


--

___
Python tracker 

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



[issue41980] Argparse documentation is slightly misleading

2020-10-09 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +paul.j3, rhettinger

___
Python tracker 

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



[issue40814] Update typing module documentation based on PEP 585

2020-10-09 Thread Ken Jin


Ken Jin  added the comment:

I've created a PR 22615 which partly addresses the documentation for 
GenericAlias in stdtypes.

I have a side question: should __args__, and __origin__ be documented somewhere 
as well? I noticed it has no documentation even though it's used to check 
generics. At the same time, I'm not fully sure that it's a standard Python 
thing rather than a CPython implementation detail.

--
keywords: +patch
message_count: 3.0 -> 4.0
nosy: +kj
nosy_count: 5.0 -> 6.0
pull_requests: +21605
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/22615

___
Python tracker 

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



[issue41980] Argparse documentation is slightly misleading

2020-10-09 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

That sounds likes reasonable improvement.  Would you like to submit a PR?

--

___
Python tracker 

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



[issue41974] Remove complex.__float__, complex.__floordiv__, etc

2020-10-09 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

+1 This makes sense.

--

___
Python tracker 

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



[issue41963] ConfigParser: stripping of comments should be documented

2020-10-09 Thread Jürgen Gmach

Jürgen Gmach  added the comment:

The Python wiki mentions that "writing to an INI file will wipe out all 
comments".

https://wiki.python.org/moin/ConfigParserExamples

So, when updating the docstrings, it may be a good idea to both add a note at 
the read methods, that comments get ignored and to the write method(s) that on 
writing, the possible previous existing comments get removed.

Are there any thoughts on this or should I go forward and create a pull request?

--

___
Python tracker 

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



[issue41979] PEG parser doesn't accept extended unpacking in with statement

2020-10-09 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 48f305fd122080a9181cbda33bdb42ea36a0136f by Batuhan Taskaya in 
branch 'master':
bpo-41979: Accept star-unpacking on with-item targets (GH-22611)
https://github.com/python/cpython/commit/48f305fd122080a9181cbda33bdb42ea36a0136f


--

___
Python tracker 

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



[issue41979] PEG parser doesn't accept extended unpacking in with statement

2020-10-09 Thread Batuhan Taskaya


Change by Batuhan Taskaya :


--
pull_requests: +21595
pull_request: https://github.com/python/cpython/pull/22612

___
Python tracker 

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



[issue41979] PEG parser doesn't accept extended unpacking in with statement

2020-10-09 Thread miss-islington


miss-islington  added the comment:


New changeset 42157b9eaa7f4de69a5f5f65d4403d70efa6a5c2 by Batuhan Taskaya in 
branch '3.9':
[3.9] bpo-41979: Accept star-unpacking on with-item targets (GH-22611) 
(GH-22612)
https://github.com/python/cpython/commit/42157b9eaa7f4de69a5f5f65d4403d70efa6a5c2


--
nosy: +miss-islington

___
Python tracker 

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



[issue41557] Upgrade Windows and macOS builds to use SQLite 3.33

2020-10-09 Thread Erlend Egeberg Aasland


Change by Erlend Egeberg Aasland :


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



[issue41557] Upgrade Windows and macOS builds to use SQLite 3.33

2020-10-09 Thread Erlend Egeberg Aasland


Erlend Egeberg Aasland  added the comment:

Merged to 3.10, 3.9, 3.8 on both builds. Closing this.

--

___
Python tracker 

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



[issue41979] PEG parser doesn't accept extended unpacking in with statement

2020-10-09 Thread Batuhan Taskaya


Change by Batuhan Taskaya :


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

___
Python tracker 

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



[issue41979] PEG parser doesn't accept extended unpacking in with statement

2020-10-09 Thread Batuhan Taskaya


Change by Batuhan Taskaya :


--
nosy: +BTaskaya

___
Python tracker 

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



[issue41979] PEG parser doesn't accept extended unpacking in with statement

2020-10-09 Thread Lysandros Nikolaou


Change by Lysandros Nikolaou :


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



[issue41970] test_lib2to3 fails since Python 3.9

2020-10-09 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset c6f41e62f55933f9735e9b9c103c6860685b028a by Karthikeyan 
Singaravelan in branch '3.9':
[3.9] bpo-41970: Avoid test failure in test_lib2to3 if the module is already 
imported (GH-22595) (GH-22609)
https://github.com/python/cpython/commit/c6f41e62f55933f9735e9b9c103c6860685b028a


--

___
Python tracker 

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



[issue41970] test_lib2to3 fails since Python 3.9

2020-10-09 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



[issue41981] Errors building python 3.9.0 from source

2020-10-09 Thread STINNER Victor


STINNER Victor  added the comment:

Python/strdup.c has been removed from the master branch in bpo-41340:

commit 5798f787779006a94a55ec74a86da4627de90146
Author: wasiher 
Date:   Mon Jul 27 12:28:45 2020 +0900

bpo-41340: Removed fallback implementation for strdup (GH-21634)

Your C library doesn't provide an implementation of strdup()?

--

___
Python tracker 

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



[issue41982] Wrong location flagged as syntax error

2020-10-09 Thread iljah


iljah  added the comment:

Python 3.8.5

--

___
Python tracker 

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



[issue41982] [Python 3.8] Wrong location flagged as syntax error

2020-10-09 Thread STINNER Victor


STINNER Victor  added the comment:

Python 3.9 parser seems to be more accurate. I don't think that it's worth it 
to attempt to enhance Python 3.8 error reporting, since Python 3.9 got a whole 
new parser.


@apu$ python3.8 x.py 
  File "x.py", line 4
open('file1', 'w') as file1,
 ^
SyntaxError: invalid syntax


$ python3.9 x.py 
  File "/home/vstinner/x.py", line 4
open('file1', 'w') as file1,
^
SyntaxError: invalid syntax

--
nosy: +lys.nikolaou, pablogsal, vstinner
title: Wrong location flagged as syntax error -> [Python 3.8] Wrong location 
flagged as syntax error

___
Python tracker 

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



[issue41981] Errors building python 3.9.0 from source

2020-10-09 Thread Federico Tesser

New submission from Federico Tesser :

Good afternoon.

I have some problems building python 3.9.0 from source.

Here's my configuration:

CC=/usr/local/gcc-10.2.0/bin/gcc CXX=/usr/local/gcc-10.2.0/bin/g++ 
CFLAGS="-I/usr/local/libuuid-1.0.3/include/ 
-I/usr/local/libuuid-1.0.3/include/uuid/ -I/usr/local/xz-utils-5.2.4/include/ 
-I/usr/local/bzip2-1.0.8/include/ -I/usr/local/gdbm-1.18.1/include/ 
-I/usr/local/libffi-3.3/include/ 
-I/usr/local/openssl-1.1.1d/openssl-1.1.1d/include/ 
-I/usr/local/ncurses-6.2/include/ncursestw/ 
-I/usr/local/readline-8.0/include/readline/ 
-I/usr/local/x11-7.7/libx11-1.5.0/include/ -I/usr/local/tk-8.7a3/include/ 
-I/usr/local/tcl-8.7a3/include/" CPPFLAGS="-I/usr/local/libuuid-1.0.3/include/ 
-I/usr/local/libuuid-1.0.3/include/uuid/ -I/usr/local/xz-utils-5.2.4/include/ 
-I/usr/local/bzip2-1.0.8/include/ -I/usr/local/gdbm-1.18.1/include/ 
-I/usr/local/libffi-3.3/include/ 
-I/usr/local/openssl-1.1.1d/openssl-1.1.1d/include/ 
-I/usr/local/ncurses-6.2/include/ncursestw/ 
-I/usr/local/readline-8.0/include/readline/ 
-I/usr/local/x11-7.7/libx11-1.5.0/include/ -I/usr/local/tk-8.7a3/include/ 
-I/usr/local/tcl-8.7a3/include/" LDFLAGS="-L/usr/local/libuuid-1.0.3/lib/ 
-L/usr/local/xz-utils-5.2.4/lib/ -L/usr/local/bzip2-1.0.8/lib/ 
-L/usr/local/gdbm-1.18.1/lib/ -L/usr/local/libffi-3.3/lib64/ 
-L/usr/local/openssl-1.1.1d/openssl-1.1.1d/lib/ -L/usr/local/ncurses-6.2/lib/ 
-L/usr/local/readline-8.0/lib/ -L/usr/local/x11-7.7/libx11-1.5.0/lib/ 
-L/usr/local/tk-8.7a3/lib/ -L/usr/local/tcl-8.7a3/lib/" 
PKG_CONFIG_PATH="/usr/local/libuuid-1.0.3/lib/pkgconfig/:/usr/local/xz-utils-5.2.4/lib/pkgconfig/:/usr/local/libffi-3.3/lib/pkgconfig/:/lib64/pkgconfig/:/usr/local/readline-8.0/lib/pkgconfig/:/usr/local/x11-7.7/libx11-1.5.0/lib/pkgconfig/:/usr/local/tk-8.7a3/lib/pkgconfig/:/usr/local/tcl-8.7a3/lib/pkgconfig/"
 ./configure --prefix=/usr/local/python-3.9.0/ 
--with-tcltk-includes="-I/usr/local/tcl-8.7a3/include/ 
-I/usr/local/tk-8.7a3/include/" --with-tcltk-libs="-L/usr/local/tcl-8.7a3/lib/ 
-L/usr/local/tk-8.7a3/lib/" --with-libs="-luuid -lX11 -ltcl8.7 -ltk8.7 -lpanelw 
-lbz2" --disable-ipv6 --enable-optimizations --with-lto

During the make process, I receive the following error:

Python/pytime.c: In function ‘pymonotonic’:
Python/pytime.c:907:9: error: implicit declaration of function 
‘pytime_fromtimespec’; did you mean ‘pytime_fromtimeval’? 
[-Werror=implicit-function-declaration]
  907 | if (pytime_fromtimespec(tp, , raise) < 0) {
  | ^~~
  | pytime_fromtimeval
cc1: some warnings being treated as errors

If in the Makefile I change the "-Werror=implicit-function-declaration"
as "-Wno-error=implicit-function-declaration", the building process continues, 
but then it get stuck at:

Python/strdup.c: In function ‘strdup’:
Python/strdup.c:6:16: error: ‘NULL’ undeclared (first use in this function)
6 | if (str != NULL) {
  |^~~~
Python/strdup.c:1:1: note: ‘NULL’ is defined in header ‘’; did you 
forget to ‘#include ’?

If I add the "#include " in file "Python/strdup.c:", then the process 
continues, until I receive the following error:

./Modules/getpath.c:1198:14: error: incompatible types when assigning to type 
‘PyStatus’ from type ‘int’

If I explicitly add in file "Include/internal/pycore_initconfig.h", just after 
line 25, the following 3 lines:

 .func = 0, \
 .err_msg = 0, \
 .exitcode = 0}

Addition wich does not help, because the building process stop itself again at 
the previous point.

Can you tell me where I am doing wrong?

Best regards,

Federico Tesser

--
components: Installation
messages: 378317
nosy: ftesser
priority: normal
severity: normal
status: open
title: Errors building python 3.9.0 from source
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



[issue41483] Do not acquire lock in MemoryHandler.flush() if no target defined

2020-10-09 Thread Vinay Sajip


Change by Vinay Sajip :


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



[issue41981] Errors building python 3.9.0 from source

2020-10-09 Thread STINNER Victor


STINNER Victor  added the comment:

What is your operating system? Can you please attach your pyconfig.h file?

--
nosy: +vstinner

___
Python tracker 

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



[issue41981] Errors building python 3.9.0 from source

2020-10-09 Thread STINNER Victor

STINNER Victor  added the comment:

> ./Modules/getpath.c:1198:14: error: incompatible types when assigning to type 
> ‘PyStatus’ from type ‘int’

Do you have HAVE_READLINK defined? calculate_argv0_path() calls 
resolve_symlinks() without checking if HAVE_READLINK is defined.

--

___
Python tracker 

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



[issue41981] Errors building python 3.9.0 from source

2020-10-09 Thread Federico Tesser


Federico Tesser  added the comment:

Operating System Centos 7.

Here attached the pyconfig.h.

Oddly, it seems that HAVE_READLINK is not configured.

Any suggestions?

--
Added file: https://bugs.python.org/file49500/pyconfig.h

___
Python tracker 

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



[issue41982] Wrong location flagged as syntax error

2020-10-09 Thread iljah


New submission from iljah :

File:
#! /usr/bin/env python3
with \
  open('file1', 'w') as file1,
  open('file2', 'w') as file2:

  print('ok')

gives error:
  File "./test.py", line 3
open('file1', 'w') as file1,
 ^
SyntaxError: invalid syntax

but adding \ after file1 fixes it:
  open('file1', 'w') as file1, \


Location flagged by syntax error (between as and file1) is not correct.

--
components: Interpreter Core
messages: 378321
nosy: iljah
priority: normal
severity: normal
status: open
title: Wrong location flagged as syntax error
type: behavior
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



[issue34067] Problem with contextlib.nullcontext

2020-10-09 Thread Irit Katriel


Irit Katriel  added the comment:

For the original problem, how about this?

  def process_file(file_or_path):
  if isinstance(file_or_path, str):
  # If string, open file
  cm = open
  else:
  # Caller is responsible for closing file
  cm = nullcontext

  with cm(file_or_path) as file:
  # Perform processing on the file

--
nosy: +iritkatriel

___
Python tracker 

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



[issue41981] Errors building python 3.9.0 from source on Centos 7 with GCC 10

2020-10-09 Thread Federico Tesser


Federico Tesser  added the comment:

I am sorry to have bothered you. I found the problem:

In "config.log" you can see that "/bin/ld" did not found "-lpanelw". The 
problem was that in ncurses-6.2 it was "-lpaneltw".

Pyhon has been succesfully installed, using gcc 4.8.5 toolchain, as suggested.

Best regards,

Federico Tesser

--

___
Python tracker 

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



[issue41981] Errors building python 3.9.0 from source on Centos 7 with GCC 10

2020-10-09 Thread Charalampos Stratakis


Charalampos Stratakis  added the comment:

The RHEL7 buildbots test on the default system compiler (GCC 4.8). The 
combination of RHEL7 + GCC10 + Python 3.9 could do very weird stuff, and I 
don't think it would easy to support.

Generally the build environment of an OS is tied to the default compiler 
toolchain and that involves also the various compiler and linker flags which 
might be obsoleted in newer versions.

--
nosy: +cstratak

___
Python tracker 

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



[issue41981] Errors building python 3.9.0 from source on Centos 7 with GCC 10

2020-10-09 Thread Federico Tesser


Federico Tesser  added the comment:

Same problems using gcc 4.8.5.
Attached you will find the corresponding "pyconfig.h" and "config.log"

It seems quite odd to me too

--

___
Python tracker 

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



[issue41981] Errors building python 3.9.0 from source on Centos 7 with GCC 10

2020-10-09 Thread STINNER Victor


STINNER Victor  added the comment:

config.log:

configure:11697: checking for readlink
configure:11697: gcc -pthread -(...) -lpanelw -lbz2 -lpthread -ldl  >&5
/bin/ld: cannot find -lpanelw

It seems like many tests are failing because of -lpanelw and the missing 
library.

According to config.log, you passed it explicitly to the configure command:

  $ ./configure --prefix=/usr/local/python-3.9.0/ 
--with-tcltk-includes=-I/usr/local/tcl-8.7a3/include/ 
-I/usr/local/tk-8.7a3/include/ --with-tcltk-libs=-L/usr/local/tcl-8.7a3/lib/ 
-L/usr/local/tk-8.7a3/lib/ --with-libs=-luuid -lX11 -ltcl8.7 -ltk8.7 -lpanelw 
-lbz2 --disable-ipv6 --enable-optimizations --with-lto

Try to remove -lpanelw.

--

___
Python tracker 

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



[issue41972] bytes.find consistently hangs in a particular scenario

2020-10-09 Thread Tim Peters


Tim Peters  added the comment:

The attached fastsearch.diff removes the speed hit in the original test case 
and in the constructed one.

I don't know whether it "should be" applied, and really can't make time to dig 
into it.

The rationale:  when the last characters of the pattern string and the current 
search window don't match, this is what happens:  if the "Bloom filter" can 
prove that the character one beyond the search window isn't in the pattern at 
all, the search window is advanced by len(pattern) + 1 positions. Else it's 
advanced only 1 position.

What changes here: if the Bloom filter thinks the character one beyond the 
search window may be in the pattern, this goes on to see whether the Bloom 
filter thinks the last character in the search window may be in the pattern (by 
case assumption, we already know it's not the _last_ character in the pattern). 
If not, the search window can be advanced by len(pattern) positions.

So it adds an extra check in the last-characters-don't-match and 
next-character-may-be-in-the-pattern case:  if the last character is not in the 
pattern, it's irrelevant that the next character may be - there's no possible 
overall match including the last character, so we can move the search window 
beyond it.

The question is whether this costs more than it saves overall.  It saves 
literally hours of CPU time for one search in this report's case ;-)  But 
worst-case time remains O(m*n) regardless, just somewhat harder to provoke.

--
keywords: +patch
Added file: https://bugs.python.org/file49503/fastsearch.diff

___
Python tracker 

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



[issue35790] Correct the description of sys.exc_info() and add a code example

2020-10-09 Thread Géry

Change by Géry :


--
nosy: +cheryl.sabella -eric.araujo, ezio.melotti, willingc
title: Correct a statement about sys.exc_info() values restoration -> Correct 
the description of sys.exc_info() and add a code example
type:  -> enhancement
versions: +Python 3.6, 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



[issue41981] Errors building python 3.9.0 from source on Centos 7 with GCC 10

2020-10-09 Thread STINNER Victor


STINNER Victor  added the comment:

> Operating System Centos 7.

Oh. That's surprising: there are multiple RHEL7 buildbots and there is no build 
or test issue on this OS. I would expect Centos 7 to be support, except that 
you installed GCC 10. We also tested Python 3.9 on GCC 10. Again, I would 
expect no build issue.

> Oddly, it seems that HAVE_READLINK is not configured.

It might be something wrong with your build system.

In your pyconfig.h, I see can many issues:

/* #undef HAVE_STRDUP */
/* #undef HAVE_READLINK */
/* #undef HAVE_CLOCK_GETTIME */

Please check your compiler flags. Check also config.log: please attach it to 
the issue as well.

--
title: Errors building python 3.9.0 from source -> Errors building python 3.9.0 
from source on Centos 7 with GCC 10

___
Python tracker 

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



[issue41981] Errors building python 3.9.0 from source on Centos 7 with GCC 10

2020-10-09 Thread Federico Tesser


Change by Federico Tesser :


Added file: https://bugs.python.org/file49501/pyconfig.h

___
Python tracker 

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



[issue41981] Errors building python 3.9.0 from source on Centos 7 with GCC 10

2020-10-09 Thread Federico Tesser


Federico Tesser  added the comment:

Here the "config.log"

--
Added file: https://bugs.python.org/file49502/config.log.tar.gz

___
Python tracker 

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



[issue41983] Missing Documentation AF_PACKET

2020-10-09 Thread Darnel T.


New submission from Darnel T. :

Python documentation said AF_PACKET exists, but when I looked at the python 
script it was missing on Mac and Windows. I'm currently on Windows.

--
assignee: docs@python
components: Documentation
messages: 378331
nosy: TheNuGuy, docs@python
priority: normal
severity: normal
status: open
title: Missing Documentation AF_PACKET
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