Skip to content

fix: bump minimum discord-typings version to 0.7.0 #1675

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

Merged
merged 1 commit into from
May 6, 2024

Conversation

AstreaTSS
Copy link
Member

Pull Request Type

  • Feature addition
  • Bugfix
  • Documentation update
  • Code refactor
  • Tests improvement
  • CI/CD pipeline enhancement
  • Other: [Replace with a description]

Description

A recent feature added to 5.12.0 added support for working with Guild Onboarding. Unfortunately, that used a typing from discord-typings that was only added in 0.7.0. Running an earlier version just results in:

Traceback (most recent call last):
  File "/home/astrea/Documents/dis-snek-testing-ground/bot/main.py", line 1, in <module>
    import interactions
  File "/home/astrea/Documents/dis-snek-testing-ground/interactions-py-library/interactions/__init__.py", line 2, in <module>
    from .client import (
  File "/home/astrea/Documents/dis-snek-testing-ground/interactions-py-library/interactions/client/__init__.py", line 36, in <module>
    from .client import Client
  File "/home/astrea/Documents/dis-snek-testing-ground/interactions-py-library/interactions/client/client.py", line 39, in <module>
    from interactions.api.http.http_client import HTTPClient
  File "/home/astrea/Documents/dis-snek-testing-ground/interactions-py-library/interactions/api/http/http_client.py", line 19, in <module>
    from interactions.api.http.http_requests import (
  File "/home/astrea/Documents/dis-snek-testing-ground/interactions-py-library/interactions/api/http/http_requests/__init__.py", line 5, in <module>
    from .guild import GuildRequests
  File "/home/astrea/Documents/dis-snek-testing-ground/interactions-py-library/interactions/api/http/http_requests/guild.py", line 18, in <module>
    class GuildRequests(CanRequest):
  File "/home/astrea/Documents/dis-snek-testing-ground/interactions-py-library/interactions/api/http/http_requests/guild.py", line 1045, in GuildRequests
    async def get_guild_onboarding(self, guild_id: "Snowflake_Type") -> discord_typings.GuildOnboardingData:
AttributeError: module 'discord_typings' has no attribute 'GuildOnboardingData'

This PR bumps discord-typings to a minimum of 0.7.0 to fix the issue.

Changes

  • Update the requirements.txt and pyproject.toml to make discord-typings have a minimum version of 0.7.0.
  • Update poetry.lock.

Related Issues

N/A

Test Scenarios

pip install discord-typings==0.6.0
import interactions

Python Compatibility

  • I've ensured my code works on Python 3.10.x
  • I've ensured my code works on Python 3.11.x

Checklist

  • I've run the pre-commit code linter over all edited files
  • I've tested my changes on supported Python versions
  • I've added tests for my code, if applicable
  • I've updated / added documentation, where applicable

@silasary silasary merged commit f8adbe8 into interactions-py:unstable May 6, 2024
2 checks passed
@silasary silasary mentioned this pull request May 6, 2024
13 tasks
@AstreaTSS AstreaTSS deleted the discord-typings-bump branch May 6, 2024 05:38
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