-
Notifications
You must be signed in to change notification settings - Fork 17
Feat/main/ws sqlalchemy #387
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
Open
qevolg
wants to merge
22
commits into
main
Choose a base branch
from
feat/main/ws-sqlalchemy
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 6 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
302c2ae
feat: add AGENTS.md for project overview and setup instructions
qevolg 4c1f8f4
Refactor taos-ws-py integration and update SQLAlchemy dialect handling
qevolg 32ac190
chore: remove AGENTS.md as part of project restructuring
qevolg 6bf539b
refactor: clean up code formatting and remove unnecessary blank lines
qevolg ffc5476
feat: update dependencies to include SQLAlchemy in workflow tests
qevolg e4646e3
refactor: enhance native module loading and improve error handling in…
qevolg 5ced096
fix: correct connection string formatting and enhance query parameter…
qevolg 04edc29
Update dependency versions in pyproject.toml and clean up test script
qevolg a5b7419
fix: normalize handling of explicit empty passwords in connection args
qevolg d98643e
fix: correct SQL query formatting in get_indexes method
qevolg 3fff78d
feat: enhance SQLAlchemy dialect with improved SQL rendering and sche…
qevolg 6f252b0
fix: streamline classifiers in pyproject.toml by removing redundant e…
qevolg 46eff51
fix: simplify native module loading logic in __init__.py
qevolg 460ea72
refactor: simplify SQL execution and testing logic in sqlalchemy.py a…
qevolg 22d8599
refactor: clean up comments and streamline code in sqlalchemy.py
qevolg 52f39b4
fix: update SQL query construction in BaseDialect to use f-strings fo…
qevolg 47ed6dd
refactor: remove unused tests and constants from test_sqlalchemy.py
qevolg 5db302a
refactor: streamline test_sqlalchemy.py by removing unused code and e…
qevolg fd3b9de
refactor: simplify assertions in test_decode_binary_in_tmq for clarit…
qevolg 4affc35
test: add test for legacy taosws submodule alias availability
qevolg 6896b7d
fix: update test_decode_binary_in_tmq to handle multiple values corre…
qevolg 1868e6b
refactor: remove unused import from sqlalchemy.py
qevolg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| [build-system] | ||
| requires = ["maturin>=1.8,<2.0"] | ||
| build-backend = "maturin" | ||
|
|
||
| [project] | ||
| name = "taos-ws-py" | ||
| dynamic = ["version"] | ||
| description = "The official TDengine Python websocket connector" | ||
| readme = "README.md" | ||
| requires-python = ">=3.7" | ||
| license = { text = "MIT" } | ||
| classifiers = [ | ||
| "Programming Language :: Python", | ||
| "Programming Language :: Rust", | ||
| "Programming Language :: Python :: Implementation :: CPython", | ||
| "Programming Language :: Python :: Implementation :: PyPy", | ||
| ] | ||
|
|
||
| [project.optional-dependencies] | ||
| sqlalchemy = ["sqlalchemy>=2.0.0"] | ||
|
|
||
| [project.entry-points."sqlalchemy.dialects"] | ||
| taosws = "taosws.sqlalchemy:TaosWsDialect" | ||
|
|
||
| [tool.maturin] | ||
| python-source = "." | ||
| module-name = "taosws._taosws" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| import importlib | ||
| import importlib.util | ||
| import pkgutil | ||
|
|
||
|
|
||
| __path__ = pkgutil.extend_path(__path__, __name__) | ||
|
|
||
|
|
||
| def _load_native_module(): | ||
| for module_name in ("_taosws", "taosws"): | ||
| full_name = f"{__name__}.{module_name}" | ||
| if importlib.util.find_spec(full_name) is None: | ||
| continue | ||
| return importlib.import_module(full_name) | ||
|
|
||
| raise ImportError( | ||
| "Failed to import native extension 'taosws._taosws' or 'taosws.taosws'. " | ||
| "Ensure taos-ws-py is built and installed correctly." | ||
| ) | ||
qevolg marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
|
|
||
| _native = _load_native_module() | ||
|
|
||
| if hasattr(_native, "__all__"): | ||
| for name in _native.__all__: | ||
| globals()[name] = getattr(_native, name) | ||
| else: | ||
| for name in dir(_native): | ||
| if not name.startswith("_"): | ||
| globals()[name] = getattr(_native, name) | ||
|
|
||
| __doc__ = _native.__doc__ | ||
| if hasattr(_native, "__all__"): | ||
| __all__ = _native.__all__ | ||
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.