Skip to content

Conversation

shenxianpeng
Copy link
Contributor

@shenxianpeng shenxianpeng commented Oct 9, 2025

  • Add Python 3.14 to ci.yml, pyproject.toml and tox.ini and .gitpod.yml
  • Add virtual environment folders to .gitignore

@shenxianpeng
Copy link
Contributor Author

The following test case failed because docutils was upgraded.
If I pin docutils to 0.21.2, test will pass (lint may also pass without any changes)

tests/test_cli.py:52: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
readme_renderer/__main__.py:50: in main
    rendered = render_rst(source, stream=sys.stderr)
readme_renderer/rst.py:123: in render
    parts = publish_parts(raw, writer=writer, settings_overrides=settings)
.tox/py/lib/python3.9/site-packages/docutils/core.py:548: in publish_parts
    _output, publisher = publish_programmatically(
.tox/py/lib/python3.9/site-packages/docutils/core.py:794: in publish_programmatically
    output = publisher.publish(enable_exit_status=enable_exit_status)
.tox/py/lib/python3.9/site-packages/docutils/core.py:272: in publish
    output = self.writer.write(self.document, self.destination)
.tox/py/lib/python3.9/site-packages/docutils/writers/__init__.py:97: in write
    self.translate()
.tox/py/lib/python3.9/site-packages/docutils/writers/_html_base.py:161: in translate
    self.visitor = visitor = self.translator_class(self.document)
.tox/py/lib/python3.9/site-packages/docutils/writers/html5_polyglot/__init__.py:130: in __init__
    super().__init__(document)
.tox/py/lib/python3.9/site-packages/docutils/writers/_html_base.py:336: in __init__
    self.stylesheet = [self.stylesheet_call(path)
.tox/py/lib/python3.9/site-packages/docutils/writers/_html_base.py:336: in <listcomp>
    self.stylesheet = [self.stylesheet_call(path)
.tox/py/lib/python3.9/site-packages/docutils/writers/_html_base.py:529: in stylesheet_call
    content = Path(path).read_text(encoding='utf-8')
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = PosixPath('/home/runner/work/readme_renderer/readme_renderer/.tox/py/lib/python3.9/site-packages/docutils/writers/html5_polyglot/minimal.css')
encoding = 'utf-8', errors = None

    def read_text(self, encoding=None, errors=None):
        """
        Open the file in text mode, read it, and close the file.
        """
>       with self.open(mode='r', encoding=encoding, errors=errors) as f:
E       ValueError: I/O operation on closed file.

/opt/hostedtoolcache/Python/3.9.23/x64/lib/python3.9/pathlib.py:1194: ValueError
================================ tests coverage ================================
_______________ coverage: platform linux, python 3.9.23-final-0 ________________

@miketheman
Copy link
Member

See existing #332 and #328 - these two combined will solve the issue, so I will. try to get around to merging those soon, and then this PR should be revisited.

@shenxianpeng
Copy link
Contributor Author

Maybe these dependencies should be pinned to specific versions, and then add Dependabot update them per PR.

dependencies = [
"nh3>=0.2.14",
"docutils>=0.21.2",
"Pygments>=2.5.1",
]

This would help make it easier to identify what caused any issues.

@shenxianpeng
Copy link
Contributor Author

See existing #332 and #328 - these two combined will solve the issue, so I will. try to get around to merging those soon, and then this PR should be revisited.

So I’ll remove the unrelated changes and keep only the Python 3.14 updates in this PR.

@miketheman miketheman enabled auto-merge (squash) October 9, 2025 22:42
@miketheman miketheman merged commit 5c15902 into pypa:main Oct 9, 2025
10 checks 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.

2 participants