openedx / django-config-models Goto Github PK
View Code? Open in Web Editor NEWConfiguration models for Django allowing config management with auditing.
License: GNU Affero General Public License v3.0
Configuration models for Django allowing config management with auditing.
License: GNU Affero General Public License v3.0
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'
A recent attempt to remove a field from a config model failed: https://github.com/edx/edx-platform/pull/14939. Please document the process for removing fields.
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).
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?
cd django-config-models
virtualenv env
source env/bin/activate
pip install tox
tox py27-django{18,19}
Explicitly tell py.test
to run on config_models
package in the tox.ini
file.
===================================================================================== 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.
It has an issue with django3.0 with the six module that was removed from django
Details are here: https://docs.openedx.org/en/latest/developers/how-tos/maintain-a-repo.html
If the doc is unclear, please communicate that to Ned.
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.