Skip to content

Use dict instead of print to test callable without signature #3478

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 10, 2022

Conversation

frenzymadness
Copy link
Contributor

In Python 3.11, inspect.signature(print) no longer raises
ValueError.

Fixes: #3459

In Python 3.11, `inspect.signature(print)` no longer raises
ValueError.

Fixes: jupyter-widgets#3459
@github-actions
Copy link

github-actions bot commented Jun 8, 2022

Binder 👈 Launch a binder notebook on branch frenzymadness/ipywidgets/fix_test_noinspect

@frenzymadness
Copy link
Contributor Author

Would it make sense to add Python 3.11 to the CI?

@jasongrout
Copy link
Member

Would it make sense to add Python 3.11 to the CI?

Sure. Would you mind adding it to

python-version: ['3.7', '3.8', '3.9', '3.10']
?

From https://til.simonwillison.net/github-actions/python-3-11, it seems that just adding "3.11-dev" may be all that is needed.

@jasongrout
Copy link
Member

it seems that just adding "3.11-dev" may be all that is needed.

Yes, "3.11-dev" according to the docs:

Use -dev instead of a patch number (e.g., 3.11-dev) to install the latest patch version release for a given minor version, alpha and beta releases included.

We might need to also update

uses: actions/setup-python@v1
to version 2: actions/setup-python@v2

@jasongrout jasongrout added this to the 8.0 milestone Jun 9, 2022
@frenzymadness
Copy link
Contributor Author

Should I open a new PR? I can also add it here as both changes are related to Python 3.11.

@jasongrout
Copy link
Member

Should I open a new PR? I can also add it here as both changes are related to Python 3.11.

I think adding it here makes a lot of sense. And if you add it here, we'll get to see that your change makes tests pass for Python 3.11 too. Thanks!

@frenzymadness
Copy link
Contributor Author

All green!

@jasongrout
Copy link
Member

Awesome, thank you!

@jasongrout jasongrout merged commit d1491e9 into jupyter-widgets:master Jun 10, 2022
@jasongrout
Copy link
Member

@meeseeksdev please backport to 7.x

@lumberbot-app
Copy link

lumberbot-app bot commented Jun 10, 2022

Owee, I'm MrMeeseeks, Look at me.

There seem to be a conflict, please backport manually. Here are approximate instructions:

  1. Checkout backport branch and update it.
git checkout 7.x
git pull
  1. Cherry pick the first parent branch of the this PR on top of the older branch:
git cherry-pick -x -m1 d1491e99f0ed2760f731b0f84dc108721c973fb2
  1. You will likely have some merge/cherry-pick conflict here, fix them and commit:
git commit -am 'Backport PR #3478: Use `dict` instead of `print` to test callable without signature'
  1. Push to a named branch:
git push YOURFORK 7.x:auto-backport-of-pr-3478-on-7.x
  1. Create a PR against branch 7.x, I would have named this PR:

"Backport PR #3478 on branch 7.x (Use dict instead of print to test callable without signature)"

And apply the correct labels and milestones.

Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon!

Remember to remove the Still Needs Manual Backport label once the PR gets merged.

If these instructions are inaccurate, feel free to suggest an improvement.

frenzymadness pushed a commit to frenzymadness/ipywidgets that referenced this pull request Jun 10, 2022
jasongrout added a commit that referenced this pull request Jun 10, 2022
Backport PR #3478 on branch 7.x (Use dict instead of print to test callable without signature)
@jasongrout
Copy link
Member

Backported in #3480

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

One test fails with Python 3.11 beta 1
2 participants