Skip to content
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

Time to rename django-firebird python package #130

Open
maxirobaina opened this issue Jun 13, 2022 · 2 comments
Open

Time to rename django-firebird python package #130

maxirobaina opened this issue Jun 13, 2022 · 2 comments

Comments

@maxirobaina
Copy link
Owner

Since the last update of django-firebird at master branch, the old python driver fdb was replaced by the new and official firebird driver [1] which just work with Firebird 3+, Python 3.8+

The python firebird-driver package and the django-firebird package, both are called firebird [2] so, this make a namespaces conflict when these are called for import.

Error loading firebird driver: No module named 'firebird.base.config'; 'firebird.base' is not a package [3]

A solution is copy (or symlink) the django-firebird package into django.db.backends. namespace but is not a good practice.

So, maybe is time to rename the firebird package from django-firebird to avoid any conflict.

Suggestions:

  • firebirdsql
  • firebird_engine
  • django_firebird

others...?

[1] https://pypi.org/project/firebird-driver/
[2] django-firebird is just the project name.

[3] Fulll traceback as example

Python 3.9.9 (main, Apr  3 2022, 20:39:45) 
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from firebird import base
Traceback (most recent call last):
  File "/home/maxi/.pyenv/versions/django/lib/python3.9/site-packages/firebird/base.py", line 6, in <module>
    import firebird.driver as Database
  File "/home/maxi/.pyenv/versions/django/lib/python3.9/site-packages/firebird/driver/__init__.py", line 38, in <module>
    from .config import driver_config, ServerConfig, DatabaseConfig, DriverConfig
  File "/home/maxi/.pyenv/versions/django/lib/python3.9/site-packages/firebird/driver/config.py", line 43, in <module>
    from firebird.base.config import Config, StrOption, IntOption, BoolOption, EnumOption, \
ModuleNotFoundError: No module named 'firebird.base.config'; 'firebird.base' is not a package

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/maxi/.pyenv/versions/django/lib/python3.9/site-packages/firebird/base.py", line 10, in <module>
    raise ImproperlyConfigured("Error loading firebird driver: %s" % e)
django.core.exceptions.ImproperlyConfigured: Error loading firebird driver: No module named 'firebird.base.config'; 'firebird.base' is not a package
@GilShoshan94
Copy link

I ran into this issue and was just about to write about it too.

I think django_firebird is the best as it matches the project name and follows better the PEP 423 naming convention

@mariuz
Copy link
Collaborator

mariuz commented Jul 27, 2022

firebirdsql is already taken https://pypi.org/project/firebirdsql/

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

No branches or pull requests

3 participants