Comments (9)
An alternative that I like and recommend is to use setuptools_scm
.
This is how you make it work: https://smarie.github.io/python-getversion/#package-versioning-best-practices. (note that the getversion
library where this recommendation is hosted, is not used in the pattern - it is only useful when a library doesn't have a version attribute)
from pyjson_tricks.
Right. I am using pkg resources which I guess is the same thing.
Thanks for considering.
This stuff is a moving target, and there isn't always a good reason to change.
Feel free to close
from pyjson_tricks.
I am using pkg resources which I guess is the same thing.
No, getversion
is a bit more complete - it relies on several strategies, pkg resources
is only one of them but is a bit limited as it does not cover all cases (unzipped wheels, project sources added to python path by your IDE such as PyCharm, etc.). But this is another discussion :)
For the present ticket I agree with you that something should be done so that __version__
is set. Let's wait for maintainer's feedback then. Thanks for the discussion !
from pyjson_tricks.
getversion does work in the problematic use cases i've had where pip
detects the version at install time, but for dependencies that I am depeveloping, that often goes out of sync at run time.
Not sure if I want to depend on it just yet.
0.2.3+31.g8cafa99
, but seems cool.
Either case, I sympathesize with the maintainer not wanting to have to keep track of two numbers, one in setup..py
and the other in __init__.py
.
from pyjson_tricks.
Hmm doesn't it seem a bit unnecessary to add a dependency for something that is just a few lines of code?
It's probably a good idea to add this though, I can see how it would be useful since there is already logic depending on sys.version_info
in this project.
from pyjson_tricks.
Are you referring to versioneer?
from pyjson_tricks.
By the dependencies I mean both (this was my quick impression, maybe I'm wrong). With a few lines I mean adding the version in a text file and reading that.
Currently any changes are blocked by #60 though...
from pyjson_tricks.
Depends how much of burden you see in changing those two lines. I hate it. I just want to tag and move on.
from pyjson_tricks.
From v3.13.2 it works for me and for the automated test
from pyjson_tricks.
Related Issues (20)
- Python 3.7 support HOT 2
- does not preserve object array shapes when they contain numpy arrays HOT 2
- Pandas DeprecationWarning: .ix is deprecated HOT 2
- Bug: JSONDecodeError with valid string HOT 8
- Tests fail assert 'ExceptionInfo' without code changes HOT 1
- JSON tricks cannot dump nan and infinity HOT 2
- Decode fail for numpy arrays with dtype=object HOT 1
- dump returns a byte value, is this normal? HOT 4
- Can't load a dumped object of class scipy.optimize.OptimizeResult HOT 6
- Serializing NaN HOT 2
- Pandas ix is deprecated since pd.__version__ > 1.0 HOT 1
- Use compressed numpy format by default in compressed mode (next major release) HOT 1
- Make `ignore_comments` not default (next major release) HOT 2
- Bug: Numpy Array with shape (0,N) not decoded correctly. HOT 1
- Allow `cls=None` in `dump`, `dumps`, `load` and `loads` HOT 2
- TypeError in Python 3.9 due to removal of encoding kwarg from json.loads HOT 5
- Add support for encoding/decoding bytestrings HOT 4
- attrs class instances that use __weakref__ cannot be decoded HOT 3
- Test failures on s390x (big endian) architecture 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 pyjson_tricks.