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

Ignore useless warning about Ska being already imported #13

Merged
merged 1 commit into from
Jul 21, 2020

Conversation

taldcroft
Copy link
Member

Description

From within the source repo for a namespace package one gets a warning like below when importing:

In [1]: import Ska.Shell                                                                                
/Users/aldcroft/miniconda3/envs/ska3-shiny/lib/python3.7/site-packages/ska_helpers/version.py:13: UserWarning:
 Module Ska was already imported from None, but /Users/aldcroft/git/Ska.Shell is being added to sys.path

Testing

  • [N/A] Passes unit tests on MacOS, linux, Windows (at least one required)
  • Functional testing

With the patch in place the warning goes away.

@taldcroft taldcroft requested a review from javierggt July 13, 2020 18:26
@javierggt
Copy link
Collaborator

Normally one does not see this warning. Is this in the context of running testr?

I think the changes are ok, I just wonder whether this can be an issue later on.

@taldcroft
Copy link
Member Author

The context is just importing the package in IPython.

BTW, this might go away if/when we transition to importlib.metadata, which is apparently also much faster.

@taldcroft taldcroft merged commit 72a9ce2 into master Jul 21, 2020
@javierggt javierggt mentioned this pull request Dec 7, 2020
@javierggt javierggt deleted the ignore-reimport-warning branch January 5, 2023 16:47
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.

2 participants