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

Please test with Docutils 0.19b1 #591

Closed
AA-Turner opened this issue Jun 26, 2022 · 6 comments · Fixed by #611
Closed

Please test with Docutils 0.19b1 #591

AA-Turner opened this issue Jun 26, 2022 · 6 comments · Fixed by #611
Labels
enhancement New feature or request

Comments

@AA-Turner
Copy link

AA-Turner commented Jun 26, 2022

Hi,

We've just released Docutils 0.19b1, and intend to release 0.19 final on 05/07/2022 (a week on Tuesday). Please would you test with the pre-release, and raise any issues to me either on this issue or on the Docutils tracker?

Thanks,
Adam

@AA-Turner AA-Turner added the enhancement New feature or request label Jun 26, 2022
@welcome
Copy link

welcome bot commented Jun 26, 2022

Thanks for opening your first issue here! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.

If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).

Welcome to the EBP community! 🎉

@chrisjsewell
Copy link
Member

Cheers for the notification @AA-Turner !

@flokli
Copy link

flokli commented Aug 3, 2022

I ran this with docutils 0.19, and got the following test failures:

=================================== FAILURES ===================================
____________________ test_docutils_roles[90-pep-reference] _____________________

file_params = ParamTestData(line=90, title='pep-reference', description='(`docutils.parsers.rst.roles.pep_reference_role`):', conten...g/dev/peps/pep-0000">\n            PEP 0\n', index=8, fmt=<pytest_param_files.main.DotFormat object at 0x7ffff4fd6ad0>)
monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7ffff3ed8dc0>

    @pytest.mark.param_file(FIXTURE_PATH / "docutil_roles.md")
    def test_docutils_roles(file_params, monkeypatch):
        """Test conversion of Markdown to docutils AST (before transforms are applied)."""
    
        def _apply_transforms(self):
            pass
    
        monkeypatch.setattr(Publisher, "apply_transforms", _apply_transforms)
    
        doctree = publish_doctree(
            file_params.content,
            source_path="notset",
            parser=Parser(),
        )
    
>       file_params.assert_expected(doctree.pformat(), rstrip_lines=True)
E       AssertionError: Actual does not match expected
E       --- /build/source/tests/test_renderers/fixtures/docutil_roles.md:90
E       +++ (actual)
E       @@ -1,4 +1,4 @@
E        <document source="notset">
E       
E            <paragraph>
E       
E       -        <reference refuri="http://www.python.org/dev/peps/pep-0000">
E       
E       +        <reference refuri="https://peps.python.org/pep-0000">
E       
E                    PEP 0

tests/test_renderers/test_fixtures_docutils.py:53: AssertionError
____________________ test_docutils_roles[101-rfc-reference] ____________________

file_params = ParamTestData(line=101, title='rfc-reference', description='(`docutils.parsers.rst.roles.rfc_reference_role`):', conte....org/html/rfc1.html">\n            RFC 1\n', index=9, fmt=<pytest_param_files.main.DotFormat object at 0x7ffff4fd6ad0>)
monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7ffff40110c0>

    @pytest.mark.param_file(FIXTURE_PATH / "docutil_roles.md")
    def test_docutils_roles(file_params, monkeypatch):
        """Test conversion of Markdown to docutils AST (before transforms are applied)."""
    
        def _apply_transforms(self):
            pass
    
        monkeypatch.setattr(Publisher, "apply_transforms", _apply_transforms)
    
        doctree = publish_doctree(
            file_params.content,
            source_path="notset",
            parser=Parser(),
        )
    
>       file_params.assert_expected(doctree.pformat(), rstrip_lines=True)
E       AssertionError: Actual does not match expected
E       --- /build/source/tests/test_renderers/fixtures/docutil_roles.md:101
E       +++ (actual)
E       @@ -1,4 +1,4 @@
E        <document source="notset">
E       
E            <paragraph>
E       
E       -        <reference refuri="http://tools.ietf.org/html/rfc1.html">
E       
E       +        <reference refuri="https://tools.ietf.org/html/rfc1.html">
E       
E                    RFC 1


@AA-Turner
Copy link
Author

Your test expectations should be changed, the location of PEPs moved. Good that this was the only failure!

A

@flokli
Copy link

flokli commented Aug 4, 2022

This was only me passing in docutils 0.19 after relaxing the version bounds in pyproject.toml, and running unit tests. I didn't do any manual testing.

@flokli
Copy link

flokli commented Aug 4, 2022

Ugh, I took a closer look. These URLs are hardcoded in the docutil_roles.md fixture file in the repo.

This means the fixtures need to be different, depending on which version of docutils the test suite runs with? 👀

I've seen a similar PR at #478 that patches the fixtures, but don't see where it runs conditionally only with docutils >=0.18…

ewdurbin added a commit to pypi/warehouse that referenced this issue Aug 12, 2022
adding support for `.md` files!

Note: This downgrades docutils and doc8 due to a conflict in support for 0.19 in myst-parser being tracked in executablebooks/MyST-Parser#591
ewdurbin added a commit to pypi/warehouse that referenced this issue Aug 19, 2022
adding support for `.md` files!

Note: This downgrades docutils and doc8 due to a conflict in support for 0.19 in myst-parser being tracked in executablebooks/MyST-Parser#591

Co-authored-by: Dustin Ingram <di@users.noreply.github.com>
SamirPS pushed a commit to SamirPS/warehouse that referenced this issue Aug 30, 2022
adding support for `.md` files!

Note: This downgrades docutils and doc8 due to a conflict in support for 0.19 in myst-parser being tracked in executablebooks/MyST-Parser#591

Co-authored-by: Dustin Ingram <di@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
3 participants