python-poetry

Warning: The lock file is not up to date with the latest changes in pyproject.toml

两盒软妹~` 提交于 2020-05-31 04:59:25
问题 When I am using a poetry command with Python 3.7, in my case: poetry export -f requirements.txt I am getting the following error: Warning: The lock file is not up to date with the latest changes in pyproject.toml. You may be getting outdated dependencies. Run update to update them. So far clear, but if I run poetry update it upgrades my dependencies, which is not what I want at this time for my project. If I run poetry lock instead, it still upgrades dependencies. How can I work around this?

poetry change python version to 3.x

こ雲淡風輕ζ 提交于 2020-05-28 07:19:24
问题 According to poetry's docs, the proper way to setup a new project is with poetry new poetry-demo , however this creates a project based on the now deprecated python2.7 by creating the following toml file: [tool.poetry] name = "poetry-demo" version = "0.1.0" description = "" authors = ["Harsha Goli <harshagoli@gmail.com>"] [tool.poetry.dependencies] python = "^2.7" [tool.poetry.dev-dependencies] pytest = "^4.6" [build-system] requires = ["poetry>=0.12"] build-backend = "poetry.masonry.api" How

Integrating Python Poetry with Docker

不打扰是莪最后的温柔 提交于 2020-03-17 03:33:29
问题 Can you please give me an example of a Dockerfile in which I can install all the packages I need from poetry.lock and pyproject.toml into my image/container from Docker? 回答1: There are several things to keep in mind when using poetry together with docker . Installation Official way to install poetry is via: curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | python This way allows poetry and its dependencies to be isolated from your dependencies. But, in my

Integrating Python Poetry with Docker

醉酒当歌 提交于 2020-03-17 03:32:05
问题 Can you please give me an example of a Dockerfile in which I can install all the packages I need from poetry.lock and pyproject.toml into my image/container from Docker? 回答1: There are several things to keep in mind when using poetry together with docker . Installation Official way to install poetry is via: curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | python This way allows poetry and its dependencies to be isolated from your dependencies. But, in my

How does Python / pip handle conflicting transitive dependencies?

怎甘沉沦 提交于 2020-02-22 07:51:15
问题 Suppose I want to install package a which requires the packages b1 and b2 . In turn, b1 requires c > 1.0.0 and b2 requires c < 1.0.0 . So the requirements of b1 and b2 cannot be fulfilled at the same time with the same package. In principle / other programming languages, this is not a problem. One could install two versions of c side by side and make sure that b1 uses another version than b2 . However, I'm not sure if pip can install two versions of the same package. My first question is: Can

How can I get tox and poetry to work together to support testing multiple versions of a Python dependency?

主宰稳场 提交于 2020-02-20 09:08:07
问题 I am switching a project that currently uses pipenv to poetry as a test to see what the differences are. The project is a simple, redistributable, Django app. It supports Python 3.6-8, and Django 2.2 and 3.0. I have a tox.ini file that covers all combinations of Python and Django thus: [tox] envlist = py{36,37,38}-django{22,30} [testenv] whitelist_externals = poetry skip_install = true deps = django22: Django==2.2 django30: Django==3.0 commands = poetry install -vvv poetry run pytest --cov=my

Post-install script with Python Poetry

六月ゝ 毕业季﹏ 提交于 2020-01-25 06:41:59
问题 Post-install script with Python setuptools Exactly this question, but with Poetry and no Setuptools. I want to run print('Installation finished, doing other things...') when my package is installed. With Setuptools you could just modify setup.py , but in Poetry there specifically is no setup.py . What I actually want to do is generate a default .mypackage_config file and place it somewhere useful. I don't see how to do this without arbitrary code, but Poetry does not allow arbitrary code for

Feature comparison between npm, pip, pipenv and poetry package managers [closed]

拟墨画扇 提交于 2019-11-28 06:56:22
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed last month . How do the main features of npm compare with pip , pipenv and poetry package managers? And how do I use those features of pipenv or poetry ? This could primarily help someone transitioning from being JavaScript developey to a python developer. I've never used used rubygems but it