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

Constraint PIP Dependencies Version Range for Towncrier Compatibility #569

Open
mkdir700 opened this issue Nov 21, 2023 · 1 comment
Open

Comments

@mkdir700
Copy link

Description

The pip version on my machine is '2.11.3'. When I use pip install towncrier to install the program, there are no errors during the process. This is because towncrier depends on any version of pip, but this is problematic.

When I use the build command, the following exception is thrown:

Warning: In a future version of Poetry, PyPI will be disabled automatically if at least one custom source is configured with another priority than 'explicit'. In order to avoid a breaking change and make your pyproject.toml forward compatible, add PyPI explicitly via 'poetry source add pypi'. By the way, this has the advantage that you can set the priority of PyPI as with any other source.
Loading template...
Finding news fragments...
Rendering news fragments...
Traceback (most recent call last):
  File "C:\Python310\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  ...
  ...
jinja2.exceptions.TemplateSyntaxError: expected token 'end of statement block', got '+'

Reproduction

pip install jinja2=="2.11.3"
pip install markupsafe=="2.0.1"
towncrier build --draft --yes --version=1.0.0

Solution

Upgrade the version of jinja2 to 3.*

pip install jinja2 --upgrade

Should the version range of pip be constrained?

"jinja2",

@mkdir700 mkdir700 changed the title towncrier is not compatible with PIP 2.* versions, please limit the version range of PIP dependencies. Constraint PIP Dependencies Version Range for Towncrier Compatibility Nov 21, 2023
@adiroiban
Copy link
Member

Thanks for the report.

Can you please create a PR in which we have "jinja2>=3" ?

In theory, as long as you have a custom template, towncrier might also work with Jinja v2.

So there is also the option of fixing the default template to work with Jinja v2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants