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 — Minor: fix unicode-related inline function warnings by wjakob · Pull Request #93011 · python/cpython

Conversation

@wjakob

@wjakob wjakob commented May 20, 2022

Copy link
Copy Markdown
Contributor

When compiling my extension module against latest main version of CPython, I get many warnings related to unused parameters in unicodeobject.h. Example:

In file included from /Users/wjakob/nanobind/src/tensor.cpp:1:
In file included from /Users/wjakob/nanobind/include/nanobind/tensor.h:14:
In file included from /Users/wjakob/nanobind/include/nanobind/nanobind.h:37:
In file included from /Users/wjakob/nanobind/include/nanobind/nb_python.h:22:
In file included from /Users/wjakob/cpython-dist/include/python3.12/Python.h:51:
In file included from /Users/wjakob/cpython-dist/include/python3.12/unicodeobject.h:1029:
/Users/wjakob/cpython-dist/include/python3.12/cpython/unicodeobject.h:196:57: warning: unused parameter 'op' [-Wunused-parameter]
static inline unsigned int PyUnicode_IS_READY(PyObject *op) {
                                                        ^
/Users/wjakob/cpython-dist/include/python3.12/cpython/unicodeobject.h:416:45: warning: unused parameter 'op' [-Wunused-parameter]
static inline int PyUnicode_READY(PyObject *op)
                                            ^

This PR fixes those warnings. This isn't really a bug in Python, so I did not create a corresponding issue tracker ticket.

Sorry, something went wrong.

Uh oh!

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

All reactions
@ghost

ghost commented May 20, 2022 •
edited by ghost
Loading

Uh oh!

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

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.
CLA signed

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-bot

bedevere-bot commented May 20, 2022

Copy link
Copy Markdown

Most changes to Python require a NEWS entry.

Please add it using the blurb_it web app or the blurb command-line tool.

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-bot bedevere-bot added the awaiting review label May 20, 2022
@wjakob

wjakob commented May 20, 2022 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor Author

@bedevere-bot (This issue seems too minor to warrant an issue number or a NEWS entry)

All reactions

Sorry, something went wrong.

Uh oh!

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

@JelleZijlstra JelleZijlstra added skip issue skip news labels May 22, 2022
JelleZijlstra
JelleZijlstra approved these changes May 22, 2022
View reviewed changes

@JelleZijlstra JelleZijlstra 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 your contribution! cc @vstinner who worked on this file recently.

I think we can skip the news entry here because the problem it fixes hasn't been in any release (it's in the main branch only). If it had been in a release, we should have added a NEWS entry because it's a user-visible change.

I'll leave this open for a few days in case Victor or others have comments, and then merge.

Sorry, something went wrong.

Uh oh!

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

All reactions
@bedevere-bot bedevere-bot added awaiting merge and removed awaiting review labels May 22, 2022
@JelleZijlstra JelleZijlstra self-assigned this May 22, 2022
@vstinner

vstinner commented May 23, 2022

Copy link
Copy Markdown
Member

Thanks for your contribution! cc @vstinner who worked on this file recently.

cc @methane who introduced the warning.

All reactions

Sorry, something went wrong.

Uh oh!

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

vstinner
vstinner reviewed May 23, 2022
View reviewed changes
Comment thread Include/cpython/unicodeobject.h Resolved

Uh oh!

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

Comment thread Include/cpython/unicodeobject.h Resolved

Uh oh!

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

@wjakob
fix unicode-related inline function warnings
2e58f1b
@wjakob
wjakob force-pushed the unicode-warning branch from 723bde1 to 2e58f1b Compare May 23, 2022 11:33
@wjakob

wjakob commented May 23, 2022

Copy link
Copy Markdown
Contributor Author

(Commit amended with tweaked syntax)

All reactions

Sorry, something went wrong.

Uh oh!

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

vstinner
vstinner approved these changes May 23, 2022
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.

LGTM.

Sorry, something went wrong.

Uh oh!

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

All reactions
methane
methane approved these changes May 23, 2022
View reviewed changes
@vstinner
vstinner merged commit b2694ab into python:main May 23, 2022
@bedevere-bot bedevere-bot removed the awaiting merge label May 23, 2022
@vstinner

vstinner commented May 23, 2022

Copy link
Copy Markdown
Member

Merged, thanks.

All reactions

Sorry, something went wrong.

Uh oh!

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

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

Reviewers

@vstinner vstinner vstinner approved these changes
@methane methane methane approved these changes
@JelleZijlstra JelleZijlstra JelleZijlstra approved these changes

Uh oh!

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

Assignees

@JelleZijlstra JelleZijlstra

Labels

skip issue skip news

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.

5 participants

@wjakob @bedevere-bot @vstinner @methane @JelleZijlstra
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.