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

fix_ci #512

Merged
merged 10 commits into from Mar 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Expand Up @@ -11,12 +11,12 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.8

Expand All @@ -26,7 +26,7 @@ jobs:
echo "::set-output name=dir::$(pip cache dir)"

- name: Cache
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: release-${{ hashFiles('**/setup.py') }}-${{ hashFiles('**/tox.ini') }}
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/test.yml
Expand Up @@ -9,13 +9,13 @@ jobs:
fail-fast: false
max-parallel: 5
matrix:
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10', 'pypy-3.8']
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', 'pypy-3.8']

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -25,7 +25,7 @@ jobs:
echo "::set-output name=dir::$(pip cache dir)"

- name: Cache
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ${{ steps.pip-cache.outputs.dir }}
key:
Expand All @@ -36,13 +36,13 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade tox tox-gh-actions
python -m pip install --upgrade 'tox<4' tox-gh-actions

- name: Tox tests
run: |
tox -v

- name: Upload coverage
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v3
with:
name: Python ${{ matrix.python-version }}
2 changes: 2 additions & 0 deletions docs/changes.rst
Expand Up @@ -7,6 +7,8 @@ v3.0.0 (future)
* Refactor database backend
Backward incompatible changes:
remove 'constance.backends.database' from INSTALLED_APPS
* Dropped support for python < 3.7 and django < 3.2
* Example app now supports django 4.1

v2.10.0 (unreleased)
~~~~~~~~~~~~~~~~~~
Expand Down
16 changes: 7 additions & 9 deletions example/cheeseshop/settings.py
@@ -1,13 +1,11 @@
"""
Django settings for cheeseshop project.

Generated by 'django-admin startproject' using Django 1.8.14.

For more information on this file, see
https://docs.djangoproject.com/en/1.8/topics/settings/
https://docs.djangoproject.com/en/4.1/topics/settings/

For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.8/ref/settings/
https://docs.djangoproject.com/en/4.1/ref/settings/
"""

# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
Expand All @@ -18,7 +16,7 @@


# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.8/howto/deployment/checklist/
# See https://docs.djangoproject.com/en/4.1/howto/deployment/checklist/

SITE_ID = 1

Expand Down Expand Up @@ -76,7 +74,7 @@


# Database
# https://docs.djangoproject.com/en/1.8/ref/settings/#databases
# https://docs.djangoproject.com/en/4.1/ref/settings/#databases

DATABASES = {
'default': {
Expand Down Expand Up @@ -124,14 +122,14 @@

CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
'BACKEND': 'django.core.cache.backends.memcached.PyMemcacheCache',
'LOCATION': '127.0.0.1:11211',
}
}
CONSTANCE_DATABASE_CACHE_BACKEND = 'default'

# Internationalization
# https://docs.djangoproject.com/en/1.8/topics/i18n/
# https://docs.djangoproject.com/en/4.1/topics/i18n/

LANGUAGE_CODE = 'en-us'

Expand All @@ -145,7 +143,7 @@


# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.8/howto/static-files/
# https://docs.djangoproject.com/en/4.1/howto/static-files/

STATIC_URL = '/static/'

Expand Down
5 changes: 2 additions & 3 deletions example/cheeseshop/urls.py
@@ -1,14 +1,13 @@
from django.conf.urls import url
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.contrib import admin
from django.conf import settings
from django.urls import path
from django.urls import re_path


admin.autodiscover()

urlpatterns = [
path('admin/', admin.site.urls),
re_path('admin/', admin.site.urls),
]

if settings.DEBUG:
Expand Down
9 changes: 0 additions & 9 deletions example/cheeseshop/wsgi.py
@@ -1,12 +1,3 @@
"""
WSGI config for cheeseshop project.

It exposes the WSGI callable as a module-level variable named ``application``.

For more information on this file, see
https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/
"""

import os

from django.core.wsgi import get_wsgi_application
Expand Down
4 changes: 2 additions & 2 deletions example/requirements.txt
@@ -1,2 +1,2 @@
Django>=2.2
python-memcached
Django>=3.2
pymemcache
7 changes: 2 additions & 5 deletions setup.py
Expand Up @@ -34,9 +34,6 @@ def find_version(*file_paths):
'Development Status :: 5 - Production/Stable',
'Environment :: Web Environment',
'Framework :: Django',
'Framework :: Django :: 2.2',
'Framework :: Django :: 3.0',
'Framework :: Django :: 3.1',
'Framework :: Django :: 3.2',
'Framework :: Django :: 4.0',
'Framework :: Django :: 4.1',
Expand All @@ -46,11 +43,11 @@ def find_version(*file_paths):
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
Expand All @@ -59,7 +56,7 @@ def find_version(*file_paths):
packages=find_packages(exclude=['tests', 'tests.*']),
include_package_data=True,
zip_safe=False,
python_requires='>=3.6',
python_requires='>=3.7',
install_requires=[
'django-picklefield',
],
Expand Down
Empty file removed test_threads.py
Empty file.
18 changes: 9 additions & 9 deletions tox.ini
@@ -1,20 +1,20 @@
[tox]
requires =
tox<4
envlist =
py{36,37,38,39,py3}-dj{22,30,31,32}-{unittest,pytest}
py{38,39,310}-dj{40,41,main}-{unittest,pytest}
py310-dj32-{unittest,pytest}

py{37,38,39,310,py3}-dj{32}-{unittest,pytest}
py{38,39,310}-dj{40}-{unittest,pytest}
py{38,39,310,311}-dj{41}-{unittest,pytest}
py{310,311}-dj{main}-{unittest,pytest}

[testenv]
deps =
redis
coverage
django-picklefield
dj22: Django>=2.2,<3.0
dj30: Django>=3.0,<3.1
dj31: Django>=3.1,<3.2
dj32: Django>=3.2,<4
dj40: Django>=4.0,<4.1
dj41: Django>=4.1b1,<4.2
dj41: Django>=4.1,<4.2
djmain: https://github.com/django/django/archive/main.tar.gz
pytest: pytest
pytest: pytest-cov
Expand All @@ -33,9 +33,9 @@ setenv =

[gh-actions]
python =
3.6: py36
3.7: py37
3.8: py38
3.9: py39
3.10: py310
3.11: py311
pypy-3: pypy3