Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version is not changed in pyproject.toml #1696

Closed
3 tasks done
ktsibikov opened this issue Dec 9, 2019 · 11 comments
Closed
3 tasks done

Version is not changed in pyproject.toml #1696

ktsibikov opened this issue Dec 9, 2019 · 11 comments
Labels
kind/bug Something isn't working as expected

Comments

@ktsibikov
Copy link

ktsibikov commented Dec 9, 2019

  • I am on the latest Poetry version.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).

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.

@ktsibikov ktsibikov added the kind/bug Something isn't working as expected label Dec 9, 2019
@finswimmer
Copy link
Member

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
Copy link
Author

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

@finswimmer
Copy link
Member

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
Copy link
Author

ktsibikov commented Dec 13, 2019

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
Copy link
Member

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

@ktsibikov
Copy link
Author

ktsibikov commented Jan 8, 2020

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
Copy link

cfarrend commented Feb 21, 2020

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
Copy link

etijskens commented Feb 21, 2020 via email

@estyxx
Copy link
Member

estyxx commented Feb 28, 2020

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
Copy link
Member

This has been fixed in tomlkit (see python-poetry/tomlkit#68).

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

Copy link

github-actions bot commented Mar 3, 2024

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Something isn't working as expected
Projects
None yet
Development

No branches or pull requests

6 participants