Giter Club home page Giter Club logo

django-config-models's People

Contributors

aht007 avatar arbabkhalil avatar awais786 avatar azarembok avatar bmedx avatar cpennington avatar dependabot[bot] avatar edx-requirements-bot avatar feanil avatar iamsobanjaved avatar irtazaakram avatar jawayria avatar jmbowman avatar jristau1984 avatar kdmccormick avatar matthugs avatar mikix avatar mraarif avatar mumarkhan999 avatar nedbat avatar regisb avatar rgraber avatar robrap avatar salman2013 avatar sarina avatar timmc-edx avatar usamasadiq avatar xitij2000 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

Watchers

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

django-config-models's Issues

module 'django.contrib.admin' has no attribute 'display'

Python: 3.8

Django: 3.1.14

After upgrading from v2.3.0 to v2.4.0, started getting this exception on python manage.py migrate command:

Traceback (most recent call last):
  File "manage.py", line 25, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python3.8/site-packages/django/core/management/__init__.py", line 401, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python3.8/site-packages/django/core/management/__init__.py", line 377, in execute
    django.setup()
  File "/usr/local/lib/python3.8/site-packages/django/__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/usr/local/lib/python3.8/site-packages/django/apps/registry.py", line 122, in populate
    app_config.ready()
  File "/usr/local/lib/python3.8/site-packages/django/contrib/admin/apps.py", line 24, in ready
    self.module.autodiscover()
  File "/usr/local/lib/python3.8/site-packages/django/contrib/admin/__init__.py", line 24, in autodiscover
    autodiscover_modules('admin', register_to=site)
  File "/usr/local/lib/python3.8/site-packages/django/utils/module_loading.py", line 47, in autodiscover_modules
    import_module('%s.%s' % (app_config.name, module_to_search))
  File "/usr/local/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 843, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/saleor/.local/lib/python3.8/site-packages/config_models/admin.py", line 152, in <module>
    class KeyedConfigurationModelAdmin(ConfigurationModelAdmin):
  File "/home/saleor/.local/lib/python3.8/site-packages/config_models/admin.py", line 202, in KeyedConfigurationModelAdmin
    @admin.display(
AttributeError: module 'django.contrib.admin' has no attribute 'display'

Test django-config-models on Python 3.11

This repository is a depedency of edx-platform and needs to be upgraded to Python 3.11 before
the Readwood release is cut (mid-April).

  • Requirements are compiled with Python 3.8
  • Tests are run on Python 3.8 and 3.11
  • (Optional) Tests are also run with 3.12 and passing or 3.12 issues are ticketed.
  • Classifiers in setup.py setup.cfg or pyproject.toml indicate Python 3.11 support
  • A new version is release to PyPI
  • A PR is merged to edx-platform to use the new version

Cache never invalidating

It seems like whenever MyConfiguration.current() is called, it gets cached indefinitely inside DEFAULT_REQUEST_CACHE. cache_timeout is ignored inside TieredCache for RequestCache. This prevents the cache from validating when used outside of the request context. Is this an expected behavior?

Tox fails if there is a virtualenv inside root dir

Steps to reproduce this issue

  1. Clone de repository
  2. cd django-config-models
  3. virtualenv env
  4. source env/bin/activate
  5. pip install tox
  6. tox py27-django{18,19}

Possible fix

Explicitly tell py.test to run on config_models package in the tox.ini file.

Relevant error message

===================================================================================== FAILURES ======================================================================================
____________________________________________________________________________________ test_pydist ____________________________________________________________________________________

    def test_pydist():
        """Make sure pydist.json exists and validates against our schema."""
        # XXX this test may need manual cleanup of older wheels
    
>       import jsonschema
E       ImportError: No module named jsonschema

env/lib/python2.7/site-packages/wheel/test/test_basic.py:117: ImportError
____________________________________________________________________________________ test_keygen ____________________________________________________________________________________

    def test_keygen():
        def get_keyring():
            WheelKeys, keyring = tool.get_keyring()
    
            class WheelKeysTest(WheelKeys):
                def save(self):
                    pass
    
            class keyringTest:
                @classmethod
                def get_keyring(cls):
                    class keyringTest2:
                        pw = None
                        def set_password(self, a, b, c):
                            self.pw = c
                        def get_password(self, a, b):
                            return self.pw
    
                    return keyringTest2()
    
            return WheelKeysTest, keyringTest
    
>       tool.keygen(get_keyring=get_keyring)

env/lib/python2.7/site-packages/wheel/test/test_tool.py:25: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
env/lib/python2.7/site-packages/wheel/tool/__init__.py:39: in keygen
    WheelKeys, keyring = get_keyring()
env/lib/python2.7/site-packages/wheel/test/test_tool.py:5: in get_keyring
    WheelKeys, keyring = tool.get_keyring()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

    def get_keyring():
        try:
            from ..signatures import keys
            import keyring
            assert keyring.get_keyring().priority
        except (ImportError, AssertionError):
>           raise WheelError("Install wheel[signatures] (requires keyring, keyrings.alt, pyxdg) for signatures.")
E           WheelError: Install wheel[signatures] (requires keyring, keyrings.alt, pyxdg) for signatures.

env/lib/python2.7/site-packages/wheel/tool/__init__.py:34: WheelError
================================================================================= warnings summary ==================================================================================
env/lib/python2.7/site-packages/wheel/test/test_signatures.py::test_ed25519py
  /Users/lucas/opencraft/django-config-models/env/lib/python2.7/site-packages/wheel/signatures/ed25519py.py:24: RuntimeWarning: ed25519ll should choose random seed.
    RuntimeWarning)

-- Docs: http://doc.pytest.org/en/latest/warnings.html
================================================================== 2 failed, 43 passed, 1 warnings in 8.52 seconds ==================================================================
ERROR: InvocationError: '/Users/lucas/opencraft/django-config-models/.tox/py27-django18/bin/py.test'

I'll send a PR later fixing this problem. I'm just opening this issue to keep track of it.

Django 3.0 support

It has an issue with django3.0 with the six module that was removed from django

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.