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

can't use dtale.__version__ to check current version after import in python #653

Closed
injuryholmes opened this issue Mar 30, 2022 · 2 comments

Comments

@injuryholmes
Copy link

injuryholmes commented Mar 30, 2022

Hi all, apologize if this question seems silly.
I found that dtale can't use dtale.version to check the current using version.
image

I found it relate to missing __verison__ attribute in __init__ file under dtale package.
But there is also a version parameter in setup.py, so it won't be a clever idea to keep the same value in two different locations.

I've checked pandas how they keep the version in __init__.py, and they've written a complex function;
https://github.com/pandas-dev/pandas/blob/3cb70a5f0d1dc386f7806fca75abff6f098b1539/pandas/_version.py#L1

Is there any good and simple way to fix this?

@aschonfeld
Copy link
Collaborator

As a workaround until I update __version__ you can do the following:

import dtale.cli.clickutils as dtale_clickutils

print(dtale_clickutils.retrieve_meta_info_and_version("dtale")[1])

@aschonfeld
Copy link
Collaborator

aschonfeld commented May 4, 2022

Released in v2.3.0

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

2 participants