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

Source distribution of 0.11.0 is missing the docs_src folder #772

Closed
7 tasks done
tiangolo opened this issue Mar 28, 2024 Discussed in #771 · 1 comment
Closed
7 tasks done

Source distribution of 0.11.0 is missing the docs_src folder #772

tiangolo opened this issue Mar 28, 2024 Discussed in #771 · 1 comment
Assignees
Labels
bug Something isn't working p2

Comments

@tiangolo
Copy link
Owner

Discussed in #771

Originally posted by theMarix March 27, 2024

First Check

  • I added a very descriptive title here.
  • I used the GitHub search to find a similar question and didn't find it.
  • I searched the Typer documentation, with the integrated search.
  • I already searched in Google "How to X in Typer" and didn't find any information.
  • I already read and followed all the tutorial in the docs and didn't find an answer.
  • I already checked if it is not related to Typer but to Click.

Commit to Help

  • I commit to help with one of those options 👆

Example Code

#!/bin/sh

pip download --no-binary :all: typer
tar -xaf typer-0.11.0.tar.gz
cd typer-0.11.0
pytest

Description

As of 0.11.0, the source distribution of typer on PyPI no longer seems to contain the docs_src directory. As, however, all of the tutorial tests import from this directory, all of them fail. Just to give one example:

____________________________________________________________ ERROR collecting tests/test_completion/test_completion.py ____________________________________________________________
ImportError while importing test module '/home/marix/openSUSE_Build_Service/devel:languages:python/python-typer/tmp/typer-0.11.0/tests/test_completion/test_completion.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.11/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_completion/test_completion.py:6: in <module>
    from docs_src.commands.index import tutorial001 as mod
E   ModuleNotFoundError: No module named 'docs_src'

Admittedly running the tests from the source distribution is somewhat of a fringe case. But when packaging for distributions that's the easiest way.

Operating System

Linux

Operating System Details

This is on openSUSE but the problem should not be affected by that.

Typer Version

0.11.0

Python Version

3.11 but affects any.

Additional Context

No response

@tiangolo tiangolo added bug Something isn't working p2 labels Mar 28, 2024
@tiangolo tiangolo self-assigned this Mar 28, 2024
@tiangolo
Copy link
Owner Author

This was handled in #773, now the sdist includes the necessary files to install dependencies and test it before repackaging it. It will be available in Typer 0.11.1 in the next hours. 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working p2
Projects
None yet
Development

No branches or pull requests

1 participant