Skip to content

Remove fallback from inspect wrapper #5513

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

Closed
Zac-HD opened this issue Jun 28, 2019 · 3 comments
Closed

Remove fallback from inspect wrapper #5513

Zac-HD opened this issue Jun 28, 2019 · 3 comments
Labels
good first issue easy issue that is friendly to new contributor type: refactoring internal improvements to the code

Comments

@Zac-HD
Copy link
Member

Zac-HD commented Jun 28, 2019

Now that the master branch only has to be compatible with Python 3.5+, we can simplify the following code because inspect.unwrap was added in 3.4:

real_unwrap = getattr(inspect, "unwrap", None)
if real_unwrap is None:
yield
else:

So we can just use real_unwrap = inspect.unwrap, and unconditionally run the else: block. This is a good issue for a first-time contributor!

@Zac-HD Zac-HD added good first issue easy issue that is friendly to new contributor type: refactoring internal improvements to the code labels Jun 28, 2019
@AmirElkess
Copy link
Contributor

AmirElkess commented Jun 28, 2019

I apologize if any mistake happened, as it's my first contribution to open-source community.

I made this change, which passed the tests, then pushed it.
According to the contribution guide, the next step is to create a new changelog entry, and I am unsure of the type of this issue.

Can you please check if my pull request is correct, and tell me what type is this issue?
Thanks.

@nicoddemus
Copy link
Member

Hi @AmirElkess,

Thanks for the contribution in #5518. I will comment about your questions in there. 👍

@nicoddemus
Copy link
Member

Fixed by #5518

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue easy issue that is friendly to new contributor type: refactoring internal improvements to the code
Projects
None yet
Development

No branches or pull requests

3 participants