Skip to content

Read version from pyproject.toml - #104

Merged
stevepiercy merged 14 commits into
sphinx-contrib:mainfrom
0jc1:main
Aug 19, 2026
Merged

Read version from pyproject.toml#104
stevepiercy merged 14 commits into
sphinx-contrib:mainfrom
0jc1:main

Conversation

@0jc1

@0jc1 0jc1 commented Mar 1, 2026

Copy link
Copy Markdown
Contributor

This addresses #103

The function get_version_from_toml() only works for 3.10+. Prior versions do not have a built-in toml reader.

@stevepiercy stevepiercy left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for this PR! Sorry for the long delay to respond.

The concept is nice, and I have a few suggestions. Would you please take care? Thank you!

Comment thread docs/conf.py Outdated
Comment thread docs/conf.py Outdated
Comment thread docs/conf.py Outdated
Comment thread docs/conf.py Outdated
Comment thread docs/conf.py Outdated
Comment thread docs/conf.py Outdated
0jc1 and others added 6 commits August 13, 2026 00:03
Co-authored-by: Steve Piercy <web@stevepiercy.com>
Co-authored-by: Steve Piercy <web@stevepiercy.com>
Co-authored-by: Steve Piercy <web@stevepiercy.com>
Co-authored-by: Steve Piercy <web@stevepiercy.com>
Co-authored-by: Steve Piercy <web@stevepiercy.com>
Co-authored-by: Steve Piercy <web@stevepiercy.com>
@0jc1

0jc1 commented Aug 12, 2026

Copy link
Copy Markdown
Contributor Author

Good suggestions, i applied all of them.

it might be necessary to specify tomli as a dependency in pyproject.toml like this:

[project]
dependencies = [
    'tomli ; python_version < "3.11"'
]

@stevepiercy

Copy link
Copy Markdown
Collaborator

it might be necessary to specify tomli as a dependency in pyproject.toml like this:

[project]
dependencies = [
    'tomli ; python_version < "3.11"'
]

Yes, almost. It should go in the dev dependencies group, since it's not a requirement to use this package, sorted alphabetically:

https://github.com/0jc1/httpdomain/blob/08f79f6833793e5dac4cd90e5d500e5c44bf67a9/pyproject.toml#L60-L67

Also would you please add a change log entry in CHANGES.rst, giving yourself credit for the change?

Thank you!

@read-the-docs-community

read-the-docs-community Bot commented Aug 15, 2026

Copy link
Copy Markdown

Documentation build overview

📚 sphinxcontrib-httpdomain | 🛠️ Build #34130764 | 📁 Comparing a3b319e against latest (738392e)

  🔍 Preview build  

1 file changed
± index.html

@0jc1

0jc1 commented Aug 15, 2026

Copy link
Copy Markdown
Contributor Author

Thank you for the review! It should be ready to merge now.

@stevepiercy stevepiercy left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thank you for your contribution. I'll tweak the change log entry, then merge.

Comment thread CHANGELOG.rst Outdated
@stevepiercy

Copy link
Copy Markdown
Collaborator

Whoops, spoke too soon. When adding or updating a dependency, you need to run make livehtml or any other target that calls uv sync to update the uv.lock file, then commit and push the update. make livehtml should also ensure that the docs build with the correct version. Would you please take care? Thank you!

@0jc1

0jc1 commented Aug 19, 2026

Copy link
Copy Markdown
Contributor Author

I pushed the updated uv.lock after running the make livehtml.

@stevepiercy
stevepiercy merged commit 660ddab into sphinx-contrib:main Aug 19, 2026
6 checks passed
@stevepiercy

Copy link
Copy Markdown
Collaborator

Thank you @0jc1! Let's see if it shows up in the next release.

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