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

Remove custom rule for deprecation warnigns in __main__ #11333

Open
Carreau opened this issue Sep 27, 2018 · 10 comments
Open

Remove custom rule for deprecation warnigns in __main__ #11333

Carreau opened this issue Sep 27, 2018 · 10 comments

Comments

@Carreau
Copy link
Member

Carreau commented Sep 27, 2018

See https://www.python.org/dev/peps/pep-0565/ we might be able to remove some custom code on 3.7+ and/or have a behavior which is closer to what is defined in the pep.

[EDIT]
This code is now conditionally run on < 3.7 (see #11396), once Python 3.6 is dropped this can actually be removed.

@Carreau Carreau added good first issue help wanted Hacktoberfest you want to participate to hacktoberfest ? Here is an easy issue. labels Sep 27, 2018
@Carreau
Copy link
Member Author

Carreau commented Sep 27, 2018

See #8478 and #8480 for context/historical discussions.

@yo-ga
Copy link

yo-ga commented Oct 1, 2018

@Carreau I would like to fix it. BTW, if I get it right, I just need to remove the code added in #8480

@Carreau
Copy link
Member Author

Carreau commented Oct 1, 2018

@Carreau I would like to fix it. BTW, if I get it right, I just need to remove the code added in #8480

As this is fixed in CPython only as 3.7, it way need to be moved to a :

if sys.info_version < (3,7):
   ... code

So that once we drop 3.6 we can remove the code.

@LucianaMarques
Copy link
Contributor

Hi,

Are there any news on this issue? Was there any pull request already made?

@Carreau
Copy link
Member Author

Carreau commented Oct 13, 2018

Are there any news on this issue? Was there any pull request already made?

I don't believe any pull request was made. Feel free to take it.

@LucianaMarques
Copy link
Contributor

Are there any news on this issue? Was there any pull request already made?

I don't believe any pull request was made. Feel free to take it.

Thank you! I'm reading the links you sent and will come back soon with updates.

@LucianaMarques
Copy link
Contributor

I believe that I have a Pull Request already, however I have some doubts about the project's code and haven't ran any tests. Should I make it anyway and discuss it in the PR? Or should we solve it here?

I simply added the

if sys.info_version < (3,7):
...code

mentioned above on the init_deprecation_warnings() functions in the main IPython class. What i understood is that this issue is fixed for python 3.7 but not for older versions, so I guessed this should suffice.

I wanted opinions from more experienced developers in this project to help to check it and to test it.

(I made the PR anyway, I saw in Contributing.md that any PR should be done as soon as there is code to discuss)

@Carreau
Copy link
Member Author

Carreau commented Oct 14, 2018

Should I make it anyway and discuss it in the PR?
I made the PR anyway

Yes, that is the right thing to do. You can run test locally with iptest , but making the PR will have out continuous integration suite run the tests.

Thanks, I'll have a look at the PR.

@Carreau Carreau removed Hacktoberfest you want to participate to hacktoberfest ? Here is an easy issue. good first issue help wanted labels Oct 14, 2018
@Carreau
Copy link
Member Author

Carreau commented Oct 14, 2018

The code is now conditionally run on < 3.7 (see #11396), once Python 3.6 is dropped this can actually be removed.

@Carreau
Copy link
Member Author

Carreau commented Oct 14, 2018

Thanks @LucianaMarques !

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

No branches or pull requests

3 participants