Skip to content

Conversation

@tsuga
Copy link
Contributor

@tsuga tsuga commented Aug 1, 2025

This pull request follows #51 to introduce several improvements and updates to the aurora_data_api library by:

Feature Enhancements:

  • Changed the connect function in async version to async function. Although PEP 249 does not define async specifications, it seems to be common that the function is async, including sqlalchemy's expectation (link)
  • Reintroduced and implemented the TimeFromTicks function in aurora_data_api/base.py to convert ticks into a datetime.time object.
  • Added imports for exception classes in aurora_data_api/__init__.py, making them directly accessible from the top-level module.

Code Cleanup and Consistency:

  • Reorganized imports across files (aurora_data_api/async_.py, aurora_data_api/sync.py, aurora_data_api/base.py) to improve readability and removed unused imports. Added # noqa comments for selective imports to suppress linter warnings. This is required to expose certain elements as per PEP 249. [1] [2] [3]
  • Standardized string quoting style (single to double quotes) in aurora_data_api/async_.py for consistency.

Test Infrastructure:

  • Introduced a new test/base.py file containing base test classes and a PEP 249 conformance test mixin for validating compliance with the Python DB-API 2.0 specification.
  • Updated test/test_async.py to import and utilize the new base test classes and conformance tests.

Minor Adjustments (ruff format & ruff check --fix):

  • Simplified the extras_require dictionary in setup.py by formatting it as a single line.
  • Adjusted line breaks in logging statements and comments for better readability in aurora_data_api/async_.py.

@tsuga tsuga marked this pull request as ready for review August 1, 2025 17:54
@tsuga tsuga marked this pull request as draft August 2, 2025 16:30
@tsuga tsuga force-pushed the db-api-20-conformance branch from baecd47 to 241a180 Compare August 20, 2025 04:59
@tsuga tsuga marked this pull request as ready for review August 20, 2025 05:00
@kislyuk kislyuk merged commit 6f81da3 into cloud-utils:main Aug 20, 2025
1 check passed
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