Enhance DB-API 2.0 (PEP 249) Conformance #52
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request follows #51 to introduce several improvements and updates to the
aurora_data_apilibrary by:Feature Enhancements:
connectfunction in async version toasyncfunction. Although PEP 249 does not define async specifications, it seems to be common that the function is async, including sqlalchemy's expectation (link)TimeFromTicksfunction inaurora_data_api/base.pyto convert ticks into adatetime.timeobject.aurora_data_api/__init__.py, making them directly accessible from the top-level module.Code Cleanup and Consistency:
aurora_data_api/async_.py,aurora_data_api/sync.py,aurora_data_api/base.py) to improve readability and removed unused imports. Added# noqacomments for selective imports to suppress linter warnings. This is required to expose certain elements as per PEP 249. [1] [2] [3]aurora_data_api/async_.pyfor consistency.Test Infrastructure:
test/base.pyfile containing base test classes and a PEP 249 conformance test mixin for validating compliance with the Python DB-API 2.0 specification.test/test_async.pyto import and utilize the new base test classes and conformance tests.Minor Adjustments (
ruff format&ruff check --fix):extras_requiredictionary insetup.pyby formatting it as a single line.aurora_data_api/async_.py.