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 — gh-101907: Stop using `_Py_OPCODE` and `_Py_OPARG` macros by zooba · Pull Request #101912 · python/cpython

Conversation

@zooba

@zooba zooba commented Feb 14, 2023 •
edited by bedevere-bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

Stops using the macros throughout our core codebase and makes them compatible with previous releases.

  • Issue: code.h uses MS-only C++ extensions #101907

Sorry, something went wrong.

Uh oh!

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

All reactions
zooba added 3 commits February 14, 2023 15:53
@zooba
pythongh-101907: Removes use of non-standard C++ extension from Inclu…
1f5d7cb
…de/cpython/code.h
@zooba
Use SET macros instead
5005130
@zooba
Remove macros from internal use instead
b4fd83d
@bedevere-bot bedevere-bot added the awaiting core review label Feb 14, 2023
@bedevere-bot bedevere-bot mentioned this pull request Feb 14, 2023
code.h uses MS-only C++ extensions #101907
Closed
@zooba

zooba commented Feb 14, 2023

Copy link
Copy Markdown
Member Author

Posted as a draft because it doesn't build for some reason deep inside macros in generated code in ceval. I'll try to figure it out later

All reactions

Sorry, something went wrong.

Uh oh!

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

zooba added 4 commits February 14, 2023 20:40
@zooba
Rename macro parameter
a517463
@zooba
Make cases_generator correct on Windows
2bcfd8d
@zooba
Fix hash func
c654b35
@zooba
Merge remote-tracking branch 'cpython/main' into pythongh-101907-2
5edc4d4
@zooba
zooba marked this pull request as ready for review February 14, 2023 21:53
@zooba
zooba requested review from iritkatriel and markshannon as code owners February 14, 2023 21:53
@zooba zooba mentioned this pull request Feb 14, 2023
gh-101907: Removes use of non-standard C++ extension from Include/cpython/code.h #101909
Closed
markshannon
markshannon requested changes Feb 15, 2023
View reviewed changes

@markshannon markshannon 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.

Thanks for this. It makes the code a bit easy to reason about.

The change to to _py_set_opcode looks wrong, but otherwise LGTM.

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread Include/cpython/code.h Resolved

Uh oh!

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

Comment thread Tools/cases_generator/generate_cases.py Resolved

Uh oh!

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

@bedevere-bot bedevere-bot added awaiting changes and removed awaiting core review labels Feb 15, 2023
@bedevere-bot

bedevere-bot commented Feb 15, 2023

Copy link
Copy Markdown

When you're done making the requested changes, leave the comment: I have made the requested changes; please review again.

All reactions

Sorry, something went wrong.

Uh oh!

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

@zooba
Fix set_opcode and generated file
5d401ed
@zooba

zooba commented Feb 15, 2023

Copy link
Copy Markdown
Member Author

I have made the requested changes; please review again

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-bot bedevere-bot added awaiting change review and removed awaiting changes labels Feb 15, 2023
@bedevere-bot

bedevere-bot commented Feb 15, 2023

Copy link
Copy Markdown

Thanks for making the requested changes!

@markshannon: please review the changes made to this pull request.

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-bot
bedevere-bot requested a review from markshannon February 15, 2023 20:50
@markshannon

markshannon commented Feb 20, 2023

Copy link
Copy Markdown
Member

LGTM.

Thanks for doing this.

All reactions

Sorry, something went wrong.

Uh oh!

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

@markshannon
markshannon merged commit a99eb5c into python:main Feb 20, 2023
@bedevere-bot bedevere-bot removed the awaiting change review label Feb 20, 2023
@bedevere-bot

bedevere-bot commented Feb 20, 2023

Copy link
Copy Markdown

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

Hi! The buildbot ARM64 macOS 3.x has failed when building commit a99eb5c.

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/725/builds/3779) and take a look at the build logs.
  4. Check if the failure is related to this commit (a99eb5c) 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/725/builds/3779

Failed tests:

  • test_asyncio

Failed subtests:

  • test_wait_for_race_condition - test.test_asyncio.test_waitfor.AsyncioWaitForTest.test_wait_for_race_condition

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

== Tests result: FAILURE then FAILURE ==

405 tests OK.

10 slowest tests:

  • test_signal: 4 min 20 sec
  • test_concurrent_futures: 2 min 36 sec
  • test_multiprocessing_spawn: 2 min 8 sec
  • test_ssl: 1 min 47 sec
  • test_multiprocessing_forkserver: 1 min 39 sec
  • test_asyncio: 1 min 29 sec
  • test_math: 1 min 7 sec
  • test_logging: 1 min 4 sec
  • test_capi: 49.7 sec
  • test_tokenize: 40.5 sec

1 test failed:
test_asyncio

25 tests skipped:
test_check_c_globals test_devpoll test_epoll test_gdb test_idle
test_ioctl test_launcher test_msilib test_multiprocessing_fork
test_ossaudiodev test_peg_generator test_perf_profiler test_spwd
test_startfile test_tcl test_tix test_tkinter test_ttk
test_ttk_textonly test_turtle test_winconsoleio test_winreg
test_winsound test_wmi test_zipfile64

1 re-run test:
test_asyncio

Total duration: 8 min 37 sec

Click to see traceback logs
Traceback (most recent call last):
  File "/Users/buildbot/buildarea/3.x.pablogsal-macos-m1.macos-with-brew/build/Lib/asyncio/tasks.py", line 478, in wait_for
    return await fut
           ^^^^^^^^^
asyncio.exceptions.CancelledError


Traceback (most recent call last):
  File "/Users/buildbot/buildarea/3.x.pablogsal-macos-m1.macos-with-brew/build/Lib/unittest/async_case.py", line 90, in _callTestMethod
    if self._callMaybeAsync(method) is not None:
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/buildbot/buildarea/3.x.pablogsal-macos-m1.macos-with-brew/build/Lib/unittest/async_case.py", line 112, in _callMaybeAsync
    return self._asyncioRunner.run(
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/buildbot/buildarea/3.x.pablogsal-macos-m1.macos-with-brew/build/Lib/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/buildbot/buildarea/3.x.pablogsal-macos-m1.macos-with-brew/build/Lib/asyncio/base_events.py", line 664, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/Users/buildbot/buildarea/3.x.pablogsal-macos-m1.macos-with-brew/build/Lib/test/test_asyncio/test_waitfor.py", line 163, in test_wait_for_race_condition
    res = await task
          ^^^^^^^^^^
  File "/Users/buildbot/buildarea/3.x.pablogsal-macos-m1.macos-with-brew/build/Lib/asyncio/tasks.py", line 477, in wait_for
    async with timeouts.timeout(timeout):
  File "/Users/buildbot/buildarea/3.x.pablogsal-macos-m1.macos-with-brew/build/Lib/asyncio/timeouts.py", line 98, in __aexit__
    raise TimeoutError
TimeoutError
All reactions

Sorry, something went wrong.

Uh oh!

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

@zooba
zooba deleted the gh-101907-2 branch February 20, 2023 15:32
jaraco pushed a commit to jaraco/cpython that referenced this pull request Feb 20, 2023
@zooba @jaraco
pythongh-101907: Stop using _Py_OPCODE and _Py_OPARG macros (pyth…
ca5d36e
…onGH-101912)

* pythongh-101907: Removes use of non-standard C++ extension from Include/cpython/code.h

* Make cases_generator correct on Windows
@jaraco jaraco mentioned this pull request Feb 20, 2023
gh-88233: zipfile: refactor _strip_extra #102083
Closed
carljm added a commit to carljm/cpython that referenced this pull request Feb 20, 2023
@carljm
Merge branch 'main' into inlinecomp2
9f0fc5b
* main: (60 commits)
  pythongh-102056: Fix a few bugs in error handling of exception printing code (python#102078)
  pythongh-102011: use sys.exception() instead of sys.exc_info() in docs where possible (python#102012)
  pythongh-101566: Sync with zipp 3.14. (pythonGH-102018)
  pythonGH-99818: improve the documentation for zipfile.Path and Traversable (pythonGH-101589)
  pythongh-88233: zipfile: handle extras after a zip64 extra (pythonGH-96161)
  pythongh-101981: Apply HOMEBREW related environment variables (pythongh-102074)
  pythongh-101907: Stop using `_Py_OPCODE` and `_Py_OPARG` macros (pythonGH-101912)
  pythongh-101819: Adapt _io types to heap types, batch 1 (pythonGH-101949)
  pythongh-101981: Build macOS as recommended by the devguide (pythonGH-102070)
  pythongh-97786: Fix compiler warnings in pytime.c (python#101826)
  pythongh-101578: Amend PyErr_{Set,Get}RaisedException docs (python#101962)
  Misc improvements to the float tutorial (pythonGH-102052)
  pythongh-85417: Clarify behaviour on branch cuts in cmath module (python#102046)
  pythongh-100425: Update tutorial docs related to sum() accuracy (FH-101854)
  Add missing 'is' to `cmath.log()` docstring (python#102049)
  pythongh-100210: Correct the comment link for unescaping HTML (python#100212)
  pythongh-97930: Also include subdirectory in makefile. (python#102030)
  pythongh-99735: Use required=True in argparse subparsers example (python#100927)
  Fix incorrectly documented attribute in csv docs (python#101250)
  pythonGH-84783: Make the slice object hashable (pythonGH-101264)
  ...
carljm added a commit to carljm/cpython that referenced this pull request Feb 22, 2023
@carljm
Merge branch 'main' into inlinecomp
544b30c
* main: (225 commits)
  pythongh-102056: Fix a few bugs in error handling of exception printing code (python#102078)
  pythongh-102011: use sys.exception() instead of sys.exc_info() in docs where possible (python#102012)
  pythongh-101566: Sync with zipp 3.14. (pythonGH-102018)
  pythonGH-99818: improve the documentation for zipfile.Path and Traversable (pythonGH-101589)
  pythongh-88233: zipfile: handle extras after a zip64 extra (pythonGH-96161)
  pythongh-101981: Apply HOMEBREW related environment variables (pythongh-102074)
  pythongh-101907: Stop using `_Py_OPCODE` and `_Py_OPARG` macros (pythonGH-101912)
  pythongh-101819: Adapt _io types to heap types, batch 1 (pythonGH-101949)
  pythongh-101981: Build macOS as recommended by the devguide (pythonGH-102070)
  pythongh-97786: Fix compiler warnings in pytime.c (python#101826)
  pythongh-101578: Amend PyErr_{Set,Get}RaisedException docs (python#101962)
  Misc improvements to the float tutorial (pythonGH-102052)
  pythongh-85417: Clarify behaviour on branch cuts in cmath module (python#102046)
  pythongh-100425: Update tutorial docs related to sum() accuracy (FH-101854)
  Add missing 'is' to `cmath.log()` docstring (python#102049)
  pythongh-100210: Correct the comment link for unescaping HTML (python#100212)
  pythongh-97930: Also include subdirectory in makefile. (python#102030)
  pythongh-99735: Use required=True in argparse subparsers example (python#100927)
  Fix incorrectly documented attribute in csv docs (python#101250)
  pythonGH-84783: Make the slice object hashable (pythonGH-101264)
  ...
python-sidebar pushed a commit to python-sidebar/Python-Documentation-Fork-With-TOC that referenced this pull request Sep 1, 2024
@zooba @python-sidebar
pythongh-101907: Stop using _Py_OPCODE and _Py_OPARG macros (pyth…
193d39f
…onGH-101912)

* pythongh-101907: Removes use of non-standard C++ extension from Include/cpython/code.h

* Make cases_generator correct on Windows
python-sidebar pushed a commit to python-sidebar/Python-Documentation-Fork-With-TOC that referenced this pull request Sep 1, 2024
@zooba @python-sidebar
pythongh-101907: Stop using _Py_OPCODE and _Py_OPARG macros (pyth…
32413a0
…onGH-101912)

* pythongh-101907: Removes use of non-standard C++ extension from Include/cpython/code.h

* Make cases_generator correct on Windows
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@iritkatriel iritkatriel Awaiting requested review from iritkatriel iritkatriel is a code owner
@markshannon markshannon Awaiting requested review from markshannon markshannon is a code owner

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.

3 participants

@zooba @bedevere-bot @markshannon
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.