Skip to content

Remove custom rule for deprecation warnigns in __main__ #11333

Closed

Description

@Carreau

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.

Activity

  1. Carreau commented on Sep 27, 2018

    @Carreau
    MemberAuthor

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

  2. yo-ga commented on Oct 1, 2018

    @yo-ga

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

  3. Carreau commented on Oct 1, 2018

    @Carreau
    MemberAuthor

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

  4. LucianaMarques commented on Oct 13, 2018

    @LucianaMarques
    Contributor

    Hi,

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

  5. Carreau commented on Oct 13, 2018

    @Carreau
    MemberAuthor

    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.

  6. LucianaMarques commented on Oct 14, 2018

    @LucianaMarques
    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.

  7. LucianaMarques commented on Oct 14, 2018

    @LucianaMarques
    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)

  8. Carreau commented on Oct 14, 2018

    @Carreau
    MemberAuthor

    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.

  9. Carreau commented on Oct 14, 2018

    @Carreau
    MemberAuthor

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

  10. Carreau commented on Oct 14, 2018

    @Carreau
    MemberAuthor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions