Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

gh-115058: Add reset_rare_event_counters function in _testinternalcapi #115128

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Feb 12, 2024

Conversation

Eclips4
Copy link
Member

@Eclips4 Eclips4 commented Feb 7, 2024

@Eclips4 Eclips4 requested a review from mdboom February 7, 2024 06:02
@Eclips4 Eclips4 removed the request for review from ericsnowcurrently February 7, 2024 06:02
@Eclips4 Eclips4 changed the title gh-115058: Replace types with a larger types gh-115058: Replace types with a larger types in _rare_events structure Feb 7, 2024
@Eclips4 Eclips4 changed the title gh-115058: Replace types with a larger types in _rare_events structure gh-115058: Add reset_rare_event_counters function in _testinternalcapi Feb 9, 2024
@Eclips4 Eclips4 requested a review from markshannon February 9, 2024 16:44
@Eclips4
Copy link
Member Author

Eclips4 commented Feb 9, 2024

Does it makes sense to call _testinternalcapi.reset_rare_event_counters in every test case in this module?

Copy link
Contributor

@mdboom mdboom left a comment

Choose a reason for hiding this comment

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

Thanks. LGTM!

Lib/test/test_optimizer.py Outdated Show resolved Hide resolved
@@ -1650,6 +1650,20 @@ get_rare_event_counters(PyObject *self, PyObject *type)
);
}

static PyObject *
reset_rare_event_counters(PyObject *self, PyObject *type)
Copy link
Member

Choose a reason for hiding this comment

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

type is unused, can you rename it to unused or similar?

Copy link
Member Author

Choose a reason for hiding this comment

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

I marked it as Py_UNUSED

@Eclips4 Eclips4 requested a review from markshannon February 10, 2024 18:01
@markshannon
Copy link
Member

Thanks, looks good.

@markshannon markshannon merged commit 93ac78a into python:main Feb 12, 2024
@Eclips4 Eclips4 deleted the issue-115058 branch February 12, 2024 16:41
fsc-eriker pushed a commit to fsc-eriker/cpython that referenced this pull request Feb 14, 2024
Sign up for free to 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.

4 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.