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

Pin Jinja2 to version to 3.0.3 for Sphinx #243

Merged
merged 2 commits into from
Dec 10, 2024

Conversation

SmartManoj
Copy link
Contributor

@SmartManoj SmartManoj commented Oct 28, 2024

Fixes #241

Pin Jinja2 to version <3.1 for Sphinx in swebench/harness/constants.py.

  • Add Jinja2<3.1 to the pip_packages list for Sphinx in the SPECS_SPHINX dictionary.

Reference: https://www.ingap.dev/posts/solved-cannot-import-name-environmentfilter-from-jinja2


For more details, open the Copilot Workspace session.

Fixes swe-bench#241

Pin Jinja2 to version <3.1 for Sphinx in `swebench/harness/constants.py`.

* Add `Jinja2<3.1` to the `pip_packages` list for Sphinx in the `SPECS_SPHINX` dictionary.


Reference: https://www.ingap.dev/posts/solved-cannot-import-name-environmentfilter-from-jinja2

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/princeton-nlp/SWE-bench/issues/241?shareId=XXXX-XXXX-XXXX-XXXX).
Copy link
Contributor

@wistuba wistuba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change breaks my build. To reproduce:

python -m swebench.harness.run_evaluation \
 --predictions_path gold \
 --max_workers 1 \
 --dataset_name princeton-nlp/SWE-bench \
 --run_id gold_test \
 --instance_ids sphinx-doc__sphinx-8595

Using Jinja2==3.0.3 instead works.

@SmartManoj SmartManoj requested a review from wistuba December 1, 2024 00:59
@SmartManoj SmartManoj changed the title Pin Jinja2 to version <3.1 for Sphinx Pin Jinja2 to version to 3.0.3 for Sphinx Dec 1, 2024
@john-b-yang
Copy link
Member

Sweet, thanks for the fix @SmartManoj @wistuba. Was able to recreate the issue and verify the solution.

@john-b-yang john-b-yang merged commit ed3d3a5 into swe-bench:main Dec 10, 2024
1 check passed
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

Successfully merging this pull request may close these issues.

Jinja2 is not pinned for sphinx
3 participants