python-poetry / poetry

Python packaging and dependency management made easy
https://python-poetry.org
MIT License
31.09k stars 2.25k forks source link

Version is not changed in pyproject.toml #1696

Closed ktsibikov closed 4 years ago

ktsibikov commented 4 years ago

Issue

Steps to reproduce:

  1. Add source section in pyproject.toml
  2. Patch package version executing command poetry version patch

Expected behavior: version in pyproject.toml was updated. Actual behavior: version in pyproject.toml was not updated.

finswimmer commented 4 years ago

Hello @ktsibikov ,

could you please test it with the latest preview? Notice that syntax has changed their. poetry version will just show the current version. You has to define what part of the version should be bump, e.g. poetry version patch.

fin swimmer

ktsibikov commented 4 years ago

Tried with the 1.0.0b9 preview. After executing poetry version patch version in pyproject.toml still was not changed.

finswimmer commented 4 years ago

Hm, I tried it with the pyproject.toml you've linked with no problems. (I received a deprecation warning: The "black" dependency specifies the "allows-prereleases" property, which is deprecated. Use "allow-prereleases" instead.)

How have you installed poetry? Have you closed and reopened the file afterwards, to make sure you see the latest content?

ktsibikov commented 4 years ago

Hi @finswimmer ! Installation curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | python So, I installed version 1.0.0 and the result the same: in the terminal I see Bumping version from 0.1.0 to 0.1.1, but in pyproject.toml the version was not changed.

Yes, I did

Have you closed and reopened the file afterwards, to make sure you see the latest content?

finswimmer commented 4 years ago

Hm, strange. I'm absolutely unable to reproduce this behavior. Is there anyone else out there with this problem?

ktsibikov commented 4 years ago

The same behavior is on 1.0.0 version


➜ poetry --version
Poetry version 1.0.0

predicates on  master [!] via predicates-h1BsK1i7-py3.6 via 🐍 3.6.2 
➜ poetry version
predicates 0.1.0

predicates on  master [!] via predicates-h1BsK1i7-py3.6 via 🐍 3.6.2 
➜ poetry version patch
Bumping version from 0.1.0 to 0.1.1

predicates on  master [!] via predicates-h1BsK1i7-py3.6 via 🐍 3.6.2 
➜ poetry version
predicates 0.1.0```
cfarrend commented 4 years ago

We are experiencing the same issue, it does not happen all the time however. We have currently reproduced the issue by going to the commit that fails in our GitHub Actions build but are still investigating. It seems that when the problem is present, you can't update to any version

When I mean it does not happen all the time, we could have a version 5.0.0 and update to 5.0.1dev1, 5.0.1dev2, 5.0.1dev3 but then have it not update on 5.0.1dev4. Usually after a new release we don't run into the issue for a little while but appears again

Note: This happened in 1.0.2 and 1.0.3 so bug is still present

etijskens commented 4 years ago

I am not sure wether this is helpful or not - just hoping to save you some time. Some time ago I had similar issues. It turned out that when the entries in the pyproject.toml file are not in correct order or grouped together, version bumping fails without error. Details in https://github.com/python-poetry/poetry/issues/1182 Kindest regards,

Dr [Engel]bert Tijskens - HPC Analyst/Consultant Flemish Supercomputer Center University of Antwerp / Computational mathematics ++32 3 265 3879, ++32 494 664408

On 21 Feb 2020, at 02:18, Christopher Farrenden notifications@github.com<mailto:notifications@github.com> wrote:

We are experiencing the same issue, it does not happen all the time however. We have currently reproduced the issue by going to the commit that fails in our GitHub Actions build but are still investigating. It seems that when the problem is present, you can't update to any version

When I mean it does not happen all the time, we could have a version 5.0.0 and update to 5.0.1dev1, 5.0.1dev2, 5.0.1dev3 but then fail on 5.0.1dev4. Usually after a new release we don't run into the issue for a little while but appears again

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fpython-poetry%2Fpoetry%2Fissues%2F1696%3Femail_source%3Dnotifications%26email_token%3DACRDDFQRGEGNYHUMWHX7SM3RD4TU7A5CNFSM4JYPETGKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEMRFKEY%23issuecomment-589452563&data=02%7C01%7Cengelbert.tijskens%40uantwerpen.be%7C66186e2903674f1454b008d7b66be93f%7C792e08fb2d544a8eaf72202548136ef6%7C0%7C0%7C637178446905558500&sdata=bOto9gvRc6Mq0Cbeqya36WbtBq2m9KzRYnZjqCxwntU%3D&reserved=0, or unsubscribehttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FACRDDFRXY3QCH3RP6FXXIATRD4TU7ANCNFSM4JYPETGA&data=02%7C01%7Cengelbert.tijskens%40uantwerpen.be%7C66186e2903674f1454b008d7b66be93f%7C792e08fb2d544a8eaf72202548136ef6%7C0%7C0%7C637178446905568497&sdata=5ocR7QkTGSlB%2BHNXksOpuko8gwN1Wq%2FrK5VF1vsPrrY%3D&reserved=0.

estyxx commented 4 years ago

I think the problem is somewhere inside these lines, sometimes the version is not updated correctly in the file content (that is a tomlkit.toml_document.TOMLDocument object). But I didn't understand why...

In my case, this is my configuration where poetry can't update the version correctly. I have the isort configuration inside, if I remove it, the poetry is able to update correctly the version in pyproject.toml file...

sdispater commented 4 years ago

This has been fixed in tomlkit (see https://github.com/sdispater/tomlkit/pull/68).

I will make a new release of tomlkit today along with a new release of Poetry.

github-actions[bot] commented 6 months ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.