Skip to content

Conversation

onerandomusername
Copy link
Member

@onerandomusername onerandomusername commented Aug 25, 2025

closes #664

@onerandomusername onerandomusername force-pushed the feat/build-with-hatchling branch 3 times, most recently from f7a43c1 to 27cb9ad Compare August 25, 2025 21:44
@shiftinv shiftinv added t: dependencies Addition/update/removal of dependencies t: meta Changes to the project itself (CI, configs, etc.) labels Aug 26, 2025
@onerandomusername onerandomusername force-pushed the feat/build-with-hatchling branch 2 times, most recently from 0d9175a to e7d0b60 Compare August 27, 2025 02:22
@onerandomusername onerandomusername marked this pull request as ready for review August 27, 2025 07:53
@onerandomusername onerandomusername requested a review from a team as a code owner August 27, 2025 07:53
@onerandomusername onerandomusername force-pushed the feat/build-with-hatchling branch 3 times, most recently from 4eed882 to 2063c20 Compare September 3, 2025 05:03
@onerandomusername onerandomusername force-pushed the feat/build-with-hatchling branch 2 times, most recently from 3785324 to 8a314c4 Compare September 4, 2025 22:52
@onerandomusername onerandomusername force-pushed the feat/build-with-hatchling branch from 8a314c4 to 0294825 Compare September 5, 2025 10:09
@onerandomusername onerandomusername force-pushed the feat/build-with-hatchling branch 2 times, most recently from 7a2f2b1 to 28ab5b2 Compare September 15, 2025 06:49
Copy link

read-the-docs-community bot commented Sep 20, 2025

Documentation build overview

📚 disnake | 🛠️ Build #30010903 | 📁 Comparing a4ed52b against latest (a9d45ed)


🔍 Preview build

Show files changed (48 files in total): 📝 48 modified | ➕ 0 added | ➖ 0 deleted
File Status
index.html 📝 modified
whats_new.html 📝 modified
api/abc.html 📝 modified
api/activities.html 📝 modified
api/app_commands.html 📝 modified
api/app_info.html 📝 modified
api/audit_logs.html 📝 modified
api/automod.html 📝 modified
api/channels.html 📝 modified
api/clients.html 📝 modified
api/components.html 📝 modified
api/emoji.html 📝 modified
api/entitlements.html 📝 modified
api/events.html 📝 modified
api/exceptions.html 📝 modified
api/guild_scheduled_events.html 📝 modified
api/guilds.html 📝 modified
api/integrations.html 📝 modified
api/interactions.html 📝 modified
api/invites.html 📝 modified
api/localization.html 📝 modified
api/members.html 📝 modified
api/messages.html 📝 modified
api/misc.html 📝 modified
api/permissions.html 📝 modified
api/roles.html 📝 modified
api/skus.html 📝 modified
api/soundboard.html 📝 modified
api/stage_instances.html 📝 modified
api/stickers.html 📝 modified
api/subscriptions.html 📝 modified
api/ui.html 📝 modified
api/users.html 📝 modified
api/utilities.html 📝 modified
api/voice.html 📝 modified
api/webhooks.html 📝 modified
api/widgets.html 📝 modified
ext/tasks/index.html 📝 modified
ext/commands/api/app_commands.html 📝 modified
ext/commands/api/bots.html 📝 modified
ext/commands/api/checks.html 📝 modified
ext/commands/api/cogs.html 📝 modified
ext/commands/api/context.html 📝 modified
ext/commands/api/converters.html 📝 modified
ext/commands/api/exceptions.html 📝 modified
ext/commands/api/help_commands.html 📝 modified
ext/commands/api/misc.html 📝 modified
ext/commands/api/prefix_commands.html 📝 modified

Copy link
Member

@shiftinv shiftinv left a comment

Choose a reason for hiding this comment

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

Looks pretty good! I spent some time looking into hatchling + versioningit, but haven't fully reviewed everything just yet, so here are some preliminary comments:

]


[tool.check-manifest]
Copy link
Member

Choose a reason for hiding this comment

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

We obviously don't have a MANIFEST.in anymore, but could it be worth considering finding a replacement for check-manifest somehow, that at least checks the sdist against a preset list of files we expect in there?

pyproject.toml Outdated
Comment on lines 124 to 127
include = [
"disnake/",
]
Copy link
Member

Choose a reason for hiding this comment

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

perhaps worth noting a tiny issue. there doesn't seem to be a single python file in the built wheel besides _version.py:
image

Seems like the sdist include below is overwriting the global include.

Copy link
Member Author

Choose a reason for hiding this comment

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

Seems like this is also a shortcoming in CI. This should absolutely be discovered on the built wheels.

Copy link
Member Author

Choose a reason for hiding this comment

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

added #1455 which won't necessarily catch this exact error but will catch other wheel errors.

Comment on lines +22 to +27
if description is not None:
fields.update(description.fields)
fields["branch"] = description.branch
if base_version is not None:
fields["base_version"] = base_version
if next_version is not None:
fields["next_version"] = next_version
Copy link
Member

Choose a reason for hiding this comment

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

The template only uses {version} and {version_template}, are these actually needed here?

Copy link
Member Author

Choose a reason for hiding this comment

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

Its worth making sure that we're compatiable with the upstream implementation of this method.

Copy link
Member

Choose a reason for hiding this comment

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

I don't think we need to, these hooks are precisely to provide custom behavior separate from the upstream implementation. Nothing in the documentation says all these fields need to be retained, afaict.

Comment on lines +50 to +55
try:
fields["normalized_version"] = str(packaging.version.Version(version))
except ValueError:
fields["normalized_version"] = version
Copy link
Member

Choose a reason for hiding this comment

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

+1, see previous comment

@onerandomusername onerandomusername force-pushed the feat/build-with-hatchling branch 4 times, most recently from 6594b5b to ff625d2 Compare October 20, 2025 02:13
@onerandomusername onerandomusername force-pushed the feat/build-with-hatchling branch from ff625d2 to 853d9ed Compare October 20, 2025 02:15
@onerandomusername onerandomusername force-pushed the feat/build-with-hatchling branch 2 times, most recently from 91ddca7 to ddaa1f3 Compare October 20, 2025 02:35
Without this setting, installation of disnake from a source distribution
without source control metadata will fail, because there will be no way
to determine the version of disnake without that metadata.

Using a fallback ensures that in such an installation method (such as
from a GitHub source archive), disnake can still be installed, though
the version metadata may be inaccurate.

Compared to not allowing installation at all, this is a better user
experience, despite the incorrect version information.
@onerandomusername onerandomusername force-pushed the feat/build-with-hatchling branch from 1d0b983 to a4ed52b Compare October 20, 2025 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

t: dependencies Addition/update/removal of dependencies t: meta Changes to the project itself (CI, configs, etc.)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Consider dropping setuptools

2 participants