FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

bpo-36127: Fix _PyArg_UnpackKeywords() warning by vstinner · Pull Request #12345 · python/cpython · GitHub

/ cpython Public

bpo-36127: Fix _PyArg_UnpackKeywords() warning - #12345

Closed
vstinner wants to merge 1 commit into
python:masterfrom
vstinner:getargs_warn
Closed

bpo-36127: Fix _PyArg_UnpackKeywords() warning#12345
vstinner wants to merge 1 commit into
python:masterfrom
vstinner:getargs_warn

Conversation

vstinner commented Mar 15, 2019
edited by bedevere-bot
Loading

Copy link
Copy Markdown
Member

Use Py_ssize_t type rather than int for the 'i' variable.

https://bugs.python.org/issue36127

Use Py_ssize_t type rather than int for the 'i' variable.

Copy link
Copy Markdown
Member Author

This change fix the following warning on Windows:

c:\projects\cpython\python\getargs.c(2425): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data [C:\projects\cpython\PCbuild\pythoncore.vcxproj]

@serhiy-storchaka: Would you mind to review this change?

Copy link
Copy Markdown
Member

I do not think this is the best way to fix this warning. All corresponding variables except nargs have type int, and I want to preserve this.

Copy link
Copy Markdown
Member Author

I do not think this is the best way to fix this warning. All corresponding variables except nargs have type int, and I want to preserve this.

Why is it wrong to use Py_ssize_t for 'i'?

I don't want to use Py_ssize_t for other variables, since _PyParser uses int.

Feel free to fix the warning differently. I only worry of having no compiler warning on Windows :-)

Copy link
Copy Markdown
Member Author

Serhiy wrote a diffrent fix: PR #12353.

vstinner closed this Mar 18, 2019
vstinner deleted the getargs_warn branch March 18, 2019 17:39
loic-simon added a commit to loic-simon/cpython that referenced this pull request Apr 30, 2025
gpshead added a commit to gpshead/blurb that referenced this pull request Jul 4, 2025
Integrate the user-friendly features from PR python#16 by @picnixz into the
automation support from PR python#45, making the CLI more intuitive:

- Change --gh-issue to --issue, accepting multiple formats:
  * Plain numbers: --issue 12345
  * With gh- prefix: --issue gh-12345
  * GitHub URLs: --issue python/cpython#12345

- Add smart section matching with:
  * Case-insensitive matching: --section lib matches "Library"
  * Partial matching: --section doc matches "Documentation"
  * Common aliases: --section api matches "C API"
  * Separator normalization: --section core-and-builtins

- Improve error messages for invalid sections

This combines the automation features from PR python#45 with the interface
improvements suggested by @picnixz in PR python#16, as reviewed by @hugovk
and @larryhastings.

Co-authored-by: picnixz <picnixz@users.noreply.github.com>
gpshead added a commit to gpshead/blurb that referenced this pull request Jul 4, 2025
Integrate the user-friendly features from PR python#16 by @picnixz into the automation support from PR python#45, making the CLI more intuitive:

- Change --gh-issue to --issue, accepting multiple formats:
  * Plain numbers: --issue 12345
  * With gh- prefix: --issue gh-12345
  * GitHub URLs: --issue python/cpython#12345

- Add smart section matching with:
  * Case-insensitive matching: --section lib matches "Library"
  * Partial matching: --section doc matches "Documentation"
  * Common aliases: --section api matches "C API"
  * Separator normalization: --section core-and-builtins

- Improve error messages for invalid sections

This combines the automation features from PR python#45 with the interface improvements suggested by @picnixz in PR python#16, as reviewed by @hugovk and @larryhastings.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL