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

Pycord v3 Rewrite #194

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from
Draft

Pycord v3 Rewrite #194

wants to merge 11 commits into from

Conversation

VincentRPS
Copy link
Member

Summary

This rewrite's Pycord v3 for the final time to be more flexible, extensible, and faster.

This new version of v3 follows a very strict set of guidelines and goals set by me and many other
people part of the wider Pycord Development Community, including developers of large bots, and core developers.

The guideline aims for a stricter, fancier, and more functional way of creating Discord bots in Python as opposed to our predecessors. While it may be harder for beginners, in the long run the goal is to make it so developers can make bots lightning fast, and more efficient than other libraries.

MyPy(c)

A former goal of the v3 Guidelines were to achieve full strict type-safety to compile with mypyc. That, at least for 3.0.x, won't be the goal. While we will still aim for type-safety to lessen bugs, for the near future the majority of Pycord v3 won't be compiled into C using MyPy.

Rust in Pycord

The part of Pycord that utilizes Discord's Voice & Video features will be written mostly in Rust. This allows us to:

  • Get really low level, while staying safe
  • Easily integrate with encryption tools (incl. Opus)

However, Voice & Video is going to be added after this PR. This PR aims to add all the basic low-level parts of the Discord API & Gateway, as well as every API endpoint. Models (Guild, Member, User, etc,) after, then Voice & Video.

Information

  • This PR fixes an issue.
  • This PR adds something new (e.g. new method or parameters).
  • This PR is a breaking change (e.g. methods or parameters removed/renamed).
  • This PR is not a code change (e.g. documentation, README, typehinting,
    examples, ...).

Checklist

  • I have searched the open pull requests for duplicates.
  • If code changes were made then they have been tested.
    • I have updated the documentation to reflect the changes.
  • If type: ignore comments were used, a comment is also left explaining why.
  • I have updated the changelog to include these changes.

This is a mostly full rewrite of v3 aiming for fully MyPy compatibility and the ability to hopefully compile with `mypyc`.
This design is not final! But, it is a nice design we are actively developing towards.
@VincentRPS VincentRPS added enhancement Improves a part of the library help wanted Extra attention is needed rewrite This doesn't feel right. Time to redo! labels Dec 8, 2023
@VincentRPS VincentRPS added this to the 3.0.0 milestone Dec 8, 2023
@VincentRPS VincentRPS self-assigned this Dec 8, 2023
@plun1331
Copy link
Member

plun1331 commented Dec 8, 2023

hola, would you like api endpoints (again)

@VincentRPS
Copy link
Member Author

hola, would you like api endpoints (again)

Maybe a reverse uno, I do all the endpoints and you help out with the models lol, the models are what I struggle with the most, I don't know why, I think it's just because of how repetitive it is. To finish v3, I would probably need someone else to do the bulk of the impl for models

@plun1331
Copy link
Member

plun1331 commented Dec 8, 2023

hola, would you like api endpoints (again)

Maybe a reverse uno, I do all the endpoints and you help out with the models lol, the models are what I struggle with the most, I don't know why, I think it's just because of how repetitive it is. To finish v3, I would probably need someone else to do the bulk of the impl for models

So how are the models made and where do I put them

plun1331 and others added 3 commits December 9, 2023 06:55
Tasks! Tasks! and Tasks!

This is basically a full reimplementation to replace the old v2 ext.tasks, built from scratch. Why? Because I was very bored.
@plun1331
Copy link
Member

Woke up planning on doing homework, made routes instead: 7cf6a6c

@VincentRPS
Copy link
Member Author

Woke up planning on doing homework, made routes instead: 7cf6a6c

🔥

@plun1331
Copy link
Member

Update: I still did my homework

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improves a part of the library help wanted Extra attention is needed rewrite This doesn't feel right. Time to redo!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants