[issue45451] IDLE - modify text frame and widget borders

2021-12-01 Thread primexx


primexx  added the comment:

for what it's worth, Notepad++ is highly configurable. Here's what mine looks 
like with borders set to 0 and some sidebar items disabled. Even though it is 
the same classic theme, it looks a lot better than default.

There's the more substantial point to note that Notepad++ is not interactive, 
the need to have an extremely tight visual coupling between the margin and the 
main body on a line-per-line basis is significantly reduced. Likewise, the line 
numbers separated by a border in the IDLE editor are not really bothersome 
either, it looks natural enough. It only really sticks out in the interactive 
interpreter.

--
Added file: https://bugs.python.org/file50469/Capture.PNG

___
Python tracker 

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



[issue45959] Teach pprint about dict views

2021-12-01 Thread Raymond Hettinger


New submission from Raymond Hettinger :

The pprint() code has a number of type or protocol specific handlers but 
doesn't have one for dict views.  So, we don't get pretty printing for the 
key(), values(), and items():

d = {i:i for i in range(100)}
pprint(d) # This is handled correctly
pprint(d.keys())  # Printed on one line
pprint(d.values())# Printed on one line
pprint(d.items()) # Printed on one line

--
components: Library (Lib)
keywords: easy
messages: 407513
nosy: rhettinger
priority: normal
severity: normal
status: open
title: Teach pprint about dict views
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



[issue45958] Document typo in unpack_from()

2021-12-01 Thread Hian-Kun Tenn


Hian-Kun Tenn  added the comment:

Hi,

I didn't know that and feel sorry to bother you with the non-bug "issue."

Thank you for the quick and thoughtful reply. :-)

Hiankun

On Thu, Dec 2, 2021 at 12:23 PM Zachary Ware  wrote:

>
> Zachary Ware  added the comment:
>
> The `/` denotes that `format` is a positional-only argument; you cannot
> make a call like `struct.unpack_from(format=my_format, buffer=my_buffer)`,
> it must be `struct.unpack_from(my_format, buffer=my_buffer)` or
> `struct.unpack_from(my_format, my_buffer)`.  The same syntax can be used to
> define your own function with positional-only arguments, see
> https://docs.python.org/3/tutorial/controlflow.html#positional-only-parameters
> or
> https://docs.python.org/3/reference/compound_stmts.html#function-definitions
>
> --
> nosy: +zach.ware
> resolution:  -> not a bug
> stage:  -> resolved
> status: open -> closed
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue45958] Document typo in unpack_from()

2021-12-01 Thread Zachary Ware


Zachary Ware  added the comment:

The `/` denotes that `format` is a positional-only argument; you cannot make a 
call like `struct.unpack_from(format=my_format, buffer=my_buffer)`, it must be 
`struct.unpack_from(my_format, buffer=my_buffer)` or 
`struct.unpack_from(my_format, my_buffer)`.  The same syntax can be used to 
define your own function with positional-only arguments, see 
https://docs.python.org/3/tutorial/controlflow.html#positional-only-parameters 
or https://docs.python.org/3/reference/compound_stmts.html#function-definitions

--
nosy: +zach.ware
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



[issue45956] Add scanf regular expressions to re

2021-12-01 Thread Maxwell Bernstein


Change by Maxwell Bernstein :


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

___
Python tracker 

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



[issue45958] Document typo in unpack_from()

2021-12-01 Thread Hian-Kun Tenn


New submission from Hian-Kun Tenn :

In the document of "struct" 
(https://docs.python.org/3.9/library/struct.html#struct.unpack_from), there's 
typo in it.

The document read
`struct.unpack_from(format, /, buffer, offset=0)`
and I believe it should be
`struct.unpack_from(format, buffer, offset=0)`.

Documents before Python 3.9 has no this typo.

--
assignee: docs@python
components: Documentation
messages: 407510
nosy: docs@python, hiankun
priority: normal
severity: normal
status: open
title: Document typo in unpack_from()
type: enhancement
versions: Python 3.9

___
Python tracker 

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



[issue45956] Add scanf regular expressions to re

2021-12-01 Thread Eric V. Smith

Eric V. Smith  added the comment:

Maxwell: thank you for your contribution. 

I agree that these don’t belong in the re module.

I think a personal library or something on PyPI (logically equivalent to 
more-itertools) would be more appropriate. 

I suggest closing this as rejected.

--
nosy: +eric.smith

___
Python tracker 

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



[issue10048] urllib.request documentation confusing

2021-12-01 Thread Irit Katriel


Change by Irit Katriel :


--
resolution:  -> out of date
status: open -> pending

___
Python tracker 

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



[issue10048] urllib.request documentation confusing

2021-12-01 Thread Irit Katriel


Irit Katriel  added the comment:

Ah we already have issue40673 for removal.

--
status: pending -> open

___
Python tracker 

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



[issue10048] urllib.request documentation confusing

2021-12-01 Thread Irit Katriel


Irit Katriel  added the comment:

FancyURLopener, URLopener etc are deprecated since 3.3.

Should we close this issue or repurpose it for removal?

--
nosy: +iritkatriel
status: open -> pending

___
Python tracker 

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



[issue38760] Document for urllib.error.HTTPError.headers Should Specify What Version

2021-12-01 Thread Irit Katriel


Change by Irit Katriel :


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



[issue23183] timeit CLI best of 3: undocumented output format

2021-12-01 Thread Irit Katriel


Irit Katriel  added the comment:

The patch needs to be converted to a GitHub PR.

--
keywords: +easy -patch
nosy: +iritkatriel

___
Python tracker 

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



[issue23183] timeit CLI best of 3: undocumented output format

2021-12-01 Thread Irit Katriel


Change by Irit Katriel :


--
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.5, Python 
3.6

___
Python tracker 

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



[issue12706] timeout sentinel in ftplib and poplib documentation

2021-12-01 Thread Irit Katriel


Change by Irit Katriel :


--
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.5, Python 3.6, Python 
3.7

___
Python tracker 

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



[issue25238] Version added of context parameter for xmlrpc.client.ServerProxy incorrect

2021-12-01 Thread Irit Katriel


Irit Katriel  added the comment:

Both 3.4 and 3.5 are out of maintenance now, so this is no longer relevant.

--
nosy: +iritkatriel
resolution:  -> out of date
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



[issue37235] urljoin behavior unclear/not following RFC 3986

2021-12-01 Thread Irit Katriel


Irit Katriel  added the comment:

See also 25403, 40594.

--
nosy: +iritkatriel

___
Python tracker 

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



[issue40594] urljoin since 3.5 incorrectly filters out double slashes

2021-12-01 Thread Irit Katriel


Irit Katriel  added the comment:

See also 25403, 37235.

--
nosy: +iritkatriel

___
Python tracker 

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



[issue25403] urllib.parse.urljoin is broken in python 3.5

2021-12-01 Thread Irit Katriel


Irit Katriel  added the comment:

See also 37235, 40594.

--
nosy: +iritkatriel

___
Python tracker 

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



[issue35535] time.strptime() unexpectedly gives the same result for %U and %W for 2018

2021-12-01 Thread Irit Katriel


Change by Irit Katriel :


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



[issue25952] code_context not available in exec()

2021-12-01 Thread Irit Katriel


Irit Katriel  added the comment:

Reproduced on 3.11.

--
nosy: +iritkatriel
versions: +Python 3.11 -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



[issue35201] Recursive '**' matches non-existent directories.

2021-12-01 Thread Irit Katriel


Change by Irit Katriel :


--
resolution: not a bug -> 
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.5, Python 3.6, Python 
3.7, Python 3.8

___
Python tracker 

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



[issue45933] Illegal Instrution (Core Dumped)

2021-12-01 Thread Tom E


Tom E  added the comment:

its defos fine because ive tried it without the CFLAGS and same error

--

___
Python tracker 

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



[issue25933] Unhandled exception (TypeError) with ftplib in function retrbinary/retrlines causes inoperable behavior without crashing

2021-12-01 Thread Irit Katriel


Change by Irit Katriel :


--
keywords:  -needs review, patch
type: behavior -> enhancement
versions: +Python 3.11 -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



[issue45356] Calling `help` executes @classmethod @property decorated methods

2021-12-01 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

In Python 3.10, classmethod() added a __wrapped__ attribute.  Presumably, any 
use case for implicit chaining can now be accomplished in an explicit and 
controlled manner.

--

___
Python tracker 

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



[issue40280] Consider supporting emscripten/webassembly as a build target

2021-12-01 Thread Christian Heimes


Christian Heimes  added the comment:


New changeset 309110f37cdfc78d160ed08ae8faa6f6160ba87e by Christian Heimes in 
branch 'main':
bpo-40280: Emscripten with_ensurepip=no, second attempt (GH-29884)
https://github.com/python/cpython/commit/309110f37cdfc78d160ed08ae8faa6f6160ba87e


--

___
Python tracker 

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



[issue28375] cgi.py spam in Apache server logs

2021-12-01 Thread Irit Katriel


Irit Katriel  added the comment:

Thanks Sebastian, I'll close this and if someone still sees this problem they 
will report it.

--
resolution:  -> out of date
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



[issue45956] Add scanf regular expressions to re

2021-12-01 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

The scanf() translation table primarily serves as a way to learn regex syntax 
for people who only know scanf syntax.  

It would defeat the educational purpose to immortalize the translation as fixed 
constants.  For the most part, people are better off writing their own 
customizations, for example not using [+-] unless a sign is known to be present.

Also, the table in the docs provides a translation between scanf tokens and 
regex patterns, but it does not assign names to each pattern.  The PR adds 
names but makes confusing choices.  

For example, \S+ in regex notation means "longest sequence contiguous sequence 
of non-space characters".  In the PR, '\S+' is aliased with "whitespace" which 
is the opposite of its usual meaning.

Another problem with the new names is that they take C scanf specific 
definitions and put them in a Python context where we use the words 
differently.  For example, "octal" in scanf means "[-+]?[0-7]+" but in Python 
oct(333) would give '0o515' which includes an 'o' and does not include a '+'.

Overall, I think it would be a mistake to put C world specific aliases into 
Python world.  Instead, it would be better to just leave the table for 
education purposes as it is now.

--
assignee:  -> rhettinger
nosy: +rhettinger

___
Python tracker 

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



[issue40748] Tutorial 4.7 More on Defining Functions missing screen prompts

2021-12-01 Thread Irit Katriel


Change by Irit Katriel :


--
type:  -> behavior
versions: +Python 3.11 -Python 3.5, Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue45941] help("modules") segfaults on 3.11, MacOS

2021-12-01 Thread Irit Katriel


Irit Katriel  added the comment:

Christian - that's what it was. I uninstalled cffi and now it works.

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



[issue45957] _tkinter.TclError: expected boolean value but got ""

2021-12-01 Thread Ali Amin-Nejad


New submission from Ali Amin-Nejad :

On macOS, the following minimal example:

```
import tkinter as tk

root = tk.Tk()
button = tk.Button(root, text="Exit", command=root.destroy)
button.pack()
root.wm_overrideredirect(True)

root.mainloop()
```

yields the following stack trace:

```
Traceback (most recent call last):
  File "blah.py", line 6, in 
root.wm_overrideredirect(True)
  File "/Users/ali/miniconda3/envs/bitfount/lib/python3.8/tkinter/__init__.py", 
line 2176, in wm_overrideredirect
return self._getboolean(self.tk.call(
  File "/Users/ali/miniconda3/envs/bitfount/lib/python3.8/tkinter/__init__.py", 
line 1448, in _getboolean
return self.tk.getboolean(string)
_tkinter.TclError: expected boolean value but got ""
```

--
components: Tkinter, macOS
messages: 407494
nosy: amin-nejad, ned.deily, ronaldoussoren
priority: normal
severity: normal
status: open
title: _tkinter.TclError: expected boolean value but got ""
type: crash
versions: Python 3.8

___
Python tracker 

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



[issue45356] Calling `help` executes @classmethod @property decorated methods

2021-12-01 Thread Stephen Rosen


Stephen Rosen  added the comment:

Probably >90% of the use-cases for chaining classmethod are a read-only class 
property.
It's important enough that some tools (e.g. sphinx) even have special-cased 
support for classmethod(property(...)).

Perhaps the general case of classmethod(descriptor(...)) should be treated 
separately from the common case?

> I propose deprecating classmethod chaining.  It has become clear that it 
> doesn't really do what people wanted and can't easily be made to work.

If classmethod(property(f)) is going to be removed, can an implementation of 
classproperty be considered as a replacement?

Or perhaps support via the other ordering, property(classmethod(f))?

--
nosy: +sirosen2

___
Python tracker 

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



[issue45954] Rename PyConfig.no_debug_ranges to PyConfig.code_debug_ranges

2021-12-01 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue45889] pathlib: Path.match does not work on paths

2021-12-01 Thread Nick Papior


Nick Papior  added the comment:

Ok, I can accept a no-fix ;)

I'll close this.

--
resolution:  -> wont fix
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



[issue45956] Add scanf regular expressions to re

2021-12-01 Thread Maxwell Bernstein


Change by Maxwell Bernstein :


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

___
Python tracker 

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



[issue45956] Add scanf regular expressions to re

2021-12-01 Thread Maxwell Bernstein


New submission from Maxwell Bernstein :

The documentation for the `re` module suggests several regular expressions for 
use in simulating `scanf()`. Provide these directly in the `re` module.

--
components: Library (Lib)
messages: 407491
nosy: tekknolagi
priority: normal
severity: normal
status: open
title: Add scanf regular expressions to re
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



[issue45954] Rename PyConfig.no_debug_ranges to PyConfig.code_debug_ranges

2021-12-01 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Makes sense!

--

___
Python tracker 

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



[issue40280] Consider supporting emscripten/webassembly as a build target

2021-12-01 Thread Christian Heimes


Change by Christian Heimes :


--
pull_requests: +28110
pull_request: https://github.com/python/cpython/pull/29884

___
Python tracker 

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



[issue45953] Statically allocate interpreter states as much as possible.

2021-12-01 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



[issue42130] AsyncIO's wait_for can hide cancellation in a rare race condition

2021-12-01 Thread James Ferguson


James Ferguson  added the comment:

Echoing nmatravolgyi's comments - I got here after hitting this bug and I too 
am amazed it's been around so long and hasn't been addressed.  

It makes cancellation in my application very unreliable, and the reason I need 
well-controlled cancellation semantics is to allow emergency stop of physical 
movement.

--
nosy: +jamesf

___
Python tracker 

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



[issue45924] Incorrect traceback when future's exception is raised multiple times

2021-12-01 Thread Vishal Pandey


Vishal Pandey  added the comment:

thanks, It was my mistake, bug reproduced.

--

___
Python tracker 

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



[issue11352] Update cgi module doc

2021-12-01 Thread Vishal Pandey


Vishal Pandey  added the comment:

i am working on it. will submit a PR soon.

--
nosy: +vishalpandeyvip

___
Python tracker 

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



[issue45924] Incorrect traceback when future's exception is raised multiple times

2021-12-01 Thread Irit Katriel

Irit Katriel  added the comment:

Vishal, your output shows you’re running 3.8, not 3.10.

traceback.print_exception() used to require 3 parameters, now it can make do 
with just one. See the docs for the details.

--

___
Python tracker 

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



[issue45924] Incorrect traceback when future's exception is raised multiple times

2021-12-01 Thread Vishal Pandey


Vishal Pandey  added the comment:

hey Irit, Is this issue platform-dependent? I am on ubuntu 20.04, and running 
python 3.10. I am not getting the same error that you have mentioned below.
This is what I am getting.
###

hello ...
Traceback (most recent call last):
  File "error.py", line 17, in main
print(await fut)
TypeError: 42

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "error.py", line 21, in 
asyncio.run(main())
  File "/usr/lib/python3.8/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
  File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in 
run_until_complete
return future.result()
  File "error.py", line 19, in main
traceback.print_exception(e)
TypeError: print_exception() missing 2 required positional arguments: 'value' 
and 'tb'

###
and if I replace traceback.print_exception method with the print method, It 
runs perfectly fine, printing

hello ...
42
42
42

Can you please help me with this issue?

--
nosy: +vishalpandeyvip

___
Python tracker 

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



[issue40280] Consider supporting emscripten/webassembly as a build target

2021-12-01 Thread Christian Heimes


Christian Heimes  added the comment:


New changeset 9deb83468c56c7484645e6e3a6d0183cd6a0afd7 by Christian Heimes in 
branch 'main':
bpo-40280: Emscripten defaults to --with-ensurepip=no (GH-29873)
https://github.com/python/cpython/commit/9deb83468c56c7484645e6e3a6d0183cd6a0afd7


--

___
Python tracker 

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



[issue45953] Statically allocate interpreter states as much as possible.

2021-12-01 Thread Eric Snow


Change by Eric Snow :


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

___
Python tracker 

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



[issue30533] missing feature in inspect module: getmembers_static

2021-12-01 Thread Dino Viehland


Change by Dino Viehland :


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



[issue30533] missing feature in inspect module: getmembers_static

2021-12-01 Thread Dino Viehland


Dino Viehland  added the comment:


New changeset c2bb29ce9ae4adb6a8123285ad3585907cd4cc73 by Weipeng Hong in 
branch 'main':
bpo-30533: Add docs for `inspect.getmembers_static` (#29874)
https://github.com/python/cpython/commit/c2bb29ce9ae4adb6a8123285ad3585907cd4cc73


--

___
Python tracker 

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



[issue45955] Calling read() on HTTPError may cause KeyError in tempfile

2021-12-01 Thread Matt Martz


New submission from Matt Martz :

HTTPError may not be fully initialized in some scenarios leading to an 
inconsistent interface.  This is documented in code at:

https://github.com/python/cpython/blob/55fe1ae9708d81b902b6fe8f6590e2a24b1bd4b0/Lib/urllib/error.py#L45-L50

Unfortunately the way this is implemented creates an inconsistent interface, 
and opaque code, without a number of inline comments explaining the behavior of 
HTTPError.

Additionally, the way that it currently works, will cause a KeyError to be 
raised from tempfile, which is rather confusing.

Instead of "partially initializing" the HTTPError object, I'd propose that when 
fp is None, that we provide it with something like io.BytesIO to fulfill the 
interface.  There may be other recommended solutions, I've not thought through 
this extensively yet.

I think I just prefer always calling self.__super_init but passing in something 
like io.BytesIO if fp is None

I'm willing to create the PR once I know which direction seems to make the most 
sense.

>>> from urllib.error import HTTPError
>>> from urllib.request import HTTPDigestAuthHandler, 
>>> HTTPPasswordMgrWithDefaultRealm, build_opener
>>> passman = HTTPPasswordMgrWithDefaultRealm()
>>> passman.add_password(None, 'httpbin.org', 'user', 'wrong')
>>> opener = build_opener(HTTPDigestAuthHandler(passman))
>>> try:
... opener.open('https://httpbin.org/digest-auth/auth/user/passwd')
... except HTTPError as e:
... e.read()
...
Traceback (most recent call last):
  File "", line 2, in 
  File ".../3.10.0/lib/python3.10/urllib/request.py", line 525, in open
response = meth(req, response)
  File ".../3.10.0/lib/python3.10/urllib/request.py", line 634, in http_response
response = self.parent.error(
  File ".../3.10.0/lib/python3.10/urllib/request.py", line 557, in error
result = self._call_chain(*args)
  File ".../3.10.0/lib/python3.10/urllib/request.py", line 496, in _call_chain
result = func(*args)
  File ".../3.10.0/lib/python3.10/urllib/request.py", line 1238, in 
http_error_401
retry = self.http_error_auth_reqed('www-authenticate',
  File ".../3.10.0/lib/python3.10/urllib/request.py", line , in 
http_error_auth_reqed
raise HTTPError(req.full_url, 401, "digest auth failed",


During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "", line 4, in 
  File ".../3.10.0/lib/python3.10/tempfile.py", line 473, in __getattr__
file = self.__dict__['file']
KeyError: 'file'

--
components: Library (Lib)
messages: 407482
nosy: sivel
priority: normal
severity: normal
status: open
title: Calling read() on HTTPError may cause KeyError in tempfile
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



[issue45941] help("modules") segfaults on 3.11, MacOS

2021-12-01 Thread Christian Heimes


Christian Heimes  added the comment:

The easiest way is to remove and rebuild 3rd party software.

--

___
Python tracker 

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



[issue45941] help("modules") segfaults on 3.11, MacOS

2021-12-01 Thread Irit Katriel


Irit Katriel  added the comment:

How do I check that?

--

___
Python tracker 

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



[issue45941] help("modules") segfaults on 3.11, MacOS

2021-12-01 Thread Christian Heimes


Christian Heimes  added the comment:

This looks like an issue with 3rd party software cffi. Are you using a fresh 
build of cffi? The internal ABI of an alpha build changes very often.

--
nosy: +christian.heimes

___
Python tracker 

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



[issue45954] Rename PyConfig.no_debug_ranges to PyConfig.code_debug_ranges

2021-12-01 Thread STINNER Victor


New submission from STINNER Victor :

In the PyConfig, I tried to avoid double negative, so "no_debug_ranges" should 
be "debug_ranges". I propose to rename it to "code_debug_ranges" to make it 
more specific.

If there is an agreement on the member name, I can write a PR.

--
components: C API
messages: 407478
nosy: pablogsal, vstinner
priority: normal
severity: normal
status: open
title: Rename PyConfig.no_debug_ranges to PyConfig.code_debug_ranges
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



[issue45941] help("modules") segfaults on 3.11, MacOS

2021-12-01 Thread Irit Katriel


Irit Katriel  added the comment:

* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS 
(code=1, address=0x0)
frame #0: 0x00010015fd26 
python.exe`_PyObject_GenericGetAttrWithDict(obj=0x00013feb7a50, 
name=0x000100fe9350, dict=0x, suppress=0) at 
object.c:1305:17
   1302 PyDictValues **values_ptr = _PyObject_ValuesPointer(obj);
   1303 if (values_ptr && *values_ptr) {
   1304 if (PyUnicode_CheckExact(name)) {
-> 1305 assert(*_PyObject_DictPointer(obj) == NULL);
   1306 res = _PyObject_GetInstanceAttribute(obj, *values_ptr, 
name);
   1307 if (res != NULL) {
   1308 goto done;
Target 0: (python.exe) stopped.
(lldb) p obj
(PyObject *) $0 = 0x00013feb7a50
(lldb) p _PyObject_Dump((PyObject*)obj->ob_type)
object address  : 0x13ff25590
object refcount : 32
object type : 0x100518680
object type name: type
object repr : 
(lldb) p (PyObject*)obj->ob_type
(PyObject *) $1 = 0x00013ff25590
(lldb) p (PyObject*)obj->ob_type->tp_dict
(PyObject *) $2 = 0x00013fedd910
(lldb) p _PyObject_Dump((PyObject*)obj->ob_type->tp_dict)
object address  : 0x13fedd910
object refcount : 1
object type : 0x100511d50
object type name: dict
object repr : {'__new__': , '__getattribute__': , '__init__': , 'addressof': , 'alignof': , 'def_extern': , 'callback': , 'cast': , 'dlclose': , 
'dlopen': , 'from_buffer': 
, 'from_handle': , 'gc': , 'getctype': , 'init_once': , 'integer_const': , 
'list_types': , 'memmove': 
, 'new': , 'new_allocator': , 'new_handle': , 'offsetof': , 'release': , 'sizeof': , 'string': , 'typeof': 
, 'unpack': , 'errno': , '__doc__': None, 'NULL': , 
'error': , 'CType': , 'CData': 
, 'b
 uffer': , 'RTLD_LAZY': 1, 'RTLD_NOW': 2, 
'RTLD_GLOBAL': 8, 'RTLD_LOCAL': 4, 'RTLD_NODELETE': 128, 'RTLD_NOLOAD': 16}
(lldb) p (PyObject*)obj->ob_type->tp_dictoffset
(PyObject *) $3 = NULL



Because the tp_dictoffset is 0, _PyObject_DictPointer(obj) returns NULL and in 
the assertion, where the return value is dereferenced, it crashes.

(Note: it's not that the assertion is failing, we don't get that far).

--

___
Python tracker 

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



[issue45953] Statically allocate interpreter states as much as possible.

2021-12-01 Thread Eric Snow


New submission from Eric Snow :

Currently we allocate each new PyInterpreterState in PyInterpreterState_New().  
Furthermore, PyInterpreterState is full of pointers which are almost all 
allocated on the heap during runtime init.  We can statically allocate (and 
initialize?) most of what goes into PyInterpreterState, as well as the main 
interpreter itself (as part of _PyRuntimeState).  This includes each 
interpreter's initial PyThreadState.

TODO:

* [ ] add `PyInterpreterState main;` to _PyRuntimeState.interpreters and use it
* [ ] change references from the pointer to the value
* [ ] add `PyThreadState _main;` to PyInterpreterState.threads and use it
* [ ] change references from the pointer to the value
* [ ] change PyInterpreterState pointer fields to values (as much as possible)
* [ ] change PyThreadState pointer fields to values (as much as possible)


benefits:

* fewer possible failures (no memory) during runtime/interpreter/thread init
* improved memory locality for pointers looked up relative to 
interpreter/thread state


There is one non-trivial bit: embedding the various PyObject values in 
PyInterpreterState and PyThreadState means hard-coding the various pieces of 
the object there (e.g. for dict, its keys/values; for list, its array), as well 
as adding necessary init code to PyInterpreterState_New() and 
PyThreadState_New().  The resulting added complexity can be mitigated somewhat 
with macros or even code generation.  (In fact, there is probably significant 
overlap with Guido's deepfreeze tool.)  Regardless, we'll probably need to 
factor out init funcs for a number of object types, where currently there are 
only "Py*_New()" funcs that combine allocation and init.

--
assignee: eric.snow
components: Interpreter Core
messages: 407476
nosy: Mark.Shannon, eric.snow
priority: normal
severity: normal
stage: needs patch
status: open
title: Statically allocate interpreter states as much as possible.
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



[issue45951] Debugger cannot be resolved

2021-12-01 Thread Ben


Change by Ben :


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

___
Python tracker 

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



[issue45952] Tools/c-analyzer is out-of-date.

2021-12-01 Thread Eric Snow


Change by Eric Snow :


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



[issue45952] Tools/c-analyzer is out-of-date.

2021-12-01 Thread Eric Snow


Eric Snow  added the comment:


New changeset ee94aa0850191712e6adfc1f4a9df08ec3240195 by Eric Snow in branch 
'main':
bpo-45952: Get the C analyzer tool working again. (gh-29882)
https://github.com/python/cpython/commit/ee94aa0850191712e6adfc1f4a9df08ec3240195


--

___
Python tracker 

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



[issue45952] Tools/c-analyzer is out-of-date.

2021-12-01 Thread Eric Snow


New submission from Eric Snow :

Some relatively recent changes broke "./python Tools/c-analyzer/c-analyzer.py 
...".  Also, Tools/c-analyzer/TODO is a bit out of date.

--
assignee: eric.snow
components: Demos and Tools
messages: 407474
nosy: eric.snow
priority: normal
pull_requests: 28108
severity: normal
stage: patch review
status: open
title: Tools/c-analyzer is out-of-date.
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



[issue45951] Debugger cannot be resolved

2021-12-01 Thread Ben


New submission from Ben :

First, I am not a programmer by any stretch of the imagination, and I am just 
trying to get this error solved.

I attempted to highlight and comment out a section of code, maybe 20 lines, and 
the program froze, greyed out, and gave me a spinning wheel mouse.

I closed & reopened program, attempted with one line of code and it worked, 
attempted again with 5 lines and same issue occurred.

I have attached a screenshot of the error message and didn't seen how the 
associated error related.  

https://bugs.python.org/issue1180193

The screen was greyed out yes, but I didn't change anything or close the 
program.  I left the night before and when I attempted it this morning it 
started behaving in this manner.

--
files: Python error.png
messages: 407473
nosy: boett1
priority: normal
severity: normal
status: open
title: Debugger cannot be resolved
versions: Python 3.7
Added file: https://bugs.python.org/file50468/Python error.png

___
Python tracker 

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



[issue31196] Blank line inconsistency between InteractiveConsole and standard interpreter

2021-12-01 Thread Irit Katriel


Change by Irit Katriel :


--
versions:  -Python 3.5

___
Python tracker 

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



[issue11455] issue a warning when populating a CPython type dict with non-string keys

2021-12-01 Thread Irit Katriel


Irit Katriel  added the comment:

Reproduced on 3.11.

>>> A = type("A", (object,), {42: "abc"})
>>> dir(A())
Traceback (most recent call last):
  File "", line 1, in 
TypeError: '<' not supported between instances of 'int' and 'str'

--
nosy: +iritkatriel
type: behavior -> enhancement
versions: +Python 3.11 -Python 3.3

___
Python tracker 

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



[issue45950] Reintroduce bootstrap_python for freezing

2021-12-01 Thread Christian Heimes


Change by Christian Heimes :


--
nosy: +eric.snow, gvanrossum

___
Python tracker 

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



[issue1284670] Allow to restrict ModuleFinder to get "direct" dependencies

2021-12-01 Thread mike mcleod


mike mcleod  added the comment:

Minor fix after test.

--
Added file: https://bugs.python.org/file50467/2.html

___
Python tracker 

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



[issue1284670] Allow to restrict ModuleFinder to get "direct" dependencies

2021-12-01 Thread mike mcleod

mike mcleod  added the comment:

I have made the changes as indicated in the diff files. I have tested against 
the latest from my GitHub copy.
The result is:
./python -m test -j0
== CPython 3.11.0a2+ (heads/main:3a91617590, Dec 1 2021, 15:11:41) [GCC 11.2.0]
== Linux-5.13.0-22-generic-x86_64-with-glibc2.34 little-endian
== cwd: /home/dougal/Documents/cpython/build/test_python_300237æ
== CPU count: 8
== encodings: locale=UTF-8, FS=utf-8
...
0:01:34 load avg: 8.77 [221/430/1] test_modulefinder passed
== Tests result: FAILURE ==
409 tests OK.
1 test failed:
test_embed
20 tests skipped:
test_curses test_devpoll test_epoll test_ioctl test_kqueue
test_msilib test_ossaudiodev test_smtpnet test_socketserver
test_startfile test_tix test_tk test_ttk_guionly test_urllib2net
test_urllibnet test_winconsoleio test_winreg test_winsound
test_xmlrpc_net test_zipfile64
Total duration: 5 min 30 sec
Tests result: FAILURE

The first diff is attached. But there was a bug in the code and I will upload 
in next comment.

--
Added file: https://bugs.python.org/file50466/1.html

___
Python tracker 

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



[issue45889] pathlib: Path.match does not work on paths

2021-12-01 Thread Eric V. Smith

Eric V. Smith  added the comment:

I agree with Éric and Ronald.

--
nosy: +eric.smith

___
Python tracker 

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



[issue9226] erroneous behavior when creating classes inside a closure

2021-12-01 Thread Irit Katriel


Irit Katriel  added the comment:

Reproduced on 3.11.

--
nosy: +iritkatriel
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.6, Python 2.7, Python 
3.1, Python 3.2

___
Python tracker 

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



[issue44637] Quoting issue on header Reply-To and other address headers

2021-12-01 Thread Julien Castiaux


Change by Julien Castiaux :


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

___
Python tracker 

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



[issue45950] Reintroduce bootstrap_python for freezing

2021-12-01 Thread Christian Heimes


Change by Christian Heimes :


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

___
Python tracker 

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



[issue45950] Reintroduce bootstrap_python for freezing

2021-12-01 Thread Christian Heimes


Change by Christian Heimes :


--
assignee:  -> christian.heimes
dependencies: +"Deep-freeze": skip the marshal step by generating C code, Stop 
using bootstrap_python for deep-freeze in UNIX builds

___
Python tracker 

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



[issue45950] Reintroduce bootstrap_python for freezing

2021-12-01 Thread Christian Heimes


New submission from Christian Heimes :

bpo-45696 introduced a _bootstrap_python interpreter, which was used to create 
frozen and deepfrozen module files. bpo-45873 dropped the _bootstrap_python 
interpreter again. Instead Python used an existing Python installation to 
bootstrap the build.

After some internal discussion we agreed that the approach is flawed and puts 
too much of a burden on users. Users have to install a fairly recent Python 
interpreter in order to build 3.11. This makes it harder to build Python on 
platforms with no or a too old Python version. It also complicated things for 
container builds and pyenv.

Let's re-introduce a _bootstrap_python interpreter. Cross compiling will still 
require a build Python interpreter.

--
components: Build
messages: 407467
nosy: christian.heimes
priority: normal
severity: normal
status: open
title: Reintroduce bootstrap_python for freezing
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



[issue45949] Provide pure-Python implementation of Programs/_freeze_module for cross building

2021-12-01 Thread Eric Snow


Eric Snow  added the comment:

Ideally we would not have two scripts that do the same thing.

--

___
Python tracker 

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



[issue45949] Provide pure-Python implementation of Programs/_freeze_module for cross building

2021-12-01 Thread Eric Snow


Eric Snow  added the comment:

IIRC, Programs/_freeze_module.c was originally a C implementation of the basic 
functionality in Tools/freeze/freeze.py.

--
nosy: +eric.snow

___
Python tracker 

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



[issue31196] Blank line inconsistency between InteractiveConsole and standard interpreter

2021-12-01 Thread Malcolm Smith


Change by Malcolm Smith :


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



[issue31196] Blank line inconsistency between InteractiveConsole and standard interpreter

2021-12-01 Thread Malcolm Smith


Malcolm Smith  added the comment:

I think it's unlikely that anyone is depending on the ability to enter blank 
lines in a "try" block in an InteractiveConsole, especially when blank lines 
terminate the input in almost every other context.

Conversely, everyone who's ever entered a multi-line statement into a Python 
console knows that blank lines usually terminate the input. And they may have 
gotten into the habit, as I did, of using a blank line to abandon an incomplete 
input, and they'll be surprised if it doesn't work in this context. 

On further experimentation, this also affects "def" statements, but only when 
the blank line is at the start of the block, causing the statement to be 
syntactically incomplete.

Native interpreter:

>>> def f():
...
  File "", line 2

^
IndentationError: expected an indented block after function definition on 
line 1

InteractiveConsole:

>>> def f():
...
...
...   pass
...
>>>

So I think the current behavior is likely to annoy a much larger number of 
people, but whoever's responsible for this part of the standard library will 
have to judge that for themselves.

--

___
Python tracker 

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



[issue45476] [C API] PEP 674: Disallow using macros as l-value

2021-12-01 Thread STINNER Victor


STINNER Victor  added the comment:

Oops, sorry, pycurl-7.44.1 and PyGObject-3.42.0 are not affected, they only 
define Py_SET_TYPE() macro for backward compatibility. So right now, only 14 
projects are affected.

--

___
Python tracker 

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



[issue45896] Conflicting statements in docs about default support for asyncio subprocesses on Windows

2021-12-01 Thread Andrew Svetlov


Change by Andrew Svetlov :


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



[issue45896] Conflicting statements in docs about default support for asyncio subprocesses on Windows

2021-12-01 Thread Andrew Svetlov


Andrew Svetlov  added the comment:


New changeset e99c5e039b380199843db4e06974883d9f3ddad0 by Miss Islington (bot) 
in branch '3.10':
bpo-45896: Fix docs default asyncio event loop on Windows (GH-29857) (GH-29877)
https://github.com/python/cpython/commit/e99c5e039b380199843db4e06974883d9f3ddad0


--

___
Python tracker 

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



[issue45933] Illegal Instrution (Core Dumped)

2021-12-01 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

Is arch corei7-avx compatible with your CPU? One way to test is to leave out 
-mtune=... and -march=... when building python.

--
nosy: +ronaldoussoren

___
Python tracker 

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



[issue45896] Conflicting statements in docs about default support for asyncio subprocesses on Windows

2021-12-01 Thread Andrew Svetlov


Andrew Svetlov  added the comment:


New changeset 4203a5d1918ca874e305806b787e3c8c6fc35e3e by Miss Islington (bot) 
in branch '3.9':
bpo-45896: Fix docs default asyncio event loop on Windows (GH-29857) (GH-29878)
https://github.com/python/cpython/commit/4203a5d1918ca874e305806b787e3c8c6fc35e3e


--

___
Python tracker 

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



[issue45949] Provide pure-Python implementation of Programs/_freeze_module for cross building

2021-12-01 Thread Christian Heimes


New submission from Christian Heimes :

As of today 3.11-dev requires Programs/_freeze_module to compile Python code to 
byte code. The dependency on an extra and special tool makes cross building 
more complicated. The _freeze_module is trivial and can be easily implemented 
in pure Python code. The re-introduction of _bootstrap_python helper would 
allow us to use a pure Python freeze_module for all modules except two 
importlib bootstrap modules. I have a proof of concept implementation that 
works for me.

Proposal for standard builds:
- Use Programs/_freeze_module to create 
Python/frozen_modules/importlib._bootstrap.h and 
Python/frozen_modules/importlib._bootstrap_external.h
- build _bootstrap_python
- use new tool "./_bootstrap_python Tools/scripts/freezemodule.py" to create 
remaining Python/frozen_modules/*.h

Proposal for cross builds:
- use user-provider Python interpreter (./configure --with-build-python) to 
generate all Python/frozen_modules/*.h with new freezemodule.py tool.

When cross building the user must already provide a Python interpreter with 
same version and bytecode version as the build target. Users would no longer 
need to provide a _freeze_module binary with ./configure --with-freeze-module.

--
assignee: christian.heimes
components: Build, Cross-Build
messages: 407459
nosy: Alex.Willmer, christian.heimes, gvanrossum
priority: normal
severity: normal
status: open
title: Provide pure-Python implementation of Programs/_freeze_module for cross 
building
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



[issue45607] Make it possible to enrich an exception's error message

2021-12-01 Thread Irit Katriel


Change by Irit Katriel :


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

___
Python tracker 

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



[issue45946] RecursionError when annotating a field with the same name as a field

2021-12-01 Thread Eric V. Smith


Change by Eric V. Smith :


--
assignee:  -> eric.smith

___
Python tracker 

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



[issue45948] Unexpected instantiation behavior for xml.etree.ElementTree.XMLParser(target=None)

2021-12-01 Thread Robert Steed


New submission from Robert Steed :

Expected instantiation of xml.etree.ElementTree.XMLParser(target=None) to 
create a parser using default TreeBuilder

--
components: XML
files: XMLParserFail.py
messages: 407458
nosy: rdsteed
priority: normal
severity: normal
status: open
title: Unexpected instantiation behavior for 
xml.etree.ElementTree.XMLParser(target=None)
type: behavior
versions: Python 3.8
Added file: https://bugs.python.org/file50465/XMLParserFail.py

___
Python tracker 

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



[issue45947] Place dict (and values) pointers at a fixed (negative) offset from the base of the object.

2021-12-01 Thread Mark Shannon


Change by Mark Shannon :


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

___
Python tracker 

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



[issue45947] Place dict (and values) pointers at a fixed (negative) offset from the base of the object.

2021-12-01 Thread Mark Shannon


New submission from Mark Shannon :

To get to the dict (or values array) of an object, we currently need 3 
dependent loads.
By placing the dict at a fixed offset, this can be reduced to one.

What was `obj[obj->type->dictoffset]` becomes `obj[FIXED_OFFSET]`

See https://github.com/faster-cpython/ideas/issues/80, specifically
https://github.com/faster-cpython/ideas/issues/80#issuecomment-931504847 for 
more details.

--
assignee: Mark.Shannon
components: Interpreter Core
messages: 407457
nosy: Mark.Shannon
priority: normal
severity: normal
status: open
title: Place dict (and values) pointers at a fixed (negative) offset from the 
base of the object.
type: performance
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



[issue45476] [C API] PEP 674: Disallow using macros as l-value

2021-12-01 Thread STINNER Victor


STINNER Victor  added the comment:

I updated my ./search_pypi_top_5000.py script to ignore files generated by 
Cython.

On PyPI top 5000, I only found 16 projects impacted by the PEP 674 (16/5000 = 
0.3%):

* datatable-1.0.0
* frozendict-2.1.1
* guppy3-3.1.2
* M2Crypto-0.38.0
* mecab-python3-1.0.4
* mypy-0.910
* Naked-0.1.31
* pickle5-0.0.12
* pycurl-7.44.1
* PyGObject-3.42.0
* pysha3-1.0.2
* python-snappy-0.6.0
* recordclass-0.16.3
* scipy-1.7.3
* zodbpickle-2.2.0
* zstd-1.5.0.2

I ignored manually two false positives in 3 projects:

* "#define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size)" in Cython
* "* Py_TYPE(obj) = new_type must be replaced with Py_SET_TYPE(obj, new_type)": 
comment in psycopg2 and psycopg2-binary

--

___
Python tracker 

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



[issue45941] help("modules") segfaults on 3.11, MacOS

2021-12-01 Thread Erlend E. Aasland


Erlend E. Aasland  added the comment:

I'm unable to reproduce on macOS 11.6 as well (head at 
49444fb807ecb396462c8e5f547eeb5c6bc5d4de).

--

___
Python tracker 

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



[issue31196] Blank line inconsistency between InteractiveConsole and standard interpreter

2021-12-01 Thread Irit Katriel


Irit Katriel  added the comment:

> any difference in behavior is potentially annoying and could throw off 
> somebody's flow. So I think the InteractiveConsole should be changed to match 
> the native interpreter.


That would make InteractiveConsole more restrictive and break code that is 
currently working. It could also be annoying and throw off somebody's flow.

--

___
Python tracker 

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



[issue39529] Deprecate get_event_loop()

2021-12-01 Thread Min RK


Min RK  added the comment:

Oops, I interpreted "not deprecated by oversight" as the opposite of what you 
meant. Sorry! All clear, now.

--

___
Python tracker 

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



[issue45941] help("modules") segfaults on 3.11, MacOS

2021-12-01 Thread Erlend E. Aasland


Erlend E. Aasland  added the comment:

Also unable to reproduce with HEAD at 8a45ca542a65ea27e7acaa44a4c833a27830e796. 
Perhaps it is related to your build/dev environment?

--

___
Python tracker 

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



[issue45941] help("modules") segfaults on 3.11, MacOS

2021-12-01 Thread Irit Katriel


Irit Katriel  added the comment:

I'm using MacOS 11.6.

--

___
Python tracker 

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



[issue45941] help("modules") segfaults on 3.11, MacOS

2021-12-01 Thread Erlend E. Aasland


Erlend E. Aasland  added the comment:

Also unable to reproduce with HEAD at 49444fb807ecb396462c8e5f547eeb5c6bc5d4de.

--

___
Python tracker 

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



[issue45896] Conflicting statements in docs about default support for asyncio subprocesses on Windows

2021-12-01 Thread miss-islington


Change by miss-islington :


--
pull_requests: +28103
pull_request: https://github.com/python/cpython/pull/29878

___
Python tracker 

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



[issue45896] Conflicting statements in docs about default support for asyncio subprocesses on Windows

2021-12-01 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue45896] Conflicting statements in docs about default support for asyncio subprocesses on Windows

2021-12-01 Thread Andrew Svetlov


Andrew Svetlov  added the comment:


New changeset f27bef30438d2f07f19de91e021f34b77ccc4b20 by Rob in branch 'main':
bpo-45896: Fix docs default asyncio event loop on Windows (GH-29857)
https://github.com/python/cpython/commit/f27bef30438d2f07f19de91e021f34b77ccc4b20


--

___
Python tracker 

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



[issue39529] Deprecate get_event_loop()

2021-12-01 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Ages ago, get_event_loop() did not return the current running loop if called 
from async function context; it returned a loop instance registered with 
previous set_event_loop(...) call instead.

Later we fixed get_event_loop() behavior in 3.5.4 IIRC and added 
get_running_loop() in 3.7

set_event_loop() doesn't make sense now from my perspective.

--

___
Python tracker 

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



[issue45941] help("modules") segfaults on 3.11, MacOS

2021-12-01 Thread Erlend E. Aasland


Erlend E. Aasland  added the comment:

Unable to reproduce on macOS 12 with latest 3.11 official build, and my most 
recent dev build (HEAD at b394af13f69c1a2ac0e7d32dabf6d86443606ab2).

--
nosy: +erlendaasland

___
Python tracker 

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



[issue31196] Blank line inconsistency between InteractiveConsole and standard interpreter

2021-12-01 Thread Malcolm Smith


Malcolm Smith  added the comment:

I agree that both behaviors are reasonable. However, the InteractiveConsole 
documentation says it should "closely emulate the behavior of the interactive 
Python interpreter". Since people are familiar with the native interpreter, any 
difference in behavior is potentially annoying and could throw off somebody's 
flow. So I think the InteractiveConsole should be changed to match the native 
interpreter.

Like the native interpreter, InteractiveConsole allows other multi-line blocks 
to be terminated with a blank line:

>>> def foo(x):
...   pass
...
>>> for x in [1,2,3]:
...   pass
...
>>>


I guess the reason why "try" is different is that a "try" block isn't a 
complete statement on its own. If you follow it with an "except" block, then 
that can indeed be terminated with a blank line.

--
status: pending -> open

___
Python tracker 

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



[issue45753] Further speed up Python-to-Python calls.

2021-12-01 Thread Mark Shannon


Mark Shannon  added the comment:


New changeset 49444fb807ecb396462c8e5f547eeb5c6bc5d4de by Mark Shannon in 
branch 'main':
bpo-45753: Interpreter internal tweaks (GH-29575)
https://github.com/python/cpython/commit/49444fb807ecb396462c8e5f547eeb5c6bc5d4de


--

___
Python tracker 

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



[issue45944] Avoid calling isatty() for most open() calls

2021-12-01 Thread Eryk Sun


Eryk Sun  added the comment:

> make it returning False without invoking a system call if the file
> size is non-zero it will eliminate the need to expose _size.

I suggest using the file type instead of the size. There's no reason to call 
isatty() if it's not an S_IFCHR file. This will avoid calling isatty() on 
regular files that happen to be empty.

In Windows, isatty(fd) is based solely on the file type, which is flagged in 
the fd record when a file descriptor is opened for a native file handle. It's 
not a system call, but it's also nearly worthless for how isatty() is typically 
used, since it's true for any S_IFCHR file (e.g. con, nul, com1).

--
nosy: +eryksun

___
Python tracker 

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



  1   2   >