Skip to content

Conversation

@inducer
Copy link

@inducer inducer commented Jan 12, 2025

Fixes compatibility with Python 3.13.

Without this, errors such as this occur:

Traceback (most recent call last):
  File "/home/babybuddy/babybuddy/babybuddy/wsgi.py", line 9, in <module>
    application = get_wsgi_application()
  File "/home/babybuddy/babybuddy/.venv/lib/python3.13/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application
    django.setup(set_prefix=False)
    ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
  File "/home/babybuddy/babybuddy/.venv/lib/python3.13/site-packages/django/__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
    ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/babybuddy/babybuddy/.venv/lib/python3.13/site-packages/django/apps/registry.py", line 116, in populate
    app_config.import_models()
    ~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/home/babybuddy/babybuddy/.venv/lib/python3.13/site-packages/django/apps/config.py", line 269, in import_models
    self.models_module = import_module(models_module_name)
                         ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/importlib/__init__.py", line 88, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/babybuddy/babybuddy/core/models.py", line 16, in <module>
    from babybuddy.site_settings import NapSettings
  File "/home/babybuddy/babybuddy/babybuddy/site_settings.py", line 20, in <module>
    class NapSettings(dbsettings.Group):
    ...<15 lines>...
        )
  File "/home/babybuddy/babybuddy/.venv/lib/python3.13/site-packages/dbsettings/group.py", line 22, in __init__
    raise TypeError('The type of %s (%s) is not a valid Value.' %
                    (attribute_name, attr.__class__.__name__))
TypeError: The type of __firstlineno__ (int) is not a valid Value.

Fixes compatibility with Python 3.13
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.

1 participant