Giter Club home page Giter Club logo

asyncdb's Introduction

Metrics Habits

Coding Habits:

Calendar

Latest Tweets:

Twitter

asyncdb's People

Contributors

dependabot[bot] avatar ecrespo avatar guilleg25 avatar jelitox avatar phenobarbital avatar pyup-bot avatar roymanigley avatar snyk-bot avatar vijoin avatar willicab avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

asyncdb's Issues

missing 'f' on error message f-strings

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}"

Numpy Dependency (1.24.2) does not work with Python3.12

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.

support asyncio-based cassandra driver

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.

Linting errors detected with "make lint"

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)

Windows build failing

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.