Skip to content

Missing conftest.py in 3.0.3 source distribution #456

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

Closed
mgorny opened this issue Jan 19, 2025 · 12 comments · Fixed by #459
Closed

Missing conftest.py in 3.0.3 source distribution #456

mgorny opened this issue Jan 19, 2025 · 12 comments · Fixed by #459
Assignees
Labels
Bug Error, flaw or fault to produce incorrect or unexpected results Infra All about infrastructure (GitHub Action, project build etc.)

Comments

@mgorny
Copy link
Contributor

mgorny commented Jan 19, 2025

Which version of Python is the problem with?

3.14, 3.13, 3.12, 3.11, 3.10

What semver version are you using?

3.0.3

What OS are you using? (Add more in the Environment section)

Linux

Situation

As a side effect of removing setuptools_scm, the 3.0.3 source distribution has lots a lot files:

-.coveragerc
-.editorconfig
-.gitignore
-.readthedocs.yaml
 CHANGELOG.rst
-CITATION.cff
 CONTRIBUTING.rst
-CONTRIBUTORS
 LICENSE.txt
 MANIFEST.in
-Makefile
 PKG-INFO
 README.rst
-SUPPORT.md
-changelog.d/
-changelog.d/.gitignore
-changelog.d/README.rst
-changelog.d/_template.rst
-docs/
[…]
 pyproject.toml
-release-procedure.md
 setup.cfg
 src/
 src/semver/
@@ -101,9 +24,6 @@ src/semver.egg-info/dependency_links.txt
 src/semver.egg-info/entry_points.txt
 src/semver.egg-info/top_level.txt
 tests/
-tests/coerce.py
-tests/conftest.py
-tests/semverwithvprefix.py
 tests/test_bump.py
 tests/test_compare.py
 tests/test_deprecated_functions.py
@@ -119,4 +39,3 @@ tests/test_replace.py
 tests/test_semver.py
 tests/test_subclass.py
 tests/test_typeerror-274.py
-tox.ini

Since tests/conftest.py is missing, running test suite now fails due to missing fixtures, e.g.:

_______________________________________ ERROR at setup of test_version_info_should_be_iterable ________________________________________
file /tmp/portage/dev-python/semver-3.0.3/work/semver-3.0.3/tests/test_semver.py, line 39                                              
  def test_version_info_should_be_iterable(version):                                                                                   
E       fixture 'version' not found

I don't know whether the other .py files are actually needed for tests as well.

How to reproduce

wget https://files.pythonhosted.org/packages/13/f8/071c42ed3e9678f66a6d624c8df4cdd1490de2504dde6a1d47b61a8195e2/semver-3.0.3.tar.gz
tar -xf semver-3.0.3.tar.gz
cd semver-3.0.3
pip install -e . pytest
pytest

Expected behavior

All tests passing.

Environment

No response

@tomschr
Copy link
Member

tomschr commented Jan 20, 2025

Thank you for filing this issue. Seems the 3.0.3 version had some issues. Need to investigate it further.

@RobPasMue
Copy link

Might be a good idea to yank the version in the meantime?

@tomschr
Copy link
Member

tomschr commented Jan 20, 2025

I yanked the version 3.0.3 on PyPI now, but not deleted the files as recommended by PyPI. You should see that now:

https://pypi.org/manage/project/semver/release/3.0.3/

You still can install them if you request semver==3.0.3. I will release a new version soon.

@RobPasMue
Copy link

Awesome, thanks a lot!

tomschr added a commit to tomschr/python-semver that referenced this issue Jan 20, 2025
Some files like conftest.py were missing from the source distribution.
@tomschr tomschr mentioned this issue Jan 20, 2025
tomschr added a commit that referenced this issue Jan 20, 2025
Some files like conftest.py were missing from the source distribution.
@tomschr tomschr mentioned this issue Jan 20, 2025
@tomschr
Copy link
Member

tomschr commented Jan 20, 2025

@RobPasMue If you want to give it a try, look at PR #459. I combined the license issue and the source dist issue.

@tomschr tomschr added Bug Error, flaw or fault to produce incorrect or unexpected results Infra All about infrastructure (GitHub Action, project build etc.) labels Jan 20, 2025
@tomschr
Copy link
Member

tomschr commented Jan 22, 2025

@mgorny Ok, I've tested it from https://test.pypi.org/project/semver/3.0.4.dev1/#files and used the commands from "How to reproduce".

Could you confirm so I could release 3.0.4? Thanks! 🎉

@mgorny
Copy link
Contributor Author

mgorny commented Jan 22, 2025

The docs/ tree seem to be missing. It's not a big deal, but it looks weird, give that e.g. changelog.d is present — and I don't think that one is really meaningful here.

Outside of that, tests seem to work fine now.

tomschr added a commit that referenced this issue Jan 22, 2025
Some files like conftest.py and docs/ were missing from the source distribution.
@tomschr
Copy link
Member

tomschr commented Jan 22, 2025

Great, thanks! I've fixed that in 3.0.4.dev2. Find it at https://test.pypi.org/project/semver/3.0.4.dev2/#files.

@mgorny
Copy link
Contributor Author

mgorny commented Jan 23, 2025

Yeah, that looks good for our use. Thanks!

FWICS the only remaining meaningful differences are:

Only in python-semver/: CONTRIBUTORS
Only in python-semver/: .pytest.ini
Only in python-semver/: .ruff.toml
Only in python-semver/: uv.lock

@tomschr
Copy link
Member

tomschr commented Jan 23, 2025

Aww, I missed these files. Thanks a lot! I've created 3.0.3-dev3 at https://test.pypi.org/project/semver/3.0.4.dev3/#files.

@mgorny
Copy link
Contributor Author

mgorny commented Jan 23, 2025

Ok, now we have 1:1 match (besides .git*). Thanks!

tomschr added a commit that referenced this issue Jan 24, 2025
* Raise version 3.0.3 -> 3.0.4
* Fix #457: Re-enable Trove license identifier
* Fix #456: Fix source dist file
  - Sort MANIFEST.in and add missing files
  - Add CONTRIBUTORS, .pytest.ini, .ruff.toml, and uv.lock
* Update Changelog
@mgorny
Copy link
Contributor Author

mgorny commented Jan 24, 2025

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Error, flaw or fault to produce incorrect or unexpected results Infra All about infrastructure (GitHub Action, project build etc.)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants