Skip to content

Conversation

@gvanrossum
Copy link
Member

@gvanrossumgvanrossum commented Feb 27, 2024

@gvanrossumgvanrossum changed the title Change behavior of symbols and finish testinggh-115816: Improve internal symbols API in optimizerFeb 28, 2024
@gvanrossumgvanrossum marked this pull request as ready for review February 28, 2024 03:22
@gvanrossum
Copy link
MemberAuthor

@Fidget-Spinner Do you have time to review?

@gvanrossum
Copy link
MemberAuthor

FWIW the CI failure seems unrelated, it's homebrew being difficult (see #build channel on Discord).

gvanrossumand others added 4 commits February 27, 2024 19:36
In some cases we might cause a StreamWriter to stay alive even when the application has dropped all references to it. This prevents us from doing automatical cleanup, and complaining that the StreamWriter wasn't properly closed. Fortunately, the extra reference was never actually used for anything so we can just drop it.
…hon#115667) Nothing else in Python generally logs the contents of variables, so this can be very unexpected for developers and could leak sensitive information in to terminals and log files.
Demonstration: >>> ast.FunctionDef.__annotations__{'name': <class 'str'>, 'args': <class 'ast.arguments'>, 'body': list[ast.stmt], 'decorator_list': list[ast.expr], 'returns': ast.expr | None, 'type_comment': str | None, 'type_params': list[ast.type_param]} >>> ast.FunctionDef() <stdin>:1: DeprecationWarning: FunctionDef.__init__ missing 1 required positional argument: 'name'. This will become an error in Python 3.15. <stdin>:1: DeprecationWarning: FunctionDef.__init__ missing 1 required positional argument: 'args'. This will become an error in Python 3.15. <ast.FunctionDef object at 0x101959460> >>> node = ast.FunctionDef(name="foo", args=ast.arguments()) >>> node.decorator_list [] >>> ast.FunctionDef(whatever="you want", name="x", args=ast.arguments()) <stdin>:1: DeprecationWarning: FunctionDef.__init__ got an unexpected keyword argument 'whatever'. Support for arbitrary keyword arguments is deprecated and will be removed in Python 3.15. <ast.FunctionDef object at 0x1019581f0>
@Fidget-Spinner
Copy link
Member

I can review but it seems you messed up the merge.

@gvanrossum
Copy link
MemberAuthor

Let me create a new PR.

@gvanrossum
Copy link
MemberAuthor

See gh-116028 instead.

axizqayum686

This comment was marked as spam.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@gvanrossum@Fidget-Spinner@axizqayum686@CendioOssman@JelleZijlstra