[issue45191] Error.__traceback__.tb_lineno is wrong

2021-10-06 Thread nahco314


Change by nahco314 :


--
pull_requests: +27098
pull_request: https://github.com/python/cpython/pull/28753

___
Python tracker 

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



[issue45387] GzipFile.write should be buffered

2021-10-06 Thread Ruben Vorderman


New submission from Ruben Vorderman :

Please consider the following code snippet:

import gzip
import sys

with gzip.open(sys.argv[1], "rt") as in_file_h:
with gzip.open(sys.argv[2], "wt", compresslevel=1) as out_file_h:
for line in in_file_h:
# Do processing on line here
modified_line = line
# End processing
out_file_h.write(modified_line)

This is very slow, due to write being called for every line. This is the 
current implementation of write:
https://github.com/python/cpython/blob/c379bc5ec9012cf66424ef3d80612cf13ec51006/Lib/gzip.py#L272

It:
- Checks if the file is not closed
- Checks if the correct mode is set
- Checks if the file is not closed (again, but in a different way)
- Checks if the data is bytes, bytearray or something that supports the buffer 
protocol
- Gets the length
- Compresses the data
- updates the size and offset
- updates the checksum

Doing this for every line written is very costly and creates a lot of overhead 
in Python calls. We spent a lot of time in Python and a lot less in the fast C 
zlib code that does the actual compression.

This problem is already solved on the read side. A _GzipReader object is used 
for reading. This is put in an io.BufferedReader which is used as the 
underlying buffer for GzipFile.read. This way, lines  are read quite fast from 
a GzipFile without the checksum etc. being updated on every line read.

A similar solution should be written for write.
I volunteer (I have done some other work on gzip.py already), although I cannot 
give an ETA at this time.

--
messages: 403289
nosy: rhpvorderman
priority: normal
severity: normal
status: open
title: GzipFile.write should be buffered

___
Python tracker 

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



[issue45387] GzipFile.write should be buffered

2021-10-06 Thread Ruben Vorderman


Change by Ruben Vorderman :


--
components: +Library (Lib)
type:  -> performance
versions: +Python 3.10, Python 3.11, 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



[issue45387] GzipFile.write should be buffered

2021-10-06 Thread Marcel Martin


Change by Marcel Martin :


--
nosy: +marcelm

___
Python tracker 

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



[issue45367] Specialize BINARY_MULTIPLY

2021-10-06 Thread Mark Shannon


Mark Shannon  added the comment:

If some misses are caused by mixed int/float operands, it might be worth 
investigating whether these occur in loops.

Most JIT compilers perform some sort of loop peeling to counter this form of 
type instability.

E.g.
x = 0
for ...
x += some_float()

`x` is an int for the first iteration, and a float for the others.


By unpeeling the first iteration, we get type stability in the loop

x = 0
#first iteration
x += some_float()
for ... #Remaining iterations
x += some_float()  # x is always a float here.

--
nosy: +Mark.Shannon

___
Python tracker 

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



[issue45388] Use JUMP_FORWARD for all forward jumps.

2021-10-06 Thread Mark Shannon


New submission from Mark Shannon :

Python has two unconditional jumps, JUMP_ABSOLUTE and JUMP_FORWARD.

The bytecode compiler should ensure that all forward jumps use JUMP_FORWARD and 
all backwards jumps use JUMP_ABSOLUTE.

That way, the interpreter will know that JUMP_ABSOLUTE jumps are backwards and 
won't need to check.

--
assignee: Mark.Shannon
components: Interpreter Core
messages: 403291
nosy: Mark.Shannon
priority: normal
severity: normal
status: open
title: Use JUMP_FORWARD for all forward jumps.
versions: Python 3.11

___
Python tracker 

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



[issue45119] test_signal.test_itimer_virtual() failed on AMD64 Fedora Rawhide: Linux kernel 5.15 regression

2021-10-06 Thread STINNER Victor


STINNER Victor  added the comment:

The fix is part of Linux kernel v5.15-rc3:
https://github.com/torvalds/linux/commit/8cd9da85d2bd87ce889043e7b1735723dd10eb89#diff-40ae7979f67be398216a482f7b3937f9847a79e626665082886fb63e898b5247

--

___
Python tracker 

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



[issue45388] Use JUMP_FORWARD for all forward jumps.

2021-10-06 Thread Mark Shannon


Change by Mark Shannon :


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

___
Python tracker 

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



[issue45389] https://docs.python.org/3/objects.inv still points to 3.9

2021-10-06 Thread gaborjbernat


Change by gaborjbernat :


--
title: https://docs.python.org/3/objects.inv still points to 3.10 -> 
https://docs.python.org/3/objects.inv still points to 3.9

___
Python tracker 

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



[issue45389] https://docs.python.org/3/objects.inv still points to 3.10

2021-10-06 Thread gaborjbernat

New submission from gaborjbernat :

https://docs.python.org/3/library/ links now to 3.10; however, the objects 
inventory does not.

❯ curl -s https://docs.python.org/3/objects.inv | head -n 3
# Sphinx inventory version 2
# Project: Python
# Version: 3.9

❯ curl -s https://docs.python.org/3.10/objects.inv | head -n 3
# Sphinx inventory version 2
# Project: Python
# Version: 3.10

--
assignee: docs@python
components: Documentation
messages: 403293
nosy: docs@python, gaborjbernat
priority: normal
severity: normal
status: open
title: https://docs.python.org/3/objects.inv still points to 3.10
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



[issue45390] asyncio.Task doesn't propagate CancelledError() exception correctly.

2021-10-06 Thread Marco Pagliaricci


New submission from Marco Pagliaricci :

I've spotted a little bug in how asyncio.CancelledError() exception is 
propagated inside an asyncio.Task.

Since python 3.9 the asyncio.Task.cancel() method has a new 'msg' parameter, 
that will create an asyncio.CancelledError(msg) exception incorporating that 
message.

The exception is successfully propagated to the coroutine the asyncio.Task is 
running, so the coroutine successfully gets raised an 
asyncio.CancelledError(msg) with the specified message in 
asyncio.Task.cancel(msg) method.

But, once the asyncio.Task is cancelled, is impossible to retrieve that 
original asyncio.CancelledError(msg) exception with the message, because it 
seems that *a new* asyncio.CancelledError() [without the message] is raised 
when asyncio.Task.result() or asyncio.Task.exception() methods are called.

I have the feeling that this is just wrong, and that the original message 
specified in asyncio.Task.cancel(msg) should be propagated even also 
asyncio.Task.result() is called.

I'm including a little snippet of code that clearly shows this bug.

I'm using python 3.9.6, in particular:
Python 3.9.6 (default, Aug 21 2021, 09:02:49) 
[GCC 10.2.1 20210110] on linux

--
components: asyncio
files: task_bug.py
messages: 403294
nosy: asvetlov, pagliaricci.m, yselivanov
priority: normal
severity: normal
status: open
title: asyncio.Task doesn't propagate CancelledError() exception correctly.
type: behavior
versions: Python 3.9
Added file: https://bugs.python.org/file50328/task_bug.py

___
Python tracker 

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



[issue45119] test_signal.test_itimer_virtual() failed on AMD64 Fedora Rawhide: Linux kernel 5.15 regression

2021-10-06 Thread STINNER Victor


STINNER Victor  added the comment:

I upgraded Fedora Rawhide machines:

* x86-64 now runs: 5.15.0-0.rc4.33.fc36.x86_64
* aarch64 now runs: 5.15.0-0.rc4.33.fc36.aarch64

I also disabled systemd-coredump:
---
$ cat /etc/sysctl.d/50-coredump.conf 
# Disable systemd-coredump
kernel.core_pattern=

$ cat /proc/sys/kernel/core_pattern 
---

core_pattern is now empty.

Previously, /run was out of available inodes because systemd-coredump created 
one file per crash in /run/systemd/propagate/.

--

___
Python tracker 

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



[issue45119] test_signal.test_itimer_virtual() failed on AMD64 Fedora Rawhide: Linux kernel 5.15 regression

2021-10-06 Thread STINNER Victor


STINNER Victor  added the comment:

And the ppc64e machine runs 5.15.0-0.rc4.33.fc36.ppc64le.

This machine was stuck at kernel 5.7, I'm not sure why. I had to regenerate the 
grub2 configuration.

Ok, all Rawhide buildbots should now run a kernel 5.15 without the 
ITIMER_VIRTUAL bug. I close the issue.

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

___
Python tracker 

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



[issue45390] asyncio.Task doesn't propagate CancelledError() exception correctly.

2021-10-06 Thread Ben


Ben  added the comment:

This seems to be present in both the Python implementation as well as the 
accelerated C _asyncio module.

It looks like that when a Task awaits a cancelled future,
the task itself is cancelled but the cancellation message is not propagated to 
the task.
https://github.com/python/cpython/blob/main/Lib/asyncio/tasks.py#L242

--
nosy: +bjs

___
Python tracker 

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



[issue45389] https://docs.python.org/3/objects.inv still points to 3.9

2021-10-06 Thread gaborjbernat


gaborjbernat  added the comment:

Could be not a CPython problem, but for reference when trying to look into the 
inventory file for 3.10 ran into https://github.com/bskinn/sphobjinv/issues/208

--

___
Python tracker 

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



[issue45371] distutil's runtime_library_dir (rpath) option doesn't work with clang

2021-10-06 Thread Christian Heimes


Change by Christian Heimes :


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

___
Python tracker 

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



[issue40116] Regression in memory use of shared key dictionaries for "compact dicts"

2021-10-06 Thread Mark Shannon


Mark Shannon  added the comment:


New changeset a7252f88d3fa33036bdd6036b8c97bc785ed6f17 by Mark Shannon in 
branch 'main':
bpo-40116: Add insertion order bit-vector to dict values to allow dicts to 
share keys more freely. (GH-28520)
https://github.com/python/cpython/commit/a7252f88d3fa33036bdd6036b8c97bc785ed6f17


--

___
Python tracker 

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



[issue45391] 3.10 objects.inv classifies UnionType as data

2021-10-06 Thread gaborjbernat

New submission from gaborjbernat :

It's a class though:

❯ sphobjinv suggest ./objects.inv UnionType
:py:data:`types.UnionType`

defined as:

UnionType = type(int | str)

--
assignee: docs@python
components: Documentation
messages: 403300
nosy: docs@python, gaborjbernat
priority: normal
severity: normal
status: open
title: 3.10 objects.inv classifies UnionType as data
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



[issue45391] 3.10 objects.inv classifies UnionType as data

2021-10-06 Thread gaborjbernat


Change by gaborjbernat :


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

___
Python tracker 

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



[issue45391] 3.10 objects.inv classifies UnionType as data

2021-10-06 Thread gaborjbernat


gaborjbernat  added the comment:

The issue with the current state this is that intersphinx fails to find 
types.UnionType in objects.inv because of leaves under the incorrect namespace 
(data vs class).

--

___
Python tracker 

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



[issue40321] urllib.request does not support HTTP response status code 308

2021-10-06 Thread Łukasz Langa

Change by Łukasz Langa :


--
nosy: +lukasz.langa
nosy_count: 5.0 -> 6.0
pull_requests: +27101
pull_request: https://github.com/python/cpython/pull/28760

___
Python tracker 

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



[issue45392] docstring of "type" could use an update

2021-10-06 Thread Mark Dickinson


New submission from Mark Dickinson :

The docstring of the "type" builtin is mildly confusing. Here's what the first 
few lines of the output for `help(type)` look like for me (on Python 3.10.0rc2):

class type(object)
 |  type(object_or_name, bases, dict)
 |  type(object) -> the object's type
 |  type(name, bases, dict) -> a new type

The first line there seems redundant, and potentially misleading, since it 
suggests that `type(object, bases, dict)` might be legal.

The third line is missing mention of possible keyword arguments.

--
messages: 403302
nosy: mark.dickinson
priority: normal
severity: normal
status: open
title: docstring of "type" could use an update

___
Python tracker 

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



[issue45372] Unwarranted "certificate has expired" when urlopen-ing R3 sites

2021-10-06 Thread Aivar Annamaa


Aivar Annamaa  added the comment:

I was not able to find out why one of my Windows box failed to update the 
certificate store, but I was able to work around this by manually installing 
https://letsencrypt.org/certs/lets-encrypt-r3.der

It looks like this is actually a Windows problem, so I'm closing this issue.

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



[issue45375] Windows assertion in out-of-tree debug build

2021-10-06 Thread Eryk Sun


Eryk Sun  added the comment:

I left a message on the PR a day ago about a one-off error in the allocation of 
`buff`. The size should be `MAXPATHLEN + 1`. That's what's used everywhere else 
in PC/getpathp.c and what gets passed in the PathCchCombineEx(buff, MAXPATHLEN 
+ 1, ...) call.

--
nosy: +eryksun
status: closed -> open

___
Python tracker 

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



[issue34804] Repetition of 'for example' in documentation

2021-10-06 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 7af95a1e8097b2aab2cbe8de88727809e745b658 by DonnaDia in branch 
'main':
bpo-34804: [doc] Rephrase section on side effects in functional.rst for clarity 
(GH-27989)
https://github.com/python/cpython/commit/7af95a1e8097b2aab2cbe8de88727809e745b658


--
nosy: +lukasz.langa

___
Python tracker 

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



[issue34804] Repetition of 'for example' in documentation

2021-10-06 Thread miss-islington


Change by miss-islington :


--
pull_requests: +27103
pull_request: https://github.com/python/cpython/pull/28763

___
Python tracker 

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



[issue34804] Repetition of 'for example' in documentation

2021-10-06 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 8.0 -> 9.0
pull_requests: +27102
pull_request: https://github.com/python/cpython/pull/28762

___
Python tracker 

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



[issue45385] Fix possible reference leak from descr_check

2021-10-06 Thread Dong-hee Na

Dong-hee Na  added the comment:

Compiler warnings from PR 28572:

Objects/descrobject.c#L183
‘res’ may be used uninitialized in this function [-Wmaybe-uninitialized]

Objects/descrobject.c#L201
‘res’ may be used uninitialized in this function [-Wmaybe-uninitialized]

Objects/descrobject.c#L217
‘res’ may be used uninitialized in this function [-Wmaybe-uninitialized]

--

___
Python tracker 

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



[issue45385] Fix reference leak from descr_check

2021-10-06 Thread Dong-hee Na


Change by Dong-hee Na :


--
title: Fix possible reference leak from descr_check -> Fix reference leak from 
descr_check

___
Python tracker 

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



[issue45371] distutil's runtime_library_dir (rpath) option doesn't work with clang

2021-10-06 Thread Filipe Laíns

Filipe Laíns  added the comment:

The fix that was merged seems a bit hacky to me -- it changes the _is_gcc check 
so that it returns True on clang.

Even though distutils is deprecated and no longer synced externally, if someone 
needs to issue a similar fix, this might trip them over.

I would recommend replacing it with [1], from the now externally maintained 
distutils module.

[1] https://github.com/pypa/distutils/pull/55

--
nosy: +FFY00

___
Python tracker 

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



[issue45391] 3.10 objects.inv classifies UnionType as data

2021-10-06 Thread Łukasz Langa

Łukasz Langa  added the comment:

On the PR you mention there's more types with this problem. Can we get a full 
list?

--
nosy: +lukasz.langa

___
Python tracker 

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



[issue45392] docstring of "type" could use an update

2021-10-06 Thread Mark Dickinson


Mark Dickinson  added the comment:

Larry: the first line was introduced in #20189. Does it still make sense to 
keep it at this point?

--
nosy: +larry

___
Python tracker 

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



[issue45391] 3.10 objects.inv classifies UnionType as data

2021-10-06 Thread gaborjbernat


gaborjbernat  added the comment:

Not easily, but, e.g. the EllipsisType is one. I would have to create some 
script which I haven't done yet. 

The best would be to create a sphinx plugin that collects entries registered in 
the doc and displays the discrepancy against the intershpinx object. This way, 
we could defend against future such issues too. I can give it a go in a few 
days if no one else wants to do so before that.

--

___
Python tracker 

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



[issue45391] 3.10 objects.inv classifies UnionType as data

2021-10-06 Thread Brian Skinn


Brian Skinn  added the comment:

If I understand the problem correctly, these mis-attributions of roles (to 
'data' instead of 'class' come about when a thing that is technically a class 
is defined in source using simple assignment, as with UnionType.

Problematic entries will thus have 'data' as role, and their identifiers will 
be camel-cased.

So, as a quick search to identify likely candidates:


>>> import re, sphobjinv as soi
>>> from pprint import pprint
>>> inv = soi.Inventory(url="https://docs.python.org/3.10/objects.inv";)

# Find entries where the first character after the final period
# is uppercase, and the second character after the final period
# is lowercase.
>>> pat = re.compile(r"([.][A-Z][a-z])[^.]*$")

>>> pprint([obj.name for obj in inv.objects if obj.role == "data" and 
>>> pat.search(obj.name)])

['_thread.LockType',
 'ast.PyCF_ALLOW_TOP_LEVEL_AWAIT',
 'ast.PyCF_ONLY_AST',
 'ast.PyCF_TYPE_COMMENTS',
 'importlib.resources.Package',
 'importlib.resources.Resource',
 'socket.SocketType',
 'types.AsyncGeneratorType',
 'types.BuiltinFunctionType',
 'types.BuiltinMethodType',
 'types.CellType',
 'types.ClassMethodDescriptorType',
 'types.CoroutineType',
 'types.EllipsisType',
 'types.FrameType',
 'types.FunctionType',
 'types.GeneratorType',
 'types.GetSetDescriptorType',
 'types.LambdaType',
 'types.MemberDescriptorType',
 'types.MethodDescriptorType',
 'types.MethodType',
 'types.MethodWrapperType',
 'types.NoneType',
 'types.NotImplementedType',
 'types.UnionType',
 'types.WrapperDescriptorType',
 'typing.Annotated',
 'typing.Any',
 'typing.AnyStr',
 'typing.Callable',
 'typing.ClassVar',
 'typing.Concatenate',
 'typing.Final',
 'typing.Literal',
 'typing.NoReturn',
 'typing.Optional',
 'typing.ParamSpecArgs',
 'typing.ParamSpecKwargs',
 'typing.Tuple',
 'typing.TypeAlias',
 'typing.TypeGuard',
 'typing.Union',
 'weakref.CallableProxyType',
 'weakref.ProxyType',
 'weakref.ProxyTypes',
 'weakref.ReferenceType']


I would guess those 'ast.PyCF...' objects can be ignored, they appear to be 
constants?

--
nosy: +bskinn

___
Python tracker 

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



[issue34804] Repetition of 'for example' in documentation

2021-10-06 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset dcdeb96495fa105098544e2be7b74fa288589912 by Miss Islington (bot) 
in branch '3.10':
bpo-34804: [doc] Rephrase section on side effects in functional.rst for clarity 
(GH-27989) (GH-28762)
https://github.com/python/cpython/commit/dcdeb96495fa105098544e2be7b74fa288589912


--

___
Python tracker 

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



[issue45392] docstring of "type" could use an update

2021-10-06 Thread Larry Hastings


Larry Hastings  added the comment:

Removing it makes sense to me.  Not sure what I was thinking, way back when.  
Thanks for catching--and volunteering to fix--this!

--

___
Python tracker 

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



[issue45391] 3.10 objects.inv classifies UnionType as data

2021-10-06 Thread Brian Skinn


Brian Skinn  added the comment:

Identifiers starting with two uppercase letters returns a HUGE list.

>>> pat2 = re.compile(r"([.][A-Z][A-Z])[^.]*$")

Filtering down by only those that contain.lower() "type":

>>> pprint([obj.name for obj in inv.objects if obj.role == "data" and 
>>> pat2.search(obj.name) and "type" in obj.name.lower()])

['errno.EPROTOTYPE',
 'locale.LC_CTYPE',
 'sqlite3.PARSE_DECLTYPES',
 'ssl.CHANNEL_BINDING_TYPES',
 'token.TYPE_COMMENT',
 'token.TYPE_IGNORE',
 'typing.TYPE_CHECKING',
 'xml.parsers.expat.XMLParserType']

Of these, only 'xml.parsers.expat.XMLParserType' seems to me a likely problem 
entry.

--

___
Python tracker 

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



[issue34804] Repetition of 'for example' in documentation

2021-10-06 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 496d1aa0b84466cc9b11f4f3b90cee93af1f393e by Miss Islington (bot) 
in branch '3.9':
bpo-34804: [doc] Rephrase section on side effects in functional.rst for clarity 
(GH-27989) (GH-28763)
https://github.com/python/cpython/commit/496d1aa0b84466cc9b11f4f3b90cee93af1f393e


--

___
Python tracker 

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



[issue45006] Add data_offset field to ZipInfo

2021-10-06 Thread Ammar Askar


Ammar Askar  added the comment:

Could you explain your use-case for this feature in a bit more detail? zipfile 
is meant to be a relatively high level library to do common tasks such as 
reading/writing/listing files.

The use case for `data_offset` proposed here seems to be relatively advanced 
and I don't see how it would be to useful for the vast majority of users.


(Without adding to the public API, I think you can achieve a pretty similar 
functionality by using the following)

compressed_data = zipfile.open(zipinfo)._read2(compressed_size)

Obviously, this relies on undocumented internals, but for a niche use case that 
might not be the worst thing: 
https://github.com/python/cpython/blob/61892c04764e1f3a659bbd09e6373687a27d36e2/Lib/zipfile.py#L1042-L1056

--
nosy: +ammar2

___
Python tracker 

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



[issue34804] Repetition of 'for example' in documentation

2021-10-06 Thread Łukasz Langa

Łukasz Langa  added the comment:

Thanks, Diana! ✨ 🍰 ✨

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

___
Python tracker 

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



[issue45391] 3.10 objects.inv classifies UnionType as data

2021-10-06 Thread gaborjbernat


gaborjbernat  added the comment:

I think Brian Skinn script is a rough approximation, but definitely entirely 
accurate. You'd have to match up what sphinx thinks per doc vs what you import 
for an accurate view.

--

___
Python tracker 

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



[issue40321] urllib.request does not support HTTP response status code 308

2021-10-06 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset f528045f695f7483d955a1eae4c1df68b1b4cacd by Łukasz Langa in 
branch 'main':
bpo-40321: Add missing test, slightly expand documentation (GH-28760)
https://github.com/python/cpython/commit/f528045f695f7483d955a1eae4c1df68b1b4cacd


--

___
Python tracker 

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



[issue40321] urllib.request does not support HTTP response status code 308

2021-10-06 Thread Łukasz Langa

Łukasz Langa  added the comment:

Senthil, we can't be backporting new APIs to bugfix versions. I took care of 
updating tests and docs (versionadded), thanks for the code review.

Thanks for the fix, Jochem! ✨ 🍰 ✨

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
type: behavior -> enhancement
versions: +Python 3.11 -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



[issue45393] help() on operator precedence has confusing entries "avait" "x" and "not" "x"

2021-10-06 Thread Max


New submission from Max :

Nobody seems to have noticed this AFAICS: 
If you type, e.g., help('+') to get help on operator precedence, the fist 
column gives a lit of operators for each row corresponding to a given 
precedence. However, the row for "not" (and similar for "await"), has the entry

"not" "x"

That looks as if there were two operators, "not" and "x". But the letter x is 
just an argument to the operator, so it should be:

 "not x"

exactly as for "+x" and "-x" and "~x" and "x[index]" and "x.attribute", where 
also x is not part of the operator but an argument.

On the corresponding web page 
https://docs.python.org/3/reference/expressions.html#operator-summary
it is displayed correctly, there are no quotes.

--
assignee: docs@python
components: Documentation
messages: 403321
nosy: MFH, docs@python
priority: normal
severity: normal
status: open
title: help() on operator precedence has confusing entries "avait" "x" and 
"not" "x"
type: enhancement
versions: Python 3.10, Python 3.11, 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



[issue45393] help() on operator precedence has confusing entries "await" "x" and "not" "x"

2021-10-06 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
title: help() on operator precedence has confusing entries "avait" "x" and 
"not" "x" -> help() on operator precedence has confusing entries "await" "x" 
and "not" "x"
versions:  -Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue45375] Windows assertion in out-of-tree debug build

2021-10-06 Thread Steve Dower


Steve Dower  added the comment:

Thanks for mentioning it! New PR to fix

--
priority: release blocker -> high

___
Python tracker 

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



[issue45375] Windows assertion in out-of-tree debug build

2021-10-06 Thread Steve Dower


Change by Steve Dower :


--
pull_requests: +27104
stage: resolved -> patch review
pull_request: https://github.com/python/cpython/pull/28764

___
Python tracker 

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



[issue45386] xmlrpc.client unimportable due to strfmt ValueError

2021-10-06 Thread Rodrigo


Change by Rodrigo :


--
keywords: +patch
nosy: +rtobar
nosy_count: 1.0 -> 2.0
pull_requests: +27105
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28765

___
Python tracker 

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



[issue45020] Freeze all modules imported during startup.

2021-10-06 Thread Larry Hastings


Larry Hastings  added the comment:

Nope.  On Windows, os.path is "ntpath".

--

___
Python tracker 

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



[issue45328] http.client.HTTPConnection doesn't work without TCP_NODELAY

2021-10-06 Thread Łukasz Langa

Change by Łukasz Langa :


--
versions: +Python 3.11, Python 3.9

___
Python tracker 

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



[issue43669] PEP 644: Require OpenSSL 1.1.1 or newer

2021-10-06 Thread Illia Volochii


Change by Illia Volochii :


--
nosy: +illia-v
nosy_count: 3.0 -> 4.0
pull_requests: +27106
pull_request: https://github.com/python/cpython/pull/28768

___
Python tracker 

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



[issue45020] Freeze all modules imported during startup.

2021-10-06 Thread Eric Snow


Eric Snow  added the comment:

On Tue, Oct 5, 2021 at 11:31 AM Guido van Rossum  wrote:
> Whoa. os.path is not always an alias for posixpath, is it?

Steve brought this to my attention a couple weeks ago.  Bottom line:
the frozen module entry is only there for checks, not for actual
import, but should probably be removed regardless.  See
https://bugs.python.org/issue45272.

--

___
Python tracker 

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



[issue45394] pip install numpy not working in 3.11.0a on macOS 11.6

2021-10-06 Thread Christian Heimes


Christian Heimes  added the comment:

Please open a bug with NumPy. The expression

Py_TYPE(&new_fields) = NULL;

is no longer valid. NumPy has to use new Py_SET_TYPE() API to modify the type 
field.

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



[issue45272] 'os.path' should not be a frozen module

2021-10-06 Thread Guido van Rossum


Guido van Rossum  added the comment:

I'm trying to understand the proposed solution, "have _imp.is_frozen() check 
the module in sys.modules." Does that mean it would do a dict lookup first? 
Maybe you should do that in the caller instead? importlib/_bootstrap.py calls 
it a few times, but I'm not convinced that all call sites can be called with 
"os.path" -- do you know which path was taken when this failed?

I worry about the complexity of the importlib bootstrapping mechanism. Grepping 
through the source for _bootstrap and _bootstrap_external has not given me any 
understanding of how this works. Do you know if there are docs for this? Or do 
we just need to ask Brett?

--
nosy: +gvanrossum

___
Python tracker 

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



[issue45328] http.client.HTTPConnection doesn't work without TCP_NODELAY

2021-10-06 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 0571b934f5f9198c3461a7b631d7073ac0a5676f by rtobar in branch 
'main':
bpo-45328: Avoid failure in OSs without TCP_NODELAY support (GH-28646)
https://github.com/python/cpython/commit/0571b934f5f9198c3461a7b631d7073ac0a5676f


--
nosy: +lukasz.langa

___
Python tracker 

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



[issue45328] http.client.HTTPConnection doesn't work without TCP_NODELAY

2021-10-06 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue45328] http.client.HTTPConnection doesn't work without TCP_NODELAY

2021-10-06 Thread miss-islington


Change by miss-islington :


--
pull_requests: +27108
pull_request: https://github.com/python/cpython/pull/28771

___
Python tracker 

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



[issue45328] http.client.HTTPConnection doesn't work without TCP_NODELAY

2021-10-06 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 4c35a2aa80d7f55573d83651883d8733fac01e31 by Miss Islington (bot) 
in branch '3.10':
bpo-45328: Avoid failure in OSs without TCP_NODELAY support (GH-28646) 
(GH-28771)
https://github.com/python/cpython/commit/4c35a2aa80d7f55573d83651883d8733fac01e31


--

___
Python tracker 

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



[issue45328] http.client.HTTPConnection doesn't work without TCP_NODELAY

2021-10-06 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 92018a08240308c5beef9ccc712bef5c2e582926 by Miss Islington (bot) 
in branch '3.9':
bpo-45328: Avoid failure in OSs without TCP_NODELAY support (GH-28646) 
(GH-28770)
https://github.com/python/cpython/commit/92018a08240308c5beef9ccc712bef5c2e582926


--

___
Python tracker 

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



[issue45328] http.client.HTTPConnection doesn't work without TCP_NODELAY

2021-10-06 Thread Łukasz Langa

Łukasz Langa  added the comment:

Thanks, rtobar! ✨ 🍰 ✨

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



[issue45272] 'os.path' should not be a frozen module

2021-10-06 Thread Eric Snow


Eric Snow  added the comment:

On Wed, Oct 6, 2021 at 11:38 AM Guido van Rossum  wrote:
> I'm trying to understand the proposed solution, "have _imp.is_frozen() check 
> the module in sys.modules." Does that mean it would do a dict lookup first?

Correct.  We'd look up the module in sys.modules and, if there, check its 
loader.

> Maybe you should do that in the caller instead? importlib/_bootstrap.py calls 
> it a few times, but I'm not convinced that all call sites can be called with 
> "os.path" -- do you know which path was taken when this failed?

Good point.  The only place where it matters is the FrozenImporter methods that 
are wrapped with _requires_frozen().  So the fix can go there instead of 
_imp.is_frozen().

> I worry about the complexity of the importlib bootstrapping mechanism. 
> Grepping through the source for _bootstrap and _bootstrap_external has not 
> given me any understanding of how this works. Do you know if there are docs 
> for this? Or do we just need to ask Brett?

Are you talking about the use of _imp.is_frozen() or do you mean the code in 
_bootstrap.py (and _bootstrap_external.py) as a whole?  I don't believe there's 
any official documentation about the implementation in _bootstrap.py.  At best 
there have been some PyCon talks about how the import system works (but 
probably not at the level of the implementation) and Brett may have a blog post 
or two.  Keep in mind that I'm quite familiar with the importlib code, though 
Brett is definitely the mastermind behind the overall implementation.

--

___
Python tracker 

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



[issue45375] Windows assertion in out-of-tree debug build

2021-10-06 Thread Steve Dower


Change by Steve Dower :


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



[issue45375] Windows assertion in out-of-tree debug build

2021-10-06 Thread Steve Dower


Steve Dower  added the comment:


New changeset 6c942a86a4fb4c8b731cb1bd2933dba554eb79cd by Steve Dower in branch 
'main':
bpo-45375: Fix off by one error in buffer allocation (GH-28764)
https://github.com/python/cpython/commit/6c942a86a4fb4c8b731cb1bd2933dba554eb79cd


--

___
Python tracker 

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



[issue35970] no help flag in base64 util

2021-10-06 Thread Ammar Askar


Change by Ammar Askar :


--
keywords: +patch
nosy: +ammar2
nosy_count: 1.0 -> 2.0
pull_requests: +27109
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28774

___
Python tracker 

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



[issue45272] 'os.path' should not be a frozen module

2021-10-06 Thread Guido van Rossum


Guido van Rossum  added the comment:

It was a comment about my general lack of understanding of how the importlib 
bootstrap process works. I should probably start reading the docstrings before 
complaining more. :-)

--

___
Python tracker 

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



[issue45395] Frozen stdlib modules are discarded if custom frozen modules added.

2021-10-06 Thread Eric Snow


New submission from Eric Snow :

The mechanism to add custom frozen modules to the Python runtime is to set 
PyImport_FrozenModules (see Python/frozen.c) to some new array.  This means 
that the default frozen modules (from _PyImport_FrozenModules) are no longer 
used unless explicitly added to the custom array.  This is unlikely to be what 
the user wants.  It's especially problematic since it's easy to not realize 
this (or forget) and forgetting essential modules (like _frozen_importlib) will 
cause crashes.

It would probably make more sense to have PyImport_FrozenModules be an array of 
*additional* frozen modules, defaulting to an empty array.  Before going down 
that route we need to be sure that isn't going to break folks that are 
accommodating the existing behavior.

--
components: Interpreter Core
messages: 403335
nosy: brett.cannon, eric.snow, lemburg
priority: normal
severity: normal
stage: needs patch
status: open
title: Frozen stdlib modules are discarded if custom frozen modules added.
type: behavior
versions: Python 3.11

___
Python tracker 

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



[issue45394] pip install numpy not working in 3.11.0a on macOS 11.6

2021-10-06 Thread Joshua

New submission from Joshua :

pip3.11 install numpy failed on a fresh install of python 3.11.0a on macOS 11.6.



pip3.11 install numpy
Collecting numpy
  Downloading numpy-1.21.1.zip (10.3 MB)
 || 10.3 MB 14.1 MB/s 
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Building wheels for collected packages: numpy
  Building wheel for numpy (PEP 517) ... error
  ERROR: Command errored out with exit status 1:
   command: /Library/Frameworks/Python.framework/Versions/3.11/bin/python3.11 
/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pip/_vendor/pep517/in_process/_in_process.py
 build_wheel /var/folders/js/z0nzng056v5b32z5_jfxwj_rgn/T/tmpiixoj1ei
   cwd: 
/private/var/folders/js/z0nzng056v5b32z5_jfxwj_rgn/T/pip-install-bqxq7z4_/numpy_7a95a59cf3dd4798b2039e070138356e
  Complete output (936 lines):
  setup.py:63: RuntimeWarning: NumPy 1.21.1 may not yet support Python 3.11.
warnings.warn(
  Running from numpy source directory.
  
/private/var/folders/js/z0nzng056v5b32z5_jfxwj_rgn/T/pip-install-bqxq7z4_/numpy_7a95a59cf3dd4798b2039e070138356e/tools/cythonize.py:69:
 DeprecationWarning: The distutils package is deprecated and slated for removal 
in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
from distutils.version import LooseVersion
  Processing numpy/random/_bounded_integers.pxd.in
  Processing numpy/random/_philox.pyx
  Processing numpy/random/_bounded_integers.pyx.in
  Processing numpy/random/_sfc64.pyx
  Processing numpy/random/_mt19937.pyx
  Processing numpy/random/bit_generator.pyx
  Processing numpy/random/mtrand.pyx
  Processing numpy/random/_generator.pyx
  Processing numpy/random/_pcg64.pyx
  Processing numpy/random/_common.pyx
  Cythonizing sources
  blas_opt_info:
  blas_mkl_info:
  customize UnixCCompiler
libraries mkl_rt not found in 
['/Library/Frameworks/Python.framework/Versions/3.11/lib', '/usr/local/lib', 
'/usr/lib']
NOT AVAILABLE
  
  blis_info:
libraries blis not found in 
['/Library/Frameworks/Python.framework/Versions/3.11/lib', '/usr/local/lib', 
'/usr/lib']
NOT AVAILABLE
  
  openblas_info:
libraries openblas not found in 
['/Library/Frameworks/Python.framework/Versions/3.11/lib', '/usr/local/lib', 
'/usr/lib']
NOT AVAILABLE
  
  accelerate_info:
libraries accelerate not found in 
['/Library/Frameworks/Python.framework/Versions/3.11/lib', '/usr/local/lib', 
'/usr/lib']
  Library accelerate was not found. Ignoring
libraries veclib not found in 
['/Library/Frameworks/Python.framework/Versions/3.11/lib', '/usr/local/lib', 
'/usr/lib']
  Library veclib was not found. Ignoring
FOUND:
  extra_compile_args = ['-msse3', 
'-I/System/Library/Frameworks/vecLib.framework/Headers']
  extra_link_args = ['-Wl,-framework', '-Wl,Accelerate']
  define_macros = [('NO_ATLAS_INFO', 3), ('HAVE_CBLAS', None)]
  
FOUND:
  extra_compile_args = ['-msse3', 
'-I/System/Library/Frameworks/vecLib.framework/Headers']
  extra_link_args = ['-Wl,-framework', '-Wl,Accelerate']
  define_macros = [('NO_ATLAS_INFO', 3), ('HAVE_CBLAS', None)]
  
  non-existing path in 'numpy/distutils': 'site.cfg'
  lapack_opt_info:
  lapack_mkl_info:
libraries mkl_rt not found in 
['/Library/Frameworks/Python.framework/Versions/3.11/lib', '/usr/local/lib', 
'/usr/lib']
NOT AVAILABLE
  
  openblas_lapack_info:
libraries openblas not found in 
['/Library/Frameworks/Python.framework/Versions/3.11/lib', '/usr/local/lib', 
'/usr/lib']
NOT AVAILABLE
  
  openblas_clapack_info:
libraries openblas,lapack not found in 
['/Library/Frameworks/Python.framework/Versions/3.11/lib', '/usr/local/lib', 
'/usr/lib']
NOT AVAILABLE
  
  flame_info:
libraries flame not found in 
['/Library/Frameworks/Python.framework/Versions/3.11/lib', '/usr/local/lib', 
'/usr/lib']
NOT AVAILABLE
  
FOUND:
  extra_compile_args = ['-msse3', 
'-I/System/Library/Frameworks/vecLib.framework/Headers']
  extra_link_args = ['-Wl,-framework', '-Wl,Accelerate']
  define_macros = [('NO_ATLAS_INFO', 3), ('HAVE_CBLAS', None)]
  
  Warning: attempted relative import with no known parent package
  
/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/distutils/dist.py:274:
 UserWarning: Unknown distribution option: 'define_macros'
warnings.warn(msg)
  running bdist_wheel
  running build
  running config_cc
  unifing config_cc, config, build_clib, build_ext, build commands --compiler 
options
  running config_fc
  unifing config_fc, config, build_clib, build_ext, build commands --fcompiler 
options
  running build_src
  build_src
  building py_modules sources
  creating build
  creating build/src.macosx-10.9-universal2-3.11
  creating build/src.macosx-10.9-universal2-3.11/numpy
  creating build/src.macosx-10.9-universal2-3.11/numpy/distutils
  building library "npymath" sou

[issue45396] Custom frozen modules get ignored.

2021-10-06 Thread Eric Snow


New submission from Eric Snow :

Recently we added the "-X frozen_modules" CLI option to control whether or not 
(non-essential) frozen modules get used.  Currently the default is "off", 
though the plan is to make the default "on".  Regardless, this is problematic 
for executables with custom frozen modules (where PyImport_FrozenModules is 
overridden).  If there are custom frozen modules then they should always be 
used.

Note that there are already other problems with custom frozen modules, to be 
addressed separately.  (See bpo-45395.)

--
assignee: eric.snow
components: Interpreter Core
messages: 403336
nosy: brett.cannon, eric.snow
priority: normal
severity: normal
stage: needs patch
status: open
title: Custom frozen modules get ignored.
type: behavior
versions: Python 3.11

___
Python tracker 

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



[issue45396] Custom frozen modules get ignored.

2021-10-06 Thread Eric Snow


Eric Snow  added the comment:

(This was motivated by 
https://github.com/python/cpython/pull/28633#discussion_r720506225.)

--

___
Python tracker 

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



[issue45396] Custom frozen modules get ignored.

2021-10-06 Thread Eric Snow


Change by Eric Snow :


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

___
Python tracker 

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



[issue45393] help() on operator precedence has confusing entries "await" "x" and "not" "x"

2021-10-06 Thread Max


Max  added the comment:

Thanks for fixing the typo, didn't knnow how to do that when I spotted it (I'm 
new to this). 
You also removed Python version 3.6, 3.7, 3.8, however, I just tested on 
pythonanywhere,
>>> sys.version
'3.7.0 (default, Aug 22 2018, 20:50:05) \n[GCC 5.4.0 20160609]'
So I can confirm that the bug *is* there on 3.7 (so I put this back in the list 
- unless it was removed in a later 3.7.x (to you mean that?) and put back in 
later versions...?)
It is also on the Python 3.9.7 I'm running on my laptop, so I'd greatly be 
surprised if it were not present on the other two versions you also removed.

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



[issue38902] image/webp support in mimetypes

2021-10-06 Thread Leo Antunes


Change by Leo Antunes :


--
nosy: +costela

___
Python tracker 

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



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

2021-10-06 Thread Ammar Askar


Change by Ammar Askar :


--
pull_requests: +27111
pull_request: https://github.com/python/cpython/pull/28777

___
Python tracker 

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



[issue45395] Frozen stdlib modules are discarded if custom frozen modules added.

2021-10-06 Thread Eric Snow


Change by Eric Snow :


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

___
Python tracker 

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



[issue45395] Frozen stdlib modules are discarded if custom frozen modules added.

2021-10-06 Thread Eric Snow


Eric Snow  added the comment:

I've posted a PR that demonstrates a reasonable solution.

--

___
Python tracker 

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



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

2021-10-06 Thread miss-islington


miss-islington  added the comment:


New changeset db72e58ea5940c3942ede9f70cb897510b52fc36 by Ammar Askar in branch 
'main':
bpo-29505: Add fuzzer for ast.literal_eval (GH-28777)
https://github.com/python/cpython/commit/db72e58ea5940c3942ede9f70cb897510b52fc36


--

___
Python tracker 

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



[issue45389] https://docs.python.org/3/objects.inv still points to 3.9

2021-10-06 Thread Ned Deily


Change by Ned Deily :


--
assignee: docs@python -> mdk
nosy: +mdk

___
Python tracker 

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



[issue45393] help() on operator precedence has confusing entries "await" "x" and "not" "x"

2021-10-06 Thread Vedran Čačić

Vedran Čačić  added the comment:

I guess those old versions were removed because they are "frozen", that is, not 
receiving doc fixes anymore.

--
nosy: +veky

___
Python tracker 

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



[issue45385] Fix reference leak from descr_check

2021-10-06 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue45385] Fix reference leak from descr_check

2021-10-06 Thread Dong-hee Na


Dong-hee Na  added the comment:


New changeset e6ff4eba6da9b64aed235ba8d730b5645f71955c by Dong-hee Na in branch 
'main':
bpo-45385: Fix reference leak from descr_check (#28719)
https://github.com/python/cpython/commit/e6ff4eba6da9b64aed235ba8d730b5645f71955c


--

___
Python tracker 

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



[issue45391] 3.10 objects.inv classifies UnionType as data

2021-10-06 Thread gaborjbernat


gaborjbernat  added the comment:

Here's a gist where I managed to detect roughly 140 errors (some looks like 
potential false positive, so likely the real number is more around 100):

https://gist.github.com/gaborbernat/5360badab2125b3f81a3bcbce0e94c2a#file-found_issues-output-L1

This does make a few concessions:
- ignores the difference between function and method; way to many functions are 
documented as methods and vice-versa to disallow this (or would be a major 
overhaul)
- 
https://docs.python.org/3/c-api/structures.html?highlight=meth_class#METH_VARARGS
 is documented under python domain but IMHO should be C
- 
https://docs.python.org/3/c-api/typeobj.html?highlight=py_tpflags_base_exc_subclass#c.PyTypeObject.tp_flags
 is documented under python domain but IMHO should be C
- does not clarifies where to type classes goes - they seem to be a weird 
in-between a method and a class, satisfying neither - see related discussion on 
topic from https://bugs.python.org/issue41973

--

___
Python tracker 

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



[issue45385] Fix reference leak from descr_check

2021-10-06 Thread Dong-hee Na


Change by Dong-hee Na :


--
pull_requests: +27114
pull_request: https://github.com/python/cpython/pull/28780

___
Python tracker 

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



[issue35970] no help flag in base64 util

2021-10-06 Thread miss-islington


miss-islington  added the comment:


New changeset 5baec4aea6821256f5d1785a6bd596fab069f1b6 by Ammar Askar in branch 
'main':
bpo-35970: Add help flag to base64 module (GH-28774)
https://github.com/python/cpython/commit/5baec4aea6821256f5d1785a6bd596fab069f1b6


--
nosy: +miss-islington

___
Python tracker 

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



[issue35970] no help flag in base64 util

2021-10-06 Thread Ammar Askar


Change by Ammar Askar :


--
components: +Library (Lib)
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
type:  -> enhancement
versions: +Python 3.11

___
Python tracker 

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



[issue45385] Fix reference leak from descr_check

2021-10-06 Thread Dong-hee Na


Dong-hee Na  added the comment:


New changeset 660718dba57624720c2a9832f10f29ace59c77cf by Dong-hee Na in branch 
'3.9':
[3.9] bpo-45385: Fix reference leak from descr_check (GH-28719) (GH-28780)
https://github.com/python/cpython/commit/660718dba57624720c2a9832f10f29ace59c77cf


--

___
Python tracker 

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



[issue45316] [C API] Functions not exported with PyAPI_FUNC()

2021-10-06 Thread Hai Shi


Change by Hai Shi :


--
nosy: +shihai1991

___
Python tracker 

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



[issue45385] Fix reference leak from descr_check

2021-10-06 Thread Dong-hee Na


Change by Dong-hee Na :


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

___
Python tracker 

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



[issue45103] IDLE: make configdialog font page survive font failures

2021-10-06 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

A similar report, 
https://stackoverflow.com/questions/69466716/python-3-10-idle-does-not-respond-everytime-i-hit-configure-idle-from-options
but with FiraCode font https://github.com/tonsky/FiraCode.  The compatibility 
list includes IDLE as 'does not work' along with some other editors.

--
assignee:  -> terry.reedy
components: +IDLE

___
Python tracker 

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



[issue40418] Small Refactoring: Use bytes.hex() in secrets.token_hex()

2021-10-06 Thread Dennis Sweeney


Change by Dennis Sweeney :


--
resolution:  -> not a bug
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



[issue41682] [Windows] test_asyncio: Proactor test_sendfile_close_peer_in_the_middle_of_receiving failure

2021-10-06 Thread Dennis Sweeney


Change by Dennis Sweeney :


--
pull_requests:  -27076

___
Python tracker 

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



[issue45315] `PyType_FromSpec` does not copy the name

2021-10-06 Thread Hai Shi


Hai Shi  added the comment:

> the simplest solution is calling `type_set_name`, even if that runs some 
> unnecessary checks.

Hm, I haven't find any case who use dynamical tp_name of Type_Spec temporarily.
If we meet this user case, Adding a new object pointer of type name in is an 
other option maybe:)

--
nosy: +petr.viktorin, shihai1991

___
Python tracker 

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



[issue45397] Doc for turtle.write missing the tuple part of the font param in 3.10+

2021-10-06 Thread jg


New submission from jg :

In the version 3.10 and 3.11 python turtle doc, the turtle.write line shows 
font without it's tuple parenthesis. Something change in 3.10 that makes it 
look like font='Arial' and 8 and 'normal' are 3 separate parameters, when it 
should be one tuple parameter font=(x,y,z).

Ex. of wrong entry 
(URL=https://docs.python.org/3.11/library/turtle.html#turtle.write)
line=turtle.write(arg, move=False, align='left', font='Arial', 8, 'normal')

Ex. of correct entry 
(https://docs.python.org/3.9/library/turtle.html#turtle.write)
line=turtle.write(arg, move=False, align="left", font=("Arial", 8, "normal"))

--
assignee: docs@python
components: Documentation
messages: 403348
nosy: docs@python, jggammon
priority: normal
severity: normal
status: open
title: Doc for turtle.write missing the tuple part of the font param in 3.10+
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



[issue29410] Moving to SipHash-1-3

2021-10-06 Thread Guido van Rossum


Change by Guido van Rossum :


--
nosy: +gvanrossum

___
Python tracker 

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



[issue29410] Moving to SipHash-1-3

2021-10-06 Thread Guido van Rossum


Guido van Rossum  added the comment:

Worth revisiting?

--

___
Python tracker 

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



[issue45397] Doc for turtle.write missing the tuple part of the font param in 3.10+

2021-10-06 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

This looks like some Sphinx bug.

In Python 3.8, using Sphinx:

>>> from sphinx.pycode import ast
>>> ast.unparse(ast.parse("('Arial', 8, 'normal')", 'eval').body)
"'Arial', 8, 'normal'"

For comparison, using builtin ast module in Python 3.9:

>>> import ast
>>> ast.unparse(ast.parse("('Arial', 8, 'normal')", 'eval').body)
"('Arial', 8, 'normal')"

--
nosy: +georg.brandl, serhiy.storchaka
type:  -> behavior
versions: +Python 3.11

___
Python tracker 

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



[issue45390] asyncio.Task doesn't propagate CancelledError() exception correctly.

2021-10-06 Thread Chris Jerdonek


Chris Jerdonek  added the comment:

> But, once the asyncio.Task is cancelled, is impossible to retrieve that 
> original asyncio.CancelledError(msg) exception with the message, because it 
> seems that *a new* asyncio.CancelledError() [without the message] is raised 
> when asyncio.Task.result() or asyncio.Task.exception() methods are called.

You say it's "impossible", but isn't the message accessible via the exception 
chain (and visible in the traceback)? One benefit of not duplicating the 
message on the internal call to cancel() is that it makes it easier to pinpoint 
which CancelledError object is associated with the user's call to cancel(), and 
which is associated with the call done by asyncio internals, which is a 
different cancellation. Another benefit is that it prevents info from being 
duplicated in the traceback.

--
nosy: +chris.jerdonek

___
Python tracker 

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



[issue45397] Doc for turtle.write missing the tuple part of the font param in 3.10+

2021-10-06 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Seems it was fixed in Sphinx a year ago: 
https://github.com/sphinx-doc/sphinx/pull/8265. Maybe we need to update the 
Sphinx version (but it can introduce new incompatibilities).

--

___
Python tracker 

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