phenobarbital / asyncdb Goto Github PK
View Code? Open in Web Editor NEWCollection of Asynchronous (Asyncio-based) generic Database connectors
License: Other
Collection of Asynchronous (Asyncio-based) generic Database connectors
License: Other
in asyncdb/drivers/sqlite.py there are some missing f on f-strings:
grep '{err}' asyncdb -r | grep -v 'f"'
asyncdb/drivers/sqlite.py: error = "Error on Query: {err}"
asyncdb/drivers/sqlite.py: error = "Error on Query: {err}"
asyncdb/drivers/sqlite.py: error = "Error on Execute: {err}"
asyncdb/drivers/sqlite.py: error = "Error on Execute Many: {err}"
asyncdb/drivers/sqlite.py: error = "Error on Column Info: {err}"
in model methods, this block of code:
result = await self.Meta.connection.model_get( model=self, fields=self.columns(), **kwargs )
The attribute called "model" will clash with a database field called "model", please, rename that attribute.
Hi,
I'm using this repository in a private project of mine with Python 3.11.6
and Ubuntu 22.04
.
Recently I decided to update my Python interpreter to the "new" version 3.12.2
. So I created a new environment, installed it with pip
all requirements, including asyncdb
.
But an error broke the requirements installation. After some time, I see that asyncdb
raises the following error:
(my-env) andre@pc:~$ pip install asyncdb[odbc,msqlserver]
Collecting asyncdb[msqlserver,odbc]
Using cached asyncdb-2.6.17-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (12 kB)
Collecting numpy==1.24.2 (from asyncdb[msqlserver,odbc])
Using cached numpy-1.24.2.tar.gz (10.9 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [33 lines of output]
Traceback (most recent call last):
File "/home/andre/.virtualenvs/my-env/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
main()
File "/home/andre/.virtualenvs/my-env/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/andre/.virtualenvs/my-env/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 112, in get_requires_for_build_wheel
backend = _build_backend()
^^^^^^^^^^^^^^^^
File "/home/andre/.virtualenvs/my-env/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 77, in _build_backend
obj = import_module(mod_path)
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/importlib/__init__.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
File "<frozen importlib._bootstrap>", line 1310, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 995, in exec_module
File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
File "/tmp/pip-build-env-7mal0xc5/overlay/lib/python3.12/site-packages/setuptools/__init__.py", line 16, in <module>
import setuptools.version
File "/tmp/pip-build-env-7mal0xc5/overlay/lib/python3.12/site-packages/setuptools/version.py", line 1, in <module>
import pkg_resources
File "/tmp/pip-build-env-7mal0xc5/overlay/lib/python3.12/site-packages/pkg_resources/__init__.py", line 2172, in <module>
register_finder(pkgutil.ImpImporter, find_on_path)
^^^^^^^^^^^^^^^^^^^
AttributeError: module 'pkgutil' has no attribute 'ImpImporter'. Did you mean: 'zipimporter'?
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
The error occurs because numpy has not been updated to the latest version. In fact, Python3.12
removed importlib.abc.Finder
, pkgutil.ImpImporter
and pkgutil.ImpLoader
(as the documentation says).
Obviously with the well-known command pip install asyncdb[odbc,msqlserver]
I get the same error.
Thanks in advance.
AttributeError: 'jdbc' object has no attribute 'rowcount'
When use execute in jdbc query, I got upper error.
The query was upsert
query.
Can u fix it?
Now, cassandra driver uses asyncore, its implementation is too old. And I want to use cassandra in pure asynchronous (asyncio-based) code in Python3.11. I want to know whether it will be soon in the next release.
After running make lint
I detected the following linting errors:
pylint: Command line or configuration file:1: UserWarning: 'BaseException' is not a proper value for the 'overgeneral-exceptions' option. Use fully qualified name (maybe 'builtins.BaseException' ?) instead. This will cease to be checked at runtime in 3.1.0.
pylint: Command line or configuration file:1: UserWarning: 'Exception' is not a proper value for the 'overgeneral-exceptions' option. Use fully qualified name (maybe 'builtins.Exception' ?) instead. This will cease to be checked at runtime in 3.1.0.
************* Module asyncdb.interfaces
asyncdb/interfaces.py:625:11: R6103: Use 'if (row := await self._cursor.fetchone()) is not None:' instead (consider-using-assignment-expr)
asyncdb/interfaces.py:636:11: R6103: Use 'if (row := self._cursor.fetchone()) is not None:' instead (consider-using-assignment-expr)
asyncdb/interfaces.py:722:11: R6103: Use 'if (data := await self._cursor.fetchrow()) is not None:' instead (consider-using-assignment-expr)
asyncdb/interfaces.py:872:21: R1714: Consider merging these comparisons with 'in' by using 'value in ('!null', '!NULL')'. Use a set instead if elements are hashable. (consider-using-in)
asyncdb/interfaces.py:888:24: W0141: Used builtin function 'map'. Using a list comprehension can be clearer. (bad-builtin)
asyncdb/interfaces.py:894:24: W0141: Used builtin function 'map'. Using a list comprehension can be clearer. (bad-builtin)
asyncdb/interfaces.py:855:4: R0912: Too many branches (14/12) (too-many-branches)
asyncdb/interfaces.py:886:49: W6001: 'typing.List' is deprecated, use 'list' instead (deprecated-typing-alias)
Hello,
is this one supported on Windows by any chance? Build is failing.
python -m pip install asyncdb
Collecting asyncdb
Using cached asyncdb-2.1.40.tar.gz (228 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [21 lines of output]
Traceback (most recent call last):
File "C:\Users\user\Desktop\Programs\Python\Python310\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 351, in <module>
main()
File "C:\Users\user\Desktop\Programs\Python\Python310\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 333, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "C:\Users\user\Desktop\Programs\Python\Python310\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 118, in get_requires_for_build_wheel
return hook(config_settings)
File "C:\Users\user\AppData\Local\Temp\pip-build-env-ik_estk3\overlay\Lib\site-packages\setuptools\build_meta.py", line 338, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=['wheel'])
File "C:\Users\user\AppData\Local\Temp\pip-build-env-ik_estk3\overlay\Lib\site-packages\setuptools\build_meta.py", line 320, in _get_build_requires
self.run_setup()
File "C:\Users\user\AppData\Local\Temp\pip-build-env-ik_estk3\overlay\Lib\site-packages\setuptools\build_meta.py", line 335, in run_setup
exec(code, locals())
File "<string>", line 270, in <module>
File "C:\Users\user\AppData\Local\Temp\pip-build-env-ik_estk3\overlay\Lib\site-packages\Cython\Build\Dependencies.py", line 970, in cythonize
module_list, module_metadata = create_extension_list(
File "C:\Users\user\AppData\Local\Temp\pip-build-env-ik_estk3\overlay\Lib\site-packages\Cython\Build\Dependencies.py", line 816, in create_extension_list
for file in nonempty(sorted(extended_iglob(filepattern)), "'%s' doesn't match any files" % filepattern):
File "C:\Users\user\AppData\Local\Temp\pip-build-env-ik_estk3\overlay\Lib\site-packages\Cython\Build\Dependencies.py", line 114, in nonempty
raise ValueError(error_msg)
ValueError: 'asyncdb/exceptions/exceptions.pyx' doesn't match any files
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
It's a Windows 10 with Python 3.10
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.