[issue32658] Metacharacter (\) documentation suggestion

2022-03-28 Thread Stanley


Stanley  added the comment:

Mike, are you still working on this issue?

--
nosy: +slateny

___
Python tracker 

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



[issue28516] contextlib.ExitStack.__enter__ has trivial but undocumented behavior

2022-03-28 Thread Jelle Zijlstra


Jelle Zijlstra  added the comment:

Thanks for the patch!

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



[issue28516] contextlib.ExitStack.__enter__ has trivial but undocumented behavior

2022-03-28 Thread Jelle Zijlstra


Jelle Zijlstra  added the comment:


New changeset 604d003ab4d1084ef828ebca1b28f2bf1b93c744 by Jelle Zijlstra in 
branch '3.10':
[3.10] bpo-28516: document contextlib.ExitStack.__enter__ behavior (GH-31636) 
(GH-32171)
https://github.com/python/cpython/commit/604d003ab4d1084ef828ebca1b28f2bf1b93c744


--

___
Python tracker 

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



[issue39971] [doc] Error in functional how-to example

2022-03-28 Thread Stanley


Change by Stanley :


--
keywords: +patch
nosy: +slateny
nosy_count: 4.0 -> 5.0
pull_requests: +30250
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/32172

___
Python tracker 

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



[issue28516] contextlib.ExitStack.__enter__ has trivial but undocumented behavior

2022-03-28 Thread Jelle Zijlstra


Change by Jelle Zijlstra :


--
pull_requests: +30249
pull_request: https://github.com/python/cpython/pull/32171

___
Python tracker 

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



Re: Set tkinter top-level window to "always on visible workspace"

2022-03-28 Thread Cameron Simpson
On 29Mar2022 13:02, Cameron Simpson  wrote:
>On 28Mar2022 20:47, Skip Montanaro  wrote:
>>I'm struggling to get the outermost window (not sure what's going on),
>>but
>>I will keep messing around.
>
>See what xlsclients says to you.

Also, wmctrl accepts window names instead of ids if you omit the -i 
option. In case winfo_id() is not returning the id you need.

Cheers,
Cameron Simpson 
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue47053] Reduce de-optimization in BINARY_OP_INPLACE_ADD_UNICODE

2022-03-28 Thread Dennis Sweeney


Dennis Sweeney  added the comment:


New changeset 788154919c2d843a0a995994bf2aed2d074761ec by Dennis Sweeney in 
branch 'main':
bpo-47053: Refactor BINARY_OP_INPLACE_ADD_UNICODE (GH-32122)
https://github.com/python/cpython/commit/788154919c2d843a0a995994bf2aed2d074761ec


--

___
Python tracker 

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



[issue47031] math.nan should note that NANs do not compare equal to anything

2022-03-28 Thread Charlie Zhao


Change by Charlie Zhao :


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

___
Python tracker 

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



Re: Set tkinter top-level window to "always on visible workspace"

2022-03-28 Thread Cameron Simpson
On 28Mar2022 20:47, Skip Montanaro  wrote:
>I'm struggling to get the outermost window (not sure what's going on), 
>but
>I will keep messing around.

See what xlsclients says to you. Cheers, Cameron Simpson 
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue47125] Explore hashlib use of the Windows Crypto API NG

2022-03-28 Thread Dong-hee Na


Change by Dong-hee Na :


--
nosy: +corona10

___
Python tracker 

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



Re: Set tkinter top-level window to "always on visible workspace"

2022-03-28 Thread Skip Montanaro
> Would you accept a solution that involves a subprocess call?
>
> wmctrl -ir {id} -b add,sticky

I'm already checking idle time with xprintidle(1), so what's one more
(one-time) subprocess call?

Small amount of history, I'm referring to this mouse/typing watcher:

https://github.com/smontanaro/python-bits/blob/master/src/watch.py

I wrote this years and years ago when I first started having RSI problems.
So long ago that I just deleted a commented out piece of code which was
there in case I ever ran it with Python 1.4(!).

Over the years I've needed it on Linux, Linux+WIndows, Mac, etc. I'd put it
away for a couple years, then suffer a flare-up and pull it back out. I
never thought I'd need it after I retired, but here I am again. I've tried
all sorts of things to monitor mouse and keyboard activity. At the moment
I'm just using a Linux laptop, so have tossed out any sort of attempted
cross-platform tracking functionality.

> Now, the only problem is... figuring out your window ID. Worst case,
> parse wmctrl -lG to get that info, but it might be possible to get the
> window ID from Tkinter itself.

I'm struggling to get the outermost window (not sure what's going on), but
I will keep messing around.

Skip
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Set tkinter top-level window to "always on visible workspace"

2022-03-28 Thread Cameron Simpson
On 28Mar2022 19:39, Skip Montanaro  wrote:
>> I think you must be using xfce4, not fvwm4 (there's an fvwm3 in
>> development). See https://xfce.org/
>
>Both?
[...]
>1803 xfwm4 --replace
>539426 xfwm4-settings
[...]
>1755 /usr/bin/ssh-agent /usr/bin/im-launch startxfce4
>1782 /usr/lib/x86_64-linux-gnu/xfce4/xfconf/xfconfd
>
>I kind of assume xfce4 is the session manager sort of thing, while
>xfwm4 is the actual window manager.

Sounds reasonable. I was more looking at your earlier "Now I use fvwm4" 
and pointing out that there is no fvwm4. These transcription issues 
brought to you by the letters W and M, and by the number 4.

Cheers,
Cameron Simpson 
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue31140] Insufficient error message with incorrect formated string literal

2022-03-28 Thread Peter Lovett


Peter Lovett  added the comment:

Thanks Eric.

--

___
Python tracker 

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



Re: Set tkinter top-level window to "always on visible workspace"

2022-03-28 Thread Skip Montanaro
> I think you must be using xfce4, not fvwm4 (there's an fvwm3 in
> development). See https://xfce.org/

Both?

% pgrep -fla xfwm4
1803 xfwm4 --replace
539426 xfwm4-settings

% pgrep -fla xfce
1599 xfce4-session
1755 /usr/bin/ssh-agent /usr/bin/im-launch startxfce4
1782 /usr/lib/x86_64-linux-gnu/xfce4/xfconf/xfconfd
...

I kind of assume xfce4 is the session manager sort of thing, while
xfwm4 is the actual window manager.

Skip
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue47135] Allow decimal.localcontext to accept keyword arguments to set context attributes

2022-03-28 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
nosy: +ncoghlan

___
Python tracker 

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



[issue31140] Insufficient error message with incorrect formated string literal

2022-03-28 Thread Eric V. Smith


Eric V. Smith  added the comment:

Yes, they should update Python. A lot of work went in to fixing these issues, 
and won't be backported.

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



[issue47138] Pin Jinja2 to fix docs build

2022-03-28 Thread miss-islington


miss-islington  added the comment:


New changeset d2c6a4428d52c108f4b06dcd1bb86023541c60ce by Miss Islington (bot) 
in branch '3.9':
bpo-47138: Ensure Windows docs build uses the same pinned version as other 
platforms (GH-32161)
https://github.com/python/cpython/commit/d2c6a4428d52c108f4b06dcd1bb86023541c60ce


--

___
Python tracker 

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



[issue31140] Insufficient error message with incorrect formated string literal

2022-03-28 Thread Peter Lovett


Peter Lovett  added the comment:

I'm not getting the problem on 3.9.7 on Windows. 
Did get it on 3.7 (3.7.11?) on a different Windows machine last week.
Not getting the problem on 3.10.4

The wrong line number is a problem for IDLE's syntax highlighter, that marks 
the first line as a Syntax Error, even if that line is a comment. 

This is an issue for ArcGIS Pro users, which is (I think) currently shipping 
with Python 3.7.11, so those users may come across it. Best solution would be 
for Esri to update their Python version to something newer.
https://support.esri.com/en/technical-article/13224

--

___
Python tracker 

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



[issue31140] Insufficient error message with incorrect formated string literal

2022-03-28 Thread Peter Lovett


Change by Peter Lovett :


--
nosy: +PeterL777

___
Python tracker 

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



[issue44493] Missing terminated NUL in the length of sockaddr_un

2022-03-28 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
resolution:  -> fixed

___
Python tracker 

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



[issue47138] Pin Jinja2 to fix docs build

2022-03-28 Thread miss-islington


Change by miss-islington :


--
pull_requests: +30247
pull_request: https://github.com/python/cpython/pull/32169

___
Python tracker 

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



[issue47138] Pin Jinja2 to fix docs build

2022-03-28 Thread miss-islington


Change by miss-islington :


--
pull_requests: +30246
pull_request: https://github.com/python/cpython/pull/32168

___
Python tracker 

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



[issue47138] Pin Jinja2 to fix docs build

2022-03-28 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 5.0 -> 6.0
pull_requests: +30245
pull_request: https://github.com/python/cpython/pull/32167

___
Python tracker 

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



[issue47138] Pin Jinja2 to fix docs build

2022-03-28 Thread Steve Dower


Steve Dower  added the comment:


New changeset 0dfabf9b4a58b835b61fc3d17784d4746f677e56 by Steve Dower in branch 
'3.10':
bpo-47138: Ensure Windows docs build uses the same pinned version as other 
platforms (GH-32161)
https://github.com/python/cpython/commit/0dfabf9b4a58b835b61fc3d17784d4746f677e56


--

___
Python tracker 

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



[issue47143] Add types.copy_class() which updates closures

2022-03-28 Thread Jelle Zijlstra


Jelle Zijlstra  added the comment:

I mean that the code sample above from attrs doesn't properly update the 
closure for wrapped methods, such as those created by @functools.cache, or any 
other arbitrary decorator that creates a wrapper function.

Example (with Python 3.9.4 and attrs 21.4.0):

% cat attrslots.py 
import attr
import functools


class Base:
@classmethod
def f(cls):
return 3


@attr.s(slots=True)
class Child(Base):
x: int

@classmethod
@functools.cache
def f(cls):
return super().f() + 1


print(Child.f())
% python attrslots.py 
Traceback (most recent call last):
  File "/Users/jelle/py/pyanalyze/samples/attrslots.py", line 21, in 
print(Child.f())
  File "/Users/jelle/py/pyanalyze/samples/attrslots.py", line 18, in f
return super().f() + 1
TypeError: super(type, obj): obj must be an instance or subtype of type


If we provide a `types.copy_class()`, it should handle this case correctly.

--

___
Python tracker 

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



[issue47143] Add types.copy_class() which updates closures

2022-03-28 Thread STINNER Victor


STINNER Victor  added the comment:

Jelle Zijlstra:
> I believe the attrs code wouldn't work if a method is decorated with a 
> decorator that wraps the original function, such as @functools.cache.

What do you mean by "wouldn't work"? Do you mean that the semantics of 
"copy_class()" should be better defined? Currently, copy.deepcopy(MyClass) 
doesn't copy the class at all, it returns the class unmodified :-)

@functools.cache is designed for unbound methods.

Example:
---
import attr
import functools

@attr.s(slots=True)
class A:
@staticmethod
@functools.cache
def incr(x):
return x + 1

@staticmethod
@functools.lru_cache
def incr_lru(x):
return x + 1

obj = A()
print(obj.incr(1))
print(obj.incr_lru(2))
---

Output (current Python main branch, attrs 21.4.0):
---
2
3
---

@attr.s(slots=True) copies a class but then drops the original class. It 
doesn't create two classes which share methods, functools caches, etc.

--

___
Python tracker 

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



[issue47143] Add types.copy_class() which updates closures

2022-03-28 Thread STINNER Victor


STINNER Victor  added the comment:

The stdlib types module looks like a better place for such new function, rather 
than the functools module.

The types module documentation starts with: "This module defines utility 
functions to assist in dynamic creation of new types."
https://docs.python.org/3/library/types.html

--
title: Add functools.copy_class() which updates closures -> Add 
types.copy_class() which updates closures

___
Python tracker 

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



[issue46566] Support -3.11-arm64 in py.exe launcher

2022-03-28 Thread Steve Dower


Steve Dower  added the comment:

It's in! Any new issues probably won't be found until the next release, so I'll 
close this and we can open new bugs.

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



[issue46566] Support -3.11-arm64 in py.exe launcher

2022-03-28 Thread Steve Dower


Steve Dower  added the comment:


New changeset bad86a621af61f383b9f06fe4a08f66245df99e2 by Steve Dower in branch 
'main':
bpo-46566: Add new py.exe launcher implementation (GH-32062)
https://github.com/python/cpython/commit/bad86a621af61f383b9f06fe4a08f66245df99e2


--

___
Python tracker 

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



[issue47143] Add functools.copy_class() which updates closures

2022-03-28 Thread Jelle Zijlstra


Jelle Zijlstra  added the comment:

I believe the attrs code wouldn't work if a method is decorated with a 
decorator that wraps the original function, such as @functools.cache.

--
nosy: +JelleZijlstra

___
Python tracker 

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



[issue41571] Implement thread-related commands in pdb

2022-03-28 Thread Cebtenzzre


Change by Cebtenzzre :


--
nosy: +cebtenzzre

___
Python tracker 

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



[issue45099] asyncio.Task's documentation says that loop arg is removed when it's not

2022-03-28 Thread Andrew Svetlov


Change by Andrew Svetlov :


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



[issue45099] asyncio.Task's documentation says that loop arg is removed when it's not

2022-03-28 Thread Andrew Svetlov


Change by Andrew Svetlov :


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

___
Python tracker 

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



[issue45100] Improve help() by making typing.overload() information accessible at runtime

2022-03-28 Thread Guido van Rossum


Guido van Rossum  added the comment:

Looks like there may be a new plan where we solve a smaller problem (overloads) 
in the context of typing only.

--

___
Python tracker 

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



[issue27929] asyncio.AbstractEventLoop.sock_connect broken for AF_BLUETOOTH

2022-03-28 Thread Andrew Svetlov


Change by Andrew Svetlov :


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

___
Python tracker 

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



[issue47137] MemoryError in codeop.compile_command

2022-03-28 Thread Eric V. Smith


Change by Eric V. Smith :


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



[issue43323] UnicodeEncodeError: surrogates not allowed when parsing invalid charset

2022-03-28 Thread John Paul Adrian Glaubitz


John Paul Adrian Glaubitz  added the comment:

> Awesome, thanks! I'll give it a try later today or tomorrow.

I have applied the patch and the problem seems to have been fixed. \o/

--

___
Python tracker 

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



[issue47137] MemoryError in codeop.compile_command

2022-03-28 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> I suspect backporting the fix to older versions won't be possible.

Yeah, very much the case unfortunately

--

___
Python tracker 

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



[issue39805] Copying functions doesn't actually copy them

2022-03-28 Thread STINNER Victor


STINNER Victor  added the comment:

See also bpo-47143 "Add functools.copy_class() which updates closures".

--
nosy: +vstinner

___
Python tracker 

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



[issue27929] asyncio.AbstractEventLoop.sock_connect broken for AF_BLUETOOTH

2022-03-28 Thread miss-islington


miss-islington  added the comment:


New changeset 2bcbc3113dee6c35631595ec0d5ee3a8dd2a2ddd by Miss Islington (bot) 
in branch '3.10':
bpo-27929: resolve names only for AF_INET/AF_INET6 with asyncio (GH-32131)
https://github.com/python/cpython/commit/2bcbc3113dee6c35631595ec0d5ee3a8dd2a2ddd


--

___
Python tracker 

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



[issue29270] ctypes: fail to create a _ctypes._SimpleCData subclass using a closure like calling super() without arguments

2022-03-28 Thread STINNER Victor


STINNER Victor  added the comment:

CreateSwappedType() is an helper function used by the _ctypes.PyCSimpleType 
type. Python script reproducing this ctypes bug:
---
class PyCSimpleType(type):
def __new__(cls, name, bases, dct):
print(f"PyCSimpleType: create {name} class")
cell = dct.get('__classcell__', None)
# type.__new__() sets __classcell__
x = super().__new__(cls, name, bases, dct)
if cell is not None:
print(f"PyCSimpleType: after first type.__new__() call: 
__classcell__={cell.cell_contents}")

name2 = name + "_Swapped"
dct2 = dict(dct, __qualname__=name2)
# Calling type.__new__() again with the same cell object overrides
# __classcell__
x.__ctype_be__ = super().__new__(cls, name2, bases, dct2)
if cell is not None:
print(f"PyCSimpleType: after second type.__new__() call: 
__classcell__={cell.cell_contents}")

return x

class BaseItem:
pass

class Item(BaseItem, metaclass=PyCSimpleType):
def get_class(self):
# get '__class__' to create a closure
return __class__

# Alternative to create a closure:
#def __repr__(self):
#return super().__repr__()
---

Output:
---
PyCSimpleType: create Item class
PyCSimpleType: after first type.__new__() call: __classcell__=
PyCSimpleType: after second type.__new__() call: __classcell__=
Traceback (most recent call last):
  File "meta.py", line 23, in 
class Item(BaseItem, metaclass=PyCSimpleType):
TypeError: __class__ set to  defining 'Item' as 

---

It's not a bug in Python types, but a bug specific to the _ctypes.PyCSimpleType 
type which prevents creating subclasses which use closures ("__class__", 
"super()", etc.).

--
nosy: +vstinner
title: super call in ctypes subclass fails -> ctypes: fail to create a 
_ctypes._SimpleCData subclass using a closure like calling super() without 
arguments
versions: +Python 3.11 -Python 3.8

___
Python tracker 

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



[issue27929] asyncio.AbstractEventLoop.sock_connect broken for AF_BLUETOOTH

2022-03-28 Thread miss-islington


miss-islington  added the comment:


New changeset f84fb55659079bbc99d4cd0441dc13ab07ac3dcf by Miss Islington (bot) 
in branch '3.9':
bpo-27929: resolve names only for AF_INET/AF_INET6 with asyncio (GH-32131)
https://github.com/python/cpython/commit/f84fb55659079bbc99d4cd0441dc13ab07ac3dcf


--

___
Python tracker 

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



Re: Set tkinter top-level window to "always on visible workspace"

2022-03-28 Thread Cameron Simpson
On 28Mar2022 10:54, Skip Montanaro  wrote:
>I do have a ~/.config/xfce4/xfwm4/
>directory, but it is completely empty.

On reflection, maybe you're running something else. "ps axf" FTW.

Cheers,
Cameron Simpson 
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue47143] Add functools.copy_class() which updates closures

2022-03-28 Thread STINNER Victor


STINNER Victor  added the comment:

Note: Implementing a metaclass in Python is hard, it's easy to mess up with 
closures: see bpo-29270 "ctypes: fail to create a _ctypes._SimpleCData subclass 
using a closure like calling super() without arguments". type.__new__() is 
called twice on the same type dict, and the second call overrides the 
__classcell__ cell value.

--

___
Python tracker 

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



Re: Set tkinter top-level window to "always on visible workspace"

2022-03-28 Thread Cameron Simpson
On 28Mar2022 10:54, Skip Montanaro  wrote:
>Unfortunately, I no longer recall what window manager(s) I used at the
>time (probably twm or fvwm). Now I use fvwm4 and can't find squat
>online about configuration files. I do have a ~/.config/xfce4/xfwm4/
>directory, but it is completely empty.

I think you must be using xfce4, not fvwm4 (there's an fvwm3 in 
development). See https://xfce.org/

If I were using X11 I'd still be using fvwm2 or trying out 3, but my 
desktops have always be specially configured.

Cheers,
Cameron Simpson 

... you could spend *all day* customizing the title bar.  Believe me.  I
speak from experience.  - Matt Welsh
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Suggestion for Linux Distro (from PSA: Linux vulnerability)

2022-03-28 Thread Peter J. Holzer
On 2022-03-28 15:35:07 +0200, Cecil Westerhof via Python-list wrote:
> "Loris Bennett"  writes:
> > Ubuntu is presumably relying on the Debian security team as well as
> > other volunteers and at least one company, namely Canonical.
> 
> Nope. One important reason that I really hate that people use Ubuntu
> for servers is that Ubuntu wants to be up to date.

Not sure what you mean by that.

There is an Ubuntu LTS release every 2 years. There is also a Debian
release roughly every 2 years (although not on quite as strict a
schedule). So that's very similar.

> So Ubuntu starts very close to Debian security wise, but will shift
> rapidly.

They are are about a year apart, so they will usually contain different
versions of most packages right from the start. So the Ubuntu and Debian
security teams probably can't benefit much from each other.

hp

-- 
   _  | Peter J. Holzer| Story must make more sense than reality.
|_|_) ||
| |   | h...@hjp.at |-- Charles Stross, "Creative writing
__/   | http://www.hjp.at/ |   challenge!"


signature.asc
Description: PGP signature
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Set tkinter top-level window to "always on visible workspace"

2022-03-28 Thread Chris Angelico
On Tue, 29 Mar 2022 at 09:04, Cameron Simpson  wrote:
>
> On 29Mar2022 06:10, Chris Angelico  wrote:
> >On Tue, 29 Mar 2022 at 06:08, Christian Gollwitzer  wrote:
> >> Am 28.03.22 um 20:03 schrieb Chris Angelico:
> >> > Would you accept a solution that involves a subprocess call?
> >> >
> >> > wmctrl -ir {id} -b add,sticky
> >> >
> >> > Now, the only problem is... figuring out your window ID. Worst case,
> >> > parse wmctrl -lG to get that info, but it might be possible to get the
> >> > window ID from Tkinter itself.
> >>
> >> Sure: Call "winfo_id()" on the toplevel. You might want to reformat in
> >> it in hex format, which is the usual way to pass these IDs around. Tk
> >> actually returns it in hex format, but Tkinter reformats it as an integer.
> >>
> >
> >Ah sweet, there you go then. (As you can see, I don't use Tkinter
> >much.) I have no idea how wmctrl does its work,
>
> It sets properties on the window itself. A window manager can listen for
> such changes and honour the settings.
>

Yeah but what I mean is, I don't know how to replicate its behaviour.

Though I could, of course, just go read the source code. Sometimes it
turns out that it really isn't that hard to replicate (as I discovered
when I browsed the source code for "tail -F" recently - it's just a
couple of inotify calls, way simpler than I expected).

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Set tkinter top-level window to "always on visible workspace"

2022-03-28 Thread Cameron Simpson
On 29Mar2022 06:10, Chris Angelico  wrote:
>On Tue, 29 Mar 2022 at 06:08, Christian Gollwitzer  wrote:
>> Am 28.03.22 um 20:03 schrieb Chris Angelico:
>> > Would you accept a solution that involves a subprocess call?
>> >
>> > wmctrl -ir {id} -b add,sticky
>> >
>> > Now, the only problem is... figuring out your window ID. Worst case,
>> > parse wmctrl -lG to get that info, but it might be possible to get the
>> > window ID from Tkinter itself.
>>
>> Sure: Call "winfo_id()" on the toplevel. You might want to reformat in
>> it in hex format, which is the usual way to pass these IDs around. Tk
>> actually returns it in hex format, but Tkinter reformats it as an integer.
>>
>
>Ah sweet, there you go then. (As you can see, I don't use Tkinter
>much.) I have no idea how wmctrl does its work,

It sets properties on the window itself. A window manager can listen for 
such changes and honour the settings.

Cheers,
Cameron Simpson 
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue27929] asyncio.AbstractEventLoop.sock_connect broken for AF_BLUETOOTH

2022-03-28 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 5.0 -> 6.0
pull_requests: +30242
pull_request: https://github.com/python/cpython/pull/32164

___
Python tracker 

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



[issue27929] asyncio.AbstractEventLoop.sock_connect broken for AF_BLUETOOTH

2022-03-28 Thread miss-islington


Change by miss-islington :


--
pull_requests: +30243
pull_request: https://github.com/python/cpython/pull/32165

___
Python tracker 

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



[issue27929] asyncio.AbstractEventLoop.sock_connect broken for AF_BLUETOOTH

2022-03-28 Thread Andrew Svetlov


Andrew Svetlov  added the comment:


New changeset 5c30388f3c586ba2f33e349e22e5949cb92de621 by Vincent Bernat in 
branch 'main':
bpo-27929: resolve names only for AF_INET/AF_INET6 with asyncio (GH-32131)
https://github.com/python/cpython/commit/5c30388f3c586ba2f33e349e22e5949cb92de621


--

___
Python tracker 

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



[issue47129] Improve errors messages in f-string syntax errors

2022-03-28 Thread Maciej Górski

Maciej Górski  added the comment:

Thanks for helping me with my very first python contribution! @eric.smith 
@lys.nikolaou

--

___
Python tracker 

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



[issue47129] Improve errors messages in f-string syntax errors

2022-03-28 Thread Eric V. Smith


Eric V. Smith  added the comment:

Thanks, @macgors!

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

___
Python tracker 

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



[issue47129] Improve errors messages in f-string syntax errors

2022-03-28 Thread Eric V. Smith

Eric V. Smith  added the comment:


New changeset 7b44ade018cfe6f54002a3cee43e8aa415d4d635 by Maciej Górski in 
branch 'main':
bpo-47129: Add more informative messages to f-string syntax errors (32127)
https://github.com/python/cpython/commit/7b44ade018cfe6f54002a3cee43e8aa415d4d635


--

___
Python tracker 

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



[issue47137] MemoryError in codeop.compile_command

2022-03-28 Thread Eric V. Smith


Change by Eric V. Smith :


--
nosy: +pablogsal
title: MemoryError -> MemoryError in codeop.compile_command
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



[issue47146] PR check "Check if generated files are up to date" failing intermittently

2022-03-28 Thread Eric Snow


Eric Snow  added the comment:

Looks like that fixed it, per https://github.com/python/cpython/pull/32134.

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



[issue26120] pydoc: move __future__ imports out of the DATA block

2022-03-28 Thread Irit Katriel


Irit Katriel  added the comment:

Thank you, Serhiy!

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



[issue26120] pydoc: move __future__ imports out of the DATA block

2022-03-28 Thread Irit Katriel


Irit Katriel  added the comment:


New changeset 15ba8167d78f9e66bd5b07c4e5cbb0463460310a by Irit Katriel in 
branch 'main':
bpo-26120: make pydoc exclude __future__ imports from the data block of the 
module (GH-30888)
https://github.com/python/cpython/commit/15ba8167d78f9e66bd5b07c4e5cbb0463460310a


--

___
Python tracker 

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



[issue47138] Pin Jinja2 to fix docs build

2022-03-28 Thread Steve Dower


Change by Steve Dower :


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

___
Python tracker 

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



[issue47146] PR check "Check if generated files are up to date" failing intermittently

2022-03-28 Thread Eric Snow


Eric Snow  added the comment:


New changeset 4c116f716bd1c174d6530b9a7a5ed3863927a109 by Eric Snow in branch 
'main':
bpo-47146: Eliminate a race between make regen-deepfreeze and make 
regen-global-objects. (gh-32162)
https://github.com/python/cpython/commit/4c116f716bd1c174d6530b9a7a5ed3863927a109


--

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

2022-03-28 Thread Guido van Rossum


Guido van Rossum  added the comment:

I used 9 in deepfreeze.py to signify "immortal object". It has been 
copied by others (small integers are essentially immortal too). I wasn't too 
sure that the refcount wouldn't go below zero if the interpreter is repeatedly 
finalized and reinitialized. Once we have official immortal objects (see PEP 
683) we should switch to that.

Since you seem to be challenging the value of 9, my question to you is, 
why do you care what the refcount of 1 is?

--

___
Python tracker 

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



[issue47138] Pin Jinja2 to fix docs build

2022-03-28 Thread Steve Dower


Steve Dower  added the comment:


New changeset 295114dcd32b3aad5453e5e15e9e1befa0e5ca01 by Steve Dower in branch 
'main':
bpo-47138: Ensure Windows docs build uses the same pinned version as other 
platforms (GH-32161)
https://github.com/python/cpython/commit/295114dcd32b3aad5453e5e15e9e1befa0e5ca01


--

___
Python tracker 

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



[issue47146] PR check "Check if generated files are up to date" failing intermittently

2022-03-28 Thread Eric Snow


Change by Eric Snow :


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

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

2022-03-28 Thread Julien Palard


Julien Palard  added the comment:

Hum, and why 9? I am probably missing something obvious but 1 should be 
enough to ensure the value never hits 0. Except for refcount bugs obviously, 
but I don't think this is the right reason?

--

___
Python tracker 

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



[issue47138] Pin Jinja2 to fix docs build

2022-03-28 Thread Steve Dower


Change by Steve Dower :


--
nosy: +steve.dower
nosy_count: 4.0 -> 5.0
pull_requests: +30239
status: pending -> open
pull_request: https://github.com/python/cpython/pull/32161

___
Python tracker 

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



[issue44493] Missing terminated NUL in the length of sockaddr_un

2022-03-28 Thread Gregory P. Smith


Gregory P. Smith  added the comment:


New changeset dae09c2b819c2683ad870733451c050b59c3eb93 by Miss Islington (bot) 
in branch '3.9':
[3.9] bpo-44493: Add missing terminated NUL in sockaddr_un's length (GH-26866) 
(GH-32140) (GH-32156)
https://github.com/python/cpython/commit/dae09c2b819c2683ad870733451c050b59c3eb93


--

___
Python tracker 

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



[issue4833] Explicit directories for zipfiles

2022-03-28 Thread Ethan Furman


Change by Ethan Furman :


--
nosy: +ethan.furman
versions: +Python 3.11 -Python 3.4

___
Python tracker 

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



[issue47147] Allow `return yield from`

2022-03-28 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

In general, anything changing the python syntax needs to be discussed in the 
mailing lists and it may likely need a PEP as well, even if is minor. This is 
because this has consequences rippling the whole ecosystem, from IDEs to other 
parsers and this need to be discussed, and communicated in a better forum than 
this.

--

___
Python tracker 

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



[issue47147] Allow `return yield from`

2022-03-28 Thread Patrick Reader


Patrick Reader  added the comment:

Ok, will do, but what is the bar for a feature to need to go to the mailing 
lists first? I thought as this was a relatively minor one it wouldn't need to. 
Is it just because it's an actual syntax change?

--

___
Python tracker 

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



[issue43818] Email does not apply policy to multipart messages with defects

2022-03-28 Thread Martin Dengler


Martin Dengler  added the comment:

Possible related to https://github.com/python/cpython/pull/32137 and 
https://bugs.python.org/issue43323

--

___
Python tracker 

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



[issue4833] Explicit directories for zipfiles

2022-03-28 Thread Sam Ezeh


Sam Ezeh  added the comment:

I've submitted the above patch. I created the ZipFile.mkdir function, created 
the necessary tests and wrote the documentation.

I think it is ready for review.

--
Added file: https://bugs.python.org/file50705/sam_ezeh.patch

___
Python tracker 

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



[issue4833] Explicit directories for zipfiles

2022-03-28 Thread Sam Ezeh


Change by Sam Ezeh :


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

___
Python tracker 

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



Re: Set tkinter top-level window to "always on visible workspace"

2022-03-28 Thread Chris Angelico
On Tue, 29 Mar 2022 at 06:08, Christian Gollwitzer  wrote:
>
> Am 28.03.22 um 20:03 schrieb Chris Angelico:
> > Would you accept a solution that involves a subprocess call?
> >
> > wmctrl -ir {id} -b add,sticky
> >
> > Now, the only problem is... figuring out your window ID. Worst case,
> > parse wmctrl -lG to get that info, but it might be possible to get the
> > window ID from Tkinter itself.
>
> Sure: Call "winfo_id()" on the toplevel. You might want to reformat in
> it in hex format, which is the usual way to pass these IDs around. Tk
> actually returns it in hex format, but Tkinter reformats it as an integer.
>

Ah sweet, there you go then. (As you can see, I don't use Tkinter
much.) I have no idea how wmctrl does its work, but if calling on
another process is viable, that's at least a fully automated way to
stickify the window.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue43224] Add support for PEP 646

2022-03-28 Thread Matthew Rahtz


Change by Matthew Rahtz :


--
pull_requests: +30237
pull_request: https://github.com/python/cpython/pull/32159

___
Python tracker 

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



Re: Set tkinter top-level window to "always on visible workspace"

2022-03-28 Thread Christian Gollwitzer

Am 28.03.22 um 20:03 schrieb Chris Angelico:

Would you accept a solution that involves a subprocess call?

wmctrl -ir {id} -b add,sticky

Now, the only problem is... figuring out your window ID. Worst case,
parse wmctrl -lG to get that info, but it might be possible to get the
window ID from Tkinter itself.


Sure: Call "winfo_id()" on the toplevel. You might want to reformat in 
it in hex format, which is the usual way to pass these IDs around. Tk 
actually returns it in hex format, but Tkinter reformats it as an integer.


Christian
--
https://mail.python.org/mailman/listinfo/python-list


[issue28516] contextlib.ExitStack.__enter__ has trivial but undocumented behavior

2022-03-28 Thread Jelle Zijlstra


Jelle Zijlstra  added the comment:


New changeset 1e3132b1c3ebff8d28a6dd353bf217cb97c41e81 by Miss Islington (bot) 
in branch '3.9':
bpo-28516: document contextlib.ExitStack.__enter__ behavior (GH-31636) 
(GH-32145)
https://github.com/python/cpython/commit/1e3132b1c3ebff8d28a6dd353bf217cb97c41e81


--

___
Python tracker 

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



[issue47146] PR check "Check if generated files are up to date" failing intermittently

2022-03-28 Thread Eric Snow


Eric Snow  added the comment:

There's probably something racy with make.

See: 
https://github.com/python/cpython/runs/5712538599?check_suite_focus=true#step:10:1147

--

___
Python tracker 

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



[issue44493] Missing terminated NUL in the length of sockaddr_un

2022-03-28 Thread miss-islington


miss-islington  added the comment:


New changeset 5944807b09717d43bb017f700e8c451dd07199ed by Miss Islington (bot) 
in branch '3.10':
[3.10] bpo-44493: Add missing terminated NUL in sockaddr_un's length (GH-26866) 
(GH-32140)
https://github.com/python/cpython/commit/5944807b09717d43bb017f700e8c451dd07199ed


--

___
Python tracker 

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



[issue44493] Missing terminated NUL in the length of sockaddr_un

2022-03-28 Thread miss-islington


Change by miss-islington :


--
pull_requests: +30236
pull_request: https://github.com/python/cpython/pull/32156

___
Python tracker 

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



Re: Set tkinter top-level window to "always on visible workspace"

2022-03-28 Thread Chris Angelico
On Tue, 29 Mar 2022 at 02:56, Skip Montanaro  wrote:
>
> > I might be misguided, but on modern desktops that should be possible
> > with a few mouseclicks. E.g. in KDE, there is a little pin icon
> > displayed in every title bar of a toplevel window on the left side.
>
> Correct, and that's what I'm currently doing. I'm lazy though. I want
> the program to start always visible on the active virtual desktop. As
> Cameron showed, this is possible. I have vague recollection of doing
> this with the same program probably 15-20 years ago in an age when
> window managers weren't largely configured with the mouse.
> Unfortunately, I no longer recall what window manager(s) I used at the
> time (probably twm or fvwm). Now I use fvwm4 and can't find squat
> online about configuration files. I do have a ~/.config/xfce4/xfwm4/
> directory, but it is completely empty.
>

Would you accept a solution that involves a subprocess call?

wmctrl -ir {id} -b add,sticky

Now, the only problem is... figuring out your window ID. Worst case,
parse wmctrl -lG to get that info, but it might be possible to get the
window ID from Tkinter itself.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue45100] Improve help() by making typing.overload() information accessible at runtime

2022-03-28 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



[issue47147] Allow `return yield from`

2022-03-28 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Please, submit an email to python-ideas or python-dev first as this need to be 
discussed in the mailing lists.

--

___
Python tracker 

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



[issue47147] Allow `return yield from`

2022-03-28 Thread Patrick Reader


New submission from Patrick Reader :

I would like to be able to use a `yield from` expression in a `return` 
statement without parentheses, as a small quality of life tweak, i.e.:

return yield from gen

instead of

return (yield from gen)

I think this makes sense, since `yield from` can be used on the right-hand-side 
of an assignment, which accepts any expression, and so should `return`.

Here is a medium-sized real-world example of where I'm using this, where it 
would be nice to allow `return yield from`: 
https://gist.github.com/pxeger/48f97484364bf0b43dee974a8f0f4265

--
components: Parser
messages: 416198
nosy: lys.nikolaou, pablogsal, pxeger
priority: normal
severity: normal
status: open
title: Allow `return yield from`
type: enhancement

___
Python tracker 

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



[issue47138] Pin Jinja2 to fix docs build

2022-03-28 Thread Ned Deily


Ned Deily  added the comment:

Thanks, everyone! Merged for 3.10.5, 3.9.13, and 3.7.14. I'll leave the issue 
in pending state until merged for 3.8.14.

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

___
Python tracker 

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



[issue47138] Pin Jinja2 to fix docs build

2022-03-28 Thread Ned Deily


Ned Deily  added the comment:


New changeset 25c40bd994aa0da75283c5efdd71ba26c734b67e by Hugo van Kemenade in 
branch '3.9':
bpo-47138: Fix documentation build by pinning Jinja version to 3.0.3 (GH-32153)
https://github.com/python/cpython/commit/25c40bd994aa0da75283c5efdd71ba26c734b67e


--

___
Python tracker 

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



Re: Unable to open Python

2022-03-28 Thread Mats Wichmann
On 3/28/22 10:02, Grant Edwards wrote:
> On 2022-03-28, Grant Edwards  wrote:
>> On 2022-03-28, kristine RABIA  wrote:
>>
>>> I downloaded successfully Python, however when I am trying to open it,
>>> brings the window repair, modify or uninstall, I tried to click on repair
>>> and modify after all it came with the same window.
>>
>> I assume you're using Windows?
>>
>> You're re-running the installer. That's just reinstalling/repairing Python.
>>
>> If you want to run Python, open a command prompt (cmd.exe), and enter 
>> "python".
> 
> That might not work if you didn't check the box during installation
> that causes python to be added to your PATH environment variable.
> 
> There should be a python entry in your start menu.

Get rid of the installer after using it, it seems to be able to confuse
Windows in some senses, and read this:

https://docs.python.org/3/using/windows.html


-- 
https://mail.python.org/mailman/listinfo/python-list


[issue47138] Pin Jinja2 to fix docs build

2022-03-28 Thread Ned Deily


Ned Deily  added the comment:


New changeset 9194a7b8990a0feec1209b1e5694df3bf42906d8 by Hugo van Kemenade in 
branch '3.10':
bpo-47138: Fix documentation build by pinning Jinja version to 3.0.3 (GH-32154)
https://github.com/python/cpython/commit/9194a7b8990a0feec1209b1e5694df3bf42906d8


--

___
Python tracker 

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



[issue47138] Pin Jinja2 to fix docs build

2022-03-28 Thread Ned Deily


Ned Deily  added the comment:


New changeset 25f00bfb264a3197ac91c41cdec15036fd8401f1 by m-aciek in branch 
'3.7':
bpo-47138: Fix documentation build by pinning Jinja version to 3.0.3 (GH-32111)
https://github.com/python/cpython/commit/25f00bfb264a3197ac91c41cdec15036fd8401f1


--

___
Python tracker 

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



[issue47146] PR check "Check if generated files are up to date" failing intermittently

2022-03-28 Thread Eric Snow


New submission from Eric Snow :

The "Check if generated files are up to date" GitHub check for PRs has been 
failing recently.  It may also impact local usage of "make regen-all".

Example: https://github.com/python/cpython/runs/5719012664

This may be related to gh-32061.

--
assignee: eric.snow
components: Build
messages: 416193
nosy: Mark.Shannon, brandtbucher, eric.snow
priority: normal
severity: normal
stage: needs patch
status: open
title: PR check "Check if generated files are up to date" failing intermittently
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



[issue26120] pydoc: move __future__ imports out of the DATA block

2022-03-28 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Module objects are not shown in the help unless they are submodules of the 
specified module, even if they are imported with the star import. With this 
precedence I think it is okay to exclude the __future__ annotations as well.

--

___
Python tracker 

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



[issue47143] Add functools.copy_class() which updates closures

2022-03-28 Thread STINNER Victor


STINNER Victor  added the comment:

> The same problem exists at the function level: see bpo-39805: "Copying 
> functions doesn't actually copy them".

See also bpo-14369 "make function __closure__ writable".

--

___
Python tracker 

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



[issue14369] make function __closure__ writable

2022-03-28 Thread STINNER Victor


Change by STINNER Victor :


--
title: make __closure__ writable -> make function __closure__ writable

___
Python tracker 

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



[issue47143] Add functools.copy_class() which updates closures

2022-03-28 Thread STINNER Victor


STINNER Victor  added the comment:

bpo-32176 "Zero argument super is broken in 3.6 for methods with a hacked 
__class__ cell" added test_code.test_closure_injection() and fixed the 
CO_NOFREE flag in the code object constructor (types.CodeType).

--

___
Python tracker 

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



[issue47143] Add functools.copy_class() which updates closures

2022-03-28 Thread STINNER Victor


STINNER Victor  added the comment:

> If I understand correctly, a cell content can be modified since Python 3.7: 
> since commit 64505a1f6c0af4574e17e823b27ffe24eca44df5 of bpo-30486

Moreover, it's possible to create a cell object since Python 3.8, commit 
df8d2cde63c865446468351f8f648e1c7bd45109 of bpo-35911.

--
nosy: +pitrou

___
Python tracker 

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



[issue47144] Allow setting __classcell__

2022-03-28 Thread Douglas Raillard


Douglas Raillard  added the comment:

EDIT: empty_list() is a class method of List, not ContainerBase

--

___
Python tracker 

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



[issue47144] Allow setting __classcell__

2022-03-28 Thread Douglas Raillard


Douglas Raillard  added the comment:

> Would bpo-47143 "Add functools.copy_class() which updates closures" solve 
> your use case?

This looks like a similar issue indeed. If I'm able to copy a class "cleanly" 
(as defined in this other thread), that may solve the problem (hard to tell 
precisely until trying it though, the devil is in the details).

> Would you elaborate your use case?

As you probably expect, it's a relatively tricky metaprogramming bit of code. 
It's implementing something akin to higher kinded types, similar in spirit to 
the following example where you can have e.g. containers that "know" the item 
type they contain:

class ContainerBase:
ITEM = None

@classmethod
def apply(cls, typ):
...


@classmethod
def empty_list(cls):
...
  
class List(ContainerBase):
pass

class ListOfInt(List.apply(int)):
pass

The goal is to allow "ListOfInt" to define custom methods if we want in its 
body.

"ListOfInt" cannot return instances of itself [1] so I'm trying to "cherry 
pick" its method and graft them onto the type that is actually instantiated.

[1] We e.g. want to create an empty list of the right type. "List" already 
provides the method for such factory, but it will not return an actual instance 
of ListOfInt, since it does not even know this class exists. What it will use 
is an internal type that it created using the "ITEM" class attribute in e.g. 
List.__init_subclass__, and that is what will get instantiated. This "internal 
class" could still be customized by ListOfInt to have some custom methods 
though, which is what I'm trying to achieve.

--

___
Python tracker 

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



[issue47143] Add functools.copy_class() which updates closures

2022-03-28 Thread STINNER Victor


STINNER Victor  added the comment:

See also the types.new_class() function:
https://docs.python.org/dev/library/types.html#types.new_class

Oh, I didn't know this function!

--

___
Python tracker 

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



[issue29944] Argumentless super() fails in classes constructed with type()

2022-03-28 Thread STINNER Victor


STINNER Victor  added the comment:

See also bpo-47143 "Add functools.copy_class() which updates closures".

--
nosy: +vstinner

___
Python tracker 

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



[issue47143] Add functools.copy_class() which updates closures

2022-03-28 Thread STINNER Victor


STINNER Victor  added the comment:

> * old fixed attrs issue: https://github.com/python-attrs/attrs/issues/102
> * attrs issue with Python 3.11: 
> https://github.com/python-attrs/attrs/issues/907
> * dataclasses issues with slots=True: https://bugs.python.org/issue46404

Similar bug without attrs nor dataclasses: bpo-29944 "Argumentless super() 
fails in classes constructed with type()".

--

___
Python tracker 

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



[issue47143] Add functools.copy_class() which updates closures

2022-03-28 Thread STINNER Victor


STINNER Victor  added the comment:

The same problem exists at the function level: see bpo-39805: "Copying 
functions doesn't actually copy them".

For example, copy.deepcopy(func) returns func unchanged if it's a function.

Example:
---
import copy

def make_closure():
closure = []
def append(value):
closure.append(value)
return append, closure

func, closure = make_closure()
func(1)
func2 = copy.deepcopy(func)
func2(2)
print(func2 is func)
print(closure)
---

Output:
---
True
[1, 2]
---

--

___
Python tracker 

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



  1   2   >