Skip to content
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

Version compatible inspect handling for class parameters #299

Merged
merged 2 commits into from May 18, 2023

Conversation

johnlarkin1
Copy link
Contributor

getargspec was deprecated in Python 3.0, but finally removed in Python 3.11. For reference: Pylons/pyramid#3688

That seems like a valid amount of time for us to have fixed it.

We can do our best effort and if the user is running a Python version that still has getargspec use that, but if they have getfullargspec which is available in Python 3.11, we can use that.

Checklist

General Contributing

  • Have you read the Code of Conduct and signed the CLA?

Is This a Code Change?

  • Non-code related change (markdown/git settings etc)
  • Code Change
  • Example/Test Code Change

Validation

  • Have you ran tox?
  • Do the tests pass?

`getargspec` was deprecated in Python 3.0, but finally removed in Python
3.11. For reference: Pylons/pyramid#3688

That seems like a valid amount of time.

We can do our best effort and if the user is running a Python version
that still has `getargspec` use that, but if they have `getfullargspec`
which is available in Python 3.11, we can use that.
include `isclass`
@codecov
Copy link

codecov bot commented May 18, 2023

Codecov Report

Merging #299 (49fa860) into main (bdd49bc) will decrease coverage by 0.01%.
The diff coverage is 71.42%.

❗ Current head 49fa860 differs from pull request most recent head 61df2af. Consider uploading reports for the commit 61df2af to get more accurate results

@@            Coverage Diff             @@
##             main     #299      +/-   ##
==========================================
- Coverage   52.02%   52.02%   -0.01%     
==========================================
  Files          37       37              
  Lines        8458     8462       +4     
  Branches     1810     1810              
==========================================
+ Hits         4400     4402       +2     
- Misses       3741     3743       +2     
  Partials      317      317              
Flag Coverage Δ
unit 52.02% <71.42%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
stone/frontend/ir_generator.py 80.45% <71.42%> (-0.14%) ⬇️

Copy link
Contributor

@sderickson sderickson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@sderickson sderickson merged commit 199029a into main May 18, 2023
2 of 10 checks passed
@sderickson sderickson deleted the fix_inspect_version_deprecation branch May 18, 2023 22:06
@devPalacio
Copy link
Contributor

Fixes #288

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

Successfully merging this pull request may close these issues.

None yet

3 participants