Closed aisk closed 9 months ago
@coderabbitai review
[!WARNING]
Rate Limit Exceeded
@aisk has exceeded the limit for the number of files or commits that can be reviewed per hour. Please wait 9 minutes and 1 seconds before requesting another review.
How to resolve this issue?
After the wait time has elapsed, a review can be triggered using the @coderabbitai review command. Alternatively, push new commits to this PR. We recommend that you space out your commits to avoid hitting the rate limit.How do rate limits work?
CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our [FAQ](https://coderabbit.ai/docs/faq) for further information.Commits
Files that changed from the base of the PR and between 9e537edd148b33c87b3c8ddbaa9f68a1429b13dd and be219f01c6b7379393f0150f98cade4b12ce3777.
The changes involve updating the import hook mechanism in the thriftpy2
library to be compatible with Python 3.12 by replacing the deprecated find_module
method with find_spec
, and adding compatibility for the module spec system introduced in Python 3.4. Additionally, a .gitignore
update suggests the introduction or modification of a virtual environment.
File(s) | Change Summary |
---|---|
.gitignore |
Added 'venv' directory to ignore list. |
thriftpy2/hook.py |
Updated ThriftImporter for Python 3.4+ compatibility by using find_spec and added ThriftLoader with create_module and exec_module methods. |
Objective | Addressed | Explanation |
---|---|---|
import hook does not work with Python3.12 (#229) | ✅ | The update from find_module to find_spec and the addition of ThriftLoader with the required methods address the compatibility issue with Python 3.12 as described in the issue. |
In the code where bytes and types hop, A rabbit tweaked the import's top. With a find_spec in place, no more flop, The thrifty code now runs non-stop. 🐇💻
Also a little refactor on the old
ThriftImporter
, since we can using theis
operator to compare to class instances, so the__eq__
overload is not needed.fix: #229
Summary by CodeRabbit
New Features
Refactor
Chores
.gitignore
to include the 'venv' directory, indicating a virtual environment setup.