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-93649: Split getargs testing from _testcapimodule.c by erlend-aasland · Pull Request #99346 · python/cpython

Conversation

@erlend-aasland

@erlend-aasland erlend-aasland commented Nov 10, 2022 •
edited by bedevere-bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor
  • Issue: Split up _testcapimodule.c #93649

Sorry, something went wrong.

Uh oh!

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

All reactions
@erlend-aasland
pythongh-93649: Split getargs testing from _testcapimodule.c
ff37535
@erlend-aasland
erlend-aasland requested a review from a team as a code owner November 10, 2022 20:55
@erlend-aasland
erlend-aasland requested a review from encukou November 10, 2022 20:55
@bedevere-bot bedevere-bot mentioned this pull request Nov 10, 2022
Split up _testcapimodule.c #93649
Open
@bedevere-bot bedevere-bot added the awaiting core review label Nov 10, 2022
@erlend-aasland erlend-aasland added the skip news label Nov 10, 2022
@erlend-aasland
Modernise a little bit
5dfdd5c
- a couple of PEP 7 nits
- use intermingled decls a few places
- Use Py_NewRef() API to save a few lines
@erlend-aasland

erlend-aasland commented Nov 11, 2022 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor Author

There is some fishy error handling in some of the test methods. Let's handle those in a separate issue/PR. An example is test_k_code(), where tuple leak in multiple branches.

All reactions

Sorry, something went wrong.

Uh oh!

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

@encukou

encukou commented Nov 14, 2022

Copy link
Copy Markdown
Member

Leaks in failing tests? The only situation I see where that's is a problem is when tests are used as API usage examples. So, it's good to fix those, but not too important for older tests.

Undefining PyArg_ParseTupleAndKeywords and defining again it is also a bit fishy – IMO it would better to havs the non-Size_T definition in the public header file, albeit shadowed by a macro, so only #undef would suffice. But that's an unrelated issue.

erlend-aasland reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

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

encukou
encukou approved these changes Nov 14, 2022
View reviewed changes
@bedevere-bot bedevere-bot added awaiting merge and removed awaiting core review labels Nov 14, 2022
@erlend-aasland
Sync with main
5d1df0d
@erlend-aasland

erlend-aasland commented Nov 14, 2022

Copy link
Copy Markdown
Contributor Author

Leaks in failing tests?

Yes, only in error handling paths, and it's not a problem in practice.

Undefining PyArg_ParseTupleAndKeywords and defining again it is also a bit fishy – IMO it would better to havs the non-Size_T definition in the public header file, albeit shadowed by a macro, so only #undef would suffice. But that's an unrelated issue.

+1

All reactions

Sorry, something went wrong.

Uh oh!

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

@erlend-aasland
Merge branch 'main' into testcapi/extract-arg-stuff
cd671a1
@erlend-aasland
erlend-aasland merged commit 3d94319 into python:main Nov 14, 2022
@erlend-aasland
erlend-aasland deleted the testcapi/extract-arg-stuff branch November 14, 2022 21:23
@bedevere-bot bedevere-bot removed the awaiting merge label Nov 14, 2022
CuriousLearner added a commit to CuriousLearner/cpython that referenced this pull request Nov 16, 2022
@CuriousLearner
Merge branch 'main' into fix-issue21914
abd206e
* main: (8272 commits)
  Update Windows readme.txt to clarify Visual Studio required versions (pythonGH-99522)
  pythongh-99460 Emscripten trampolines on optimized METH_O and METH_NOARGS code paths (python#99461)
  pythongh-92647: [Enum] use final status to determine lookup or create (pythonGH-99500)
  pythongh-81057: Move Globals in Core Code to _PyRuntimeState (pythongh-99496)
  Post 3.12.0a2
  pythongh-99300: Use Py_NewRef() in Python/Python-ast.c (python#99499)
  pythongh-93649: Split pytime and datetime tests from _testcapimodule.c (python#99494)
  pythongh-99370: fix test_zippath_from_non_installed_posix (pythonGH-99483)
  pythonGH-99205: remove `_static` field from `PyThreadState` and `PyInterpreterState` (pythonGH-99385)
  pythongh-81057: Move the Remaining Import State Globals to _PyRuntimeState (pythongh-99488)
  pythongh-87604: Avoid publishing list of active per-interpreter audit hooks via the gc module (pythonGH-99373)
  pythongh-93649: Split getargs tests from _testcapimodule.c (python#99346)
  pythongh-81057: Move Global Variables Holding Objects to _PyRuntimeState. (pythongh-99487)
  pythonGH-98219: reduce sleep time in `asyncio` subprocess test (python#99464)
  pythonGH-99388: add `loop_factory` parameter to `asyncio.run` (python#99462)
  pythongh-99300: Use Py_NewRef() in PC/ directory (python#99479)
  pythongh-99300: Use Py_NewRef() in Doc/ directory  (python#99480)
  pythongh-99300: Use Py_NewRef() in Modules/ directory (python#99473)
  pythongh-99300: Use Py_NewRef() in Modules/ directory (python#99469)
  pythongh-99370: Calculate zip path from prefix when in a venv (pythonGH-99371)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@encukou encukou encukou approved these changes

Uh oh!

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

Assignees

No one assigned

Labels

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.

3 participants

@erlend-aasland @encukou @bedevere-bot
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.