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-107782: Use _testcapi to test non-representable signatures by serhiy-storchaka · Pull Request #109325 · python/cpython

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented Sep 12, 2023 •
edited by bedevere-app Bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

Builtin functions and methods that have non-representable signatures today will have representable signatures yesterday, and they will become unusable for testing this feature.

So we need to add special functions and methods to the _testcapi module that always have non-representable signatures.

  • Issue: Pydoc: fall back to __text_signature__ if inspect.signature() fails #107782

Sorry, something went wrong.

Uh oh!

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

All reactions
@serhiy-storchaka
pythongh-107782: Use _testcapi to test non-representable signatures
5fe56f0
Builtin functions and methods that have non-representable signatures today
will have representable signatures yesterday, and they will become unusable
for testing this feature.

So we need to add special functions and methods to the _testcapi module
that always have non-representable signatures.
@serhiy-storchaka serhiy-storchaka added the skip news label Sep 12, 2023
@bedevere-app bedevere-app Bot added the awaiting review label Sep 12, 2023
@bedevere-app bedevere-app Bot mentioned this pull request Sep 12, 2023
Pydoc: fall back to __text_signature__ if inspect.signature() fails #107782
Closed
@serhiy-storchaka serhiy-storchaka mentioned this pull request Sep 12, 2023
gh-107526: Fix test_module_level_callable_unrepresentable_default #108187
Merged
@serhiy-storchaka

serhiy-storchaka commented Sep 13, 2023

Copy link
Copy Markdown
Member Author

I do not understand why Tools/c-analyzer/check-c-globals.py complains about DocStringUnrepresentableSignatureTest, but not about DocStringNoSignatureTest in Modules/_testcapi/docstring.c. They are almost identical, only names and methods are different. Both are added by me, so there is no any special magic hidden.

@ericsnowcurrently, could you explain this?

All reactions

Sorry, something went wrong.

Uh oh!

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

@serhiy-storchaka
Silence Tools/c-analyzer/check-c-globals.py.
820f4cf
@ericsnowcurrently

ericsnowcurrently commented Sep 13, 2023

Copy link
Copy Markdown
Member

Unfortunately, the tool never learned to reliably identify implicitly-const static definitions (e.g. Py*Def arrays/structs like the PyMethodDef one you added in this PR). Instead, such variables usually have to be manually added to Tools/c-analyzer/cpython/ignored.tsv. DocStringNoSignatureTest was added there a while back.

You can move the entry you added to globals-to-fix.tsv over to ignored.tsv.

serhiy-storchaka reacted with heart emoji
All reactions
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

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

serhiy-storchaka added 2 commits September 13, 2023 21:38
@serhiy-storchaka
Move from globals-to-fix.tsv to ignored.tsv.
a126bc9
@serhiy-storchaka
Merge branch 'main' into test-pydoc-unrepresentable
a4d27ed
@serhiy-storchaka

serhiy-storchaka commented Sep 13, 2023

Copy link
Copy Markdown
Member Author

Thank you Eric. I did not know about ignored.tsv.

ericsnowcurrently 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.

@serhiy-storchaka
serhiy-storchaka merged commit 1f885df into python:main Sep 14, 2023
@bedevere-app bedevere-app Bot removed the awaiting review label Sep 14, 2023
@serhiy-storchaka
serhiy-storchaka deleted the test-pydoc-unrepresentable branch September 14, 2023 06:12
@serhiy-storchaka serhiy-storchaka added needs backport to 3.11 only security fixes needs backport to 3.12 only security fixes labels Sep 14, 2023
@miss-islington

miss-islington commented Sep 14, 2023

Copy link
Copy Markdown
Contributor

Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

All reactions

Sorry, something went wrong.

Uh oh!

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

@miss-islington

miss-islington commented Sep 14, 2023

Copy link
Copy Markdown
Contributor

Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

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

@miss-islington

miss-islington commented Sep 14, 2023

Copy link
Copy Markdown
Contributor

Sorry, @serhiy-storchaka, I could not cleanly backport this to 3.12 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 1f885df2a580360c5de69cc41191f3c6bfaaeb35 3.12

All reactions

Sorry, something went wrong.

Uh oh!

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

@miss-islington miss-islington assigned serhiy-storchaka Sep 14, 2023
@miss-islington

miss-islington commented Sep 14, 2023

Copy link
Copy Markdown
Contributor

Sorry, @serhiy-storchaka, I could not cleanly backport this to 3.11 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 1f885df2a580360c5de69cc41191f3c6bfaaeb35 3.11

All reactions

Sorry, something went wrong.

Uh oh!

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

@serhiy-storchaka serhiy-storchaka removed needs backport to 3.11 only security fixes needs backport to 3.12 only security fixes labels Sep 14, 2023
@bedevere-bot

bedevere-bot commented Sep 14, 2023

Copy link
Copy Markdown

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

Hi! The buildbot PPC64LE RHEL8 LTO 3.x has failed when building commit 1f885df.

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

Failed tests:

  • test.test_asyncio.test_subprocess

Failed subtests:

  • test_subprocess_consistent_callbacks - test.test_asyncio.test_subprocess.SubprocessThreadedWatcherTests.test_subprocess_consistent_callbacks

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

==

Click to see traceback logs
Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-ppc64le.lto/build/Lib/test/test_asyncio/test_subprocess.py", line 788, in test_subprocess_consistent_callbacks
    self.loop.run_until_complete(main())
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-ppc64le.lto/build/Lib/asyncio/base_events.py", line 664, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-ppc64le.lto/build/Lib/test/test_asyncio/test_subprocess.py", line 780, in main
    self.assertEqual(events, [
AssertionError: Lists differ: [('pi[29 chars]t'), 'pipe_connection_lost', ('pipe_data_recei[57 chars]ted'] != [('pi[29 chars]t'), ('pipe_data_received', 2, b'stderr'), 'pi[57 chars]ted']
All reactions

Sorry, something went wrong.

Uh oh!

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

@serhiy-storchaka serhiy-storchaka removed their assignment Jul 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

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.

4 participants

@serhiy-storchaka @ericsnowcurrently @miss-islington @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.