GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — bpo-40170: Convert PyIter_Check macro to a function by erlend-aasland · Pull Request #24548 · python/cpython

Conversation

@erlend-aasland

@erlend-aasland erlend-aasland commented Feb 16, 2021 •
edited by bedevere-bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

The macro accessed the PyTypeObject.tp_iternext member directly.
"Swap" macro variant with the function in order to hide implementation details.
(A function already existed, but it was not exposed.)

https://bugs.python.org/issue40170

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@the-knights-who-say-ni the-knights-who-say-ni added the CLA signed label Feb 16, 2021
@bedevere-bot bedevere-bot added the awaiting review label Feb 16, 2021
@erlend-aasland

erlend-aasland commented Feb 16, 2021

Copy link
Copy Markdown
Contributor Author

@vstinner Would you mind reviewing this?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Erlend E. Aasland added 2 commits February 16, 2021 11:05
Erlend E. Aasland
bpo-40170: Remove macro variant of PyIter_Check
9f60af2
Erlend E. Aasland
Add NEWS
7c03394
@erlend-aasland
erlend-aasland force-pushed the bpo-40170/PyIter_Check branch from ec6687a to 7c03394 Compare February 16, 2021 10:05
vstinner
vstinner reviewed Feb 16, 2021
View reviewed changes

@vstinner vstinner left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

For macOS which doesn't use LTO compiler optimization, we added private static inline functions of some "Check" functions. But I don't think that it's worth it here (I don't think that the function is commonly called in "hot code").

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

erlend-aasland reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
Comment thread Objects/abstract.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Include/cpython/abstract.h Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Doc/c-api/iter.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Misc/NEWS.d/next/Core and Builtins/2021-02-15-15-06-43.bpo-40170.ZYeSii.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Erlend Egeberg Aasland and others added 4 commits February 16, 2021 13:10
Erlend Egeberg Aasland @vstinner
Add parens
780d661
Co-authored-by: Victor Stinner <[email protected]>
Erlend Egeberg Aasland @vstinner
Improve NEWS entry
0452b69
Co-authored-by: Victor Stinner <[email protected]>
Erlend E. Aasland
Address review: Update comment
4fb4918
Erlend E. Aasland
Address review: Remove duplicate expose
fd85ca6
@erlend-aasland

erlend-aasland commented Feb 16, 2021

Copy link
Copy Markdown
Contributor Author

CI is done; PTAL, @vstinner.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vstinner
vstinner merged commit cc54001 into python:master Feb 16, 2021
@bedevere-bot bedevere-bot removed the awaiting review label Feb 16, 2021
@vstinner

vstinner commented Feb 16, 2021

Copy link
Copy Markdown
Member

Merged, thanks.

erlend-aasland reacted with hooray emoji
All reactions
  • 🎉 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@erlend-aasland
erlend-aasland deleted the bpo-40170/PyIter_Check branch February 16, 2021 15:14
@bedevere-bot

bedevere-bot commented Feb 16, 2021

Copy link
Copy Markdown

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot PPC64LE RHEL8 LTO + PGO 3.x has failed when building commit cc54001.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/458/builds/1109) and take a look at the build logs.
  4. Check if the failure is related to this commit (cc54001) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/458/builds/1109

Summary of the results of the build (if available):

== Tests result: ENV CHANGED ==

411 tests OK.

10 slowest tests:

  • test_concurrent_futures: 2 min 44 sec
  • test_multiprocessing_spawn: 1 min 49 sec
  • test_tokenize: 1 min 12 sec
  • test_asyncio: 1 min 9 sec
  • test_multiprocessing_forkserver: 1 min 2 sec
  • test_multiprocessing_fork: 1 min 1 sec
  • test_unparse: 50.5 sec
  • test_lib2to3: 48.7 sec
  • test_signal: 47.5 sec
  • test_io: 38.7 sec

1 test altered the execution environment:
test_asyncio

14 tests skipped:
test_devpoll test_gdb test_ioctl test_kqueue test_msilib
test_ossaudiodev test_startfile test_tix test_tk test_ttk_guionly
test_winconsoleio test_winreg test_winsound test_zipfile64

Total duration: 4 min 31 sec

Click to see traceback logs
Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-ppc64le.lto-pgo/build/Lib/asyncio/sslproto.py", line 321, in __del__
    self.close()
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-ppc64le.lto-pgo/build/Lib/asyncio/sslproto.py", line 316, in close
    self._ssl_protocol._start_shutdown()
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-ppc64le.lto-pgo/build/Lib/asyncio/sslproto.py", line 590, in _start_shutdown
    self._abort()
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-ppc64le.lto-pgo/build/Lib/asyncio/sslproto.py", line 731, in _abort
    self._transport.abort()
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-ppc64le.lto-pgo/build/Lib/asyncio/selector_events.py", line 680, in abort
    self._force_close(None)
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-ppc64le.lto-pgo/build/Lib/asyncio/selector_events.py", line 731, in _force_close
    self._loop.call_soon(self._call_connection_lost, exc)
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-ppc64le.lto-pgo/build/Lib/asyncio/base_events.py", line 745, in call_soon
    self._check_closed()
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-ppc64le.lto-pgo/build/Lib/asyncio/base_events.py", line 510, in _check_closed
    raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@erlend-aasland erlend-aasland mentioned this pull request Feb 16, 2021
bpo-40170: Always define PyExceptionClass_Name as a function #24553
Merged
erlend-aasland pushed a commit to erlend-aasland/cpython that referenced this pull request Feb 17, 2021
Erlend E. Aasland
Move pythonGH-24533, pythonGH-24535, and pythonGH-24548 NEWS entries …
c794f9c
…to "C API" section
adorilson pushed a commit to adorilson/cpython that referenced this pull request Mar 13, 2021
Erlend Egeberg Aasland @adorilson
bpo-40170: Always define PyIter_Check() as a function (pythonGH-24548)
a64877a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@vstinner vstinner vstinner left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@erlend-aasland @vstinner @bedevere-bot @the-knights-who-say-ni
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.