@hayorov Chainstack Multi-cloud and multi-blockchain Platform as a Service Alex Khaerov we ❤ company who I am @hayorov We are hiring: careers.chainstack.com
@hayorov Problems With This • “The Cheeseshop” (PyPi) was merely an index of packages, not a sole package host. • Packages were often hosted elsewhere. • Ran on a single server in &, while serving the entire Python community. • Its use wasn’t a fraction of what it is today, so it wasn’t a problem.
@hayorov More Obvious Issues • Very manual process - not good for automation. • Globally installed packages - impossible to have two versions of the same library installed. • People often just copied things into site-packages, manually. • Poor user experience.
@hayorov Improvements! • Much better user experience for installation. • Most packages were installed from PyPi. • Easier to automate programatically. • , no easy_uninstall.
@hayorov 2010 -> • Pip became the de-facto replacement for easy_install. • Virtualenv became common practice. • Pinned requirements.txt file passed around.
@hayorov ✋ … requirements.txt • $ pip freeze > requirements.txt • Mismatch: “What you want installed” vs “what you need” installed. • A pre-flattened dependency tree is required in order to establish deterministic builds. • Tools like pip-tools were created to ease this pain.
@hayorov Pipfile: New Standard • Pipfile replaces requirements.txt. • TOML format, so easy to read/write manually. • Two groups: [packages] and [dev-packages]. • Will eventually land in Pip 19 has support for pyproject.toml
@hayorov Resulting Pipfile.lock • JSON, so easily machine-parsable • Contains all transitive dependancies, pinned, with all acceptable hashes for each release. • Two groups: { “default”: … “develop”: … }
@hayorov Poetry • v0.1.0 released in Feb, 2018 as the reaction to Pipenv issues. • Comes with exhaustive and fast dependency resolver. • Emphasis on semantic versioning and constraint specification (version “^1.4” instead of Pipenv “*”). • Easily build and package your projects: poetry publish.
@hayorov Poetry • v0.1.0 released in Feb, 2018 as the reaction to Pipenv issues. • Comes with exhaustive and fast dependency resolver. • Emphasis on semantic versioning and constraint specification (version “^1.4” instead of Pipenv “*”). • Easily build and package your projects: poetry publish.
@hayorov So Now What? • Start a new project with Poetry • Already with Pipenv? Stay on it! • Be patient and wait for native support in Pip and Python PEP518 Specifying Minimum Build System Requirements for Python Projects PEP517 A build-system independent format for source trees