sdispater
Joined 11 years ago
Joined 11 years ago
Poetry does create virtualenvs to install dependencies on a per-project basis.
It's also a packaging tool, which means you can build and publish packages with (on PyPI for instance).
And finally, it always creates a virtualenv for each project so that you always work isolated from the global Python installation.
In details:
oslo.utils==1.4.0 requires:
- pbr (>= 0.6, != 0.7, < 1.0) - oslo.i18n (>= 1.3)
So, poetry will take the latest version of oslo.i18n which requires:
- pbr (!= 2.1, >= 2.0)
Poetry will detect the conflict and backtrack oslo.i18n to version 2.1.0 which requires:
- pbr (>= 0.11, < 2.0)
This is compatible with the requirements of oslo.utils and pbr==0.11.1 will be installed
It is both a dependency management tool and a packaging tool. Most of the reasons why I started this are detailed in the README (along with why I don’t want to use Pipenv) here: https://github.com/sdispater/poetry#why, but if you want to know the advantages of Poetry compared to existing tools, here are a few:
- Exhaustive dependency resolver
- Intuitive CLI (See https://poetry.eustace.io/docs/cli/)
- Emphasis on semantic versioning and constraint specification so that wildcard dependencies (`*`) will be considered bad practice
- Support for dependencies caret, tilde, wildcard, inequality and multiple requirements.
- Only one file: the standardised pyproject.toml which aims at being readable and clear.
- Mandatory compatible python versions specification.
Also, Poetry is Python 3.6+ only but can manage Python 2 projects without any problem.
And finally, Poetry is not completely stable yet so internally things can change but the CLI and commands are pretty much stable so backwards-incompatible changes should not happen too often.
It is both a dependency management tool and a packaging tool. Note that for the moment the focus has been on the dependency management part but the work on the packaging/publishing has started and is ready for simple, pure-python projects.
Most of the reasons why I started this are detailed in the README (along with why I don’t want to use Pipenv) but if you want to know the advantages of Poetry compared to existing tools, here are a few:
- Exhaustive dependency resolver
- Intuitive CLI (See [Commands](https://github.com/sdispater/poetry#commands))
- Emphasis on semantic versioning and constraint specification so that wildcard dependencies (`*`) will be considered bad practice
- Support for dependencies caret, tilde, wildcard, inequality and multiple requirements.
- Only one file: the standardised `pyproject.toml` which aims at being readable and clear.
- Mandatory compatible python versions specification.
This project is a revamped version of [pypoet](https://github.com/sdispater/poet) to have a cleaner codebase.
Be aware that not all the features described in the README are implemented yet (but most of them are).
Also, Poetry is Python 3.6+ only but can manage Python 2 projects without any problem.
And finally, Poetry is not stable yet so internally things can change but the CLI and commands are pretty much stable so backwards-incompatible changes should not happen too often.
It’s now stable (since January actually) and has gain traction since I first introduced it, so I thought I’d share it here again so that it can be of use to more people.
For those wondering, Pendulum is a library for Python to ease datetimes, timedeltas and timezones manipulation.
Each Pendulum classes are subclasses of the standard classes so you can use them as drop-in replacements in your code (some exceptions exist, see https://pendulum.eustace.io/docs/#limitations)
Link to the official website: https://pendulum.eustace.io
Link to the official documentation: https://pendulum.eustace.io/docs/
Link to the github project: https://github.com/sdispater/pendulum
I started building it because I wanted to have something simpler than what is currently existing.
Packaging system and dependency management in Python is rather convoluted and hard to understand for newcomers. Even for seasoned developers it might be cumbersome at times to create all files needed in a Python project: `setup.py`, `requirements.txt`, `setup.cfg`, `MANIFEST.in`.
So I wanted a tool that would limit everything to a single configuration file to do everything: dependency management, packaging and publishing.
It takes inspiration in tools that exist in other languages, like `composer` (PHP) or `cargo` (Rust). The `poetry.toml` file is really similar to the `Cargo.toml` one for example.
Note that there is no magic here, `poet` uses existing tools (`pip`, `twine`, `setuptools`, `distutils`, `pip-tools`) under the hood to achieve that in a more intuitive way.
I would also like to point out that, at this time, it is highly experimental and mostly still at a proof of concept stage but I’d gladly appreciate feedback and pull requests to improve it.
It provides objects and classes that directly inherits from the standard library ones so you can use them transparently (exceptions exist, see https://github.com/sdispater/pendulum#limitations)
Basically, the Pendulum class is a replacement for the native datetime one with some useful and intuitive methods, the Interval class is intended to be a better timedelta class and the Period class is a datetime-aware timedelta. It also provides Date and Time classes (introduced in version 0.7.0).
Timezones are also easier to deal with: Pendulum will automatically normalize your datetime to handle DST transitions for you.
import pendulum
pendulum.create(2013, 3, 31, 2, 30, 0, 0, 'Europe/Paris’)
# 2:30 for the 31th of March 2013 does not exist
# so pendulum will return the actual time which is 3:30+02:00
'2013-03-31T03:30:00+02:00’
dt = pendulum.create(2013, 3, 31, 1, 59, 59, 999999, 'Europe/Paris’)
'2013-03-31T01:59:59.999999+01:00’
dt = dt.add(microseconds=1)
'2013-03-31T03:00:00+02:00’
dt.subtract(microseconds=1)
'2013-03-31T01:59:59.999998+01:00’
Note that on creation, the normalization behavior is configurable (see https://pendulum.eustace.io/docs/#timezones for more information).To those wondering: yes I know Arrow (http://crsmithdev.com/arrow/) exists but its flaws and strange API (you can throw almost anything at get() and it will do its best to determine what you wanted, for instance) motivated me to start this project. You can check why I think Arrow is flawed here: https://pendulum.eustace.io/faq/#why-not-arrow (or https://github.com/sdispater/pendulum#why-not-arrow)
Link to the official documentation: https://pendulum.eustace.io/docs/
Link to the github project: https://github.com/sdispater/pendulum
I've never seen that error before.
Which version of Python do you use?
And feel free to create an issue on the issue tracker: https://github.com/sdispater/poetry/issues