Comments (9)
Thanks for the feedback. But why is it closed (it's still unimplemented)? Even though poetry is used, we could add this property with a workaround.
from rich.
I use poetry to do packaging, which recommends pkg_resources
to get the version from meta data. They initially recommended dropping __version__
entirely. Fortunately there some to be some movement on that front, and we may get __version__
back.
from rich.
Keeping the version in two places is problematic. But if poetry hasn't got a solution when I release a 1.0 version, that's what I might have to do. In the meantime, the lack of a __version__
isn't going to break anything that I know of, and pkg_resources.get_distribution("rich").version
can be used to get the version.
from rich.
Just a note. For Python 3.8+, importlib.metadata should probably be used instead. And the importlib_metadata backaport exists for other Python 3 versions. It was created to replace pkgresources metadata functionality.
Here's how I use it to deduplicate my package metadata. I use poetry, too, and I couldn't wait any longer. I already had that module and was manually updating it.
from rich.
I may end up doing something similar...
from rich.
Thanks for the feedback. But why is it closed (it's still unimplemented)? Even though poetry is used, we could add this property with a workaround.
Still seems to be missing __version__
, if the intention was for it to be added by v1.0 then perhaps this issue should have been left open...
from rich.
Don't know where you got that idea from.
from rich.
I didn't mean to sound adversarial! It was your message above that gave me this impression:
Keeping the version in two places is problematic. But if poetry hasn't got a solution when I release a 1.0 version, that's what I might have to do.
Personally I agree with the OP that it's pretty standard to provide this, but it's up to you of course.
from rich.
It was a standard of sorts, but now importlib is recommended, and __version__
is a convenience.
Unless poetry has an answer to this that doesn't require a backport of importlib, I'm afraid there is no motivation to change it.
from rich.
Related Issues (20)
- Look in to using bisect module to replace home grown binary searches. HOT 3
- [BUG] Segment._split_cells doesn't handle non-unit characters well
- [BUG] Overwriting `locals_max_length` and `locals_max_string` does not affect printed Traceback HOT 1
- [REQUEST] Diff Tool Enhanced HOT 1
- [BUG] `soft_wrap` does nothing when printing a `Syntax` object to console HOT 4
- [BUG] code execution speed and background color by Jupyter of VScode (Remote-ssh) HOT 1
- [BUG] unexpected colored if there's hyphen with number behind HOT 3
- [QUESTION] How can be tested the way a Text object is rendered? HOT 4
- Behaviour of rich.progress on not terminated lines. HOT 1
- [BUG] wrong string representation of MagicsDisplay is used in ipython extension HOT 2
- [BUG] Number highlight regex does not support separators and binary forms. HOT 1
- [BUG] Center looks strange HOT 4
- [BUG] `@` breaks highlighting in hyperlinks HOT 1
- [BUG]: console width should be `None` in scrollable consoles (jupyter) HOT 1
- print a fixed size table row by row on the console HOT 4
- [BUG] ModuleNotFoundError: No module named 'typing' HOT 4
- Margins in text lines in Jupyter HTML template HOT 2
- [BUG] Traceback can't handle to show locals when dataclass fails on __post_init__ and it's not initialized HOT 1
- [REQUEST] Progress.tasks should return a Dict instead of a List HOT 1
- [REQUEST] Rich Should Accept Highlights as re.compiled re.Patterns and Use them Internally HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rich.