Skip to content

Python: Add missing builtins to API::builtin#5639

Merged
tausbn merged 1 commit into
github:mainfrom
tausbn:python-api-graphs-missing-builtins
Apr 13, 2021
Merged

Python: Add missing builtins to API::builtin#5639
tausbn merged 1 commit into
github:mainfrom
tausbn:python-api-graphs-missing-builtins

Conversation

@tausbn

@tausbn tausbn commented Apr 9, 2021

Copy link
Copy Markdown
Contributor

We were missing out on None, True, and False as these do not
appear as actual attributes of the builtins module in Python 3
(because they are elevated to the status of keywords there).

The simple solution, then, is to just always include them directly.


cf. #3878 where API::builtin("None") would come in handy.

This is a minor bugfix, and so I don't think a change note is required.

We were missing out on `None`, `True`, and `False` as these do not
appear as actual attributes of the `builtins` module in Python 3
(because they are elevated to the status of keywords there)

The simple solution, then, is to just always include them directly.
@tausbn tausbn added the no-change-note-required This PR does not need a change note label Apr 9, 2021
@tausbn tausbn requested a review from a team as a code owner April 9, 2021 12:12
@github-actions github-actions Bot added the Python label Apr 9, 2021

@yoff yoff left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder how many nodes this will add to likely_builtin on a large code base. Should we run the usual performance check just in case?

@RasmusWL RasmusWL left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice 💪

@RasmusWL

Copy link
Copy Markdown
Member

I wonder how many nodes this will add to likely_builtin on a large code base. Should we run the usual performance check just in case?

I think the risk for this introducing a problem is very minimal.

So I think this raises the question of whether we want to run performance tests on all our PRs. While it is much easier now, I still think it negatively impacts our velocity. Let's discuss at our meeting later today 😊

@tausbn

tausbn commented Apr 13, 2021

Copy link
Copy Markdown
Contributor Author

Ran a performance test anyway. Looks pretty reasonable: https://github.com/dsp-testing/tausbn-dca/issues/10

@tausbn tausbn merged commit 981c5de into github:main Apr 13, 2021
@tausbn tausbn deleted the python-api-graphs-missing-builtins branch April 13, 2021 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-change-note-required This PR does not need a change note Python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants