preparing v0.10.0

This commit is contained in:
Marco Bonetti 2023-12-04 16:48:07 +01:00
parent d36b89749f
commit caad6f9e35
9 changed files with 30 additions and 52 deletions

View file

@ -9,7 +9,7 @@ jobs:
strategy: strategy:
max-parallel: 4 max-parallel: 4
matrix: matrix:
python-version: [3.8, 3.9, "3.10"] python-version: ["3.9", "3.10", "3.11", "3.12"]
steps: steps:
- uses: actions/checkout@v1 - uses: actions/checkout@v1

View file

@ -1,10 +1,11 @@
Version History Version History
=============== ===============
Version 0.9.10 (unreleased) Version 0.10.0
--------------------------- --------------
* Fix link to polib. (#277, thanks @gamboz) * Fix link to polib. (#277, thanks @gamboz)
* Deepl: use the PRO API endpoint when using a PRO API key. (#278, thanks @nullcode) * Deepl: use the PRO API endpoint when using a PRO API key. (#278, thanks @nullcode)
* Limit supported versions to Django 4.2 and 5.0, using Python 3.9, 3.10, 3.11 and 3.12
Version 0.9.9 Version 0.9.9

View file

@ -73,7 +73,7 @@ release = get_version()
# #
# This is also used if you do content translation via gettext catalogs. # This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases. # Usually you set "language" from the command line for these cases.
language = None language = "en"
# There are two options for replacing |today|: either, you set today to some # There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used: # non-false value, then it is used:

View file

@ -6,7 +6,7 @@ order_by_type = true
known_django = "django" known_django = "django"
known_django_third_party = "django_*" known_django_third_party = "django_*"
known_first_party = "apps,rosetta" known_first_party = "apps,rosetta"
sections = "FUTURE,STDLIB,THIRDPARTY,DJANGO,DJANGO_THIRD_PARTY,REST_FRAMEWORK,FIRSTPARTY,LOCALFOLDER" sections = "FUTURE,STDLIB,THIRDPARTY,DJANGO,DJANGO_THIRD_PARTY,FIRSTPARTY,LOCALFOLDER"
skip_glob= "**/migrations/**" skip_glob= "**/migrations/**"

View file

@ -1,12 +1,4 @@
try: VERSION = (0, 10, 0)
import django
if django.VERSION[:3] <= (3, 2, 0):
default_app_config = "rosetta.apps.RosettaAppConfig"
except ImportError:
pass
VERSION = (0, 9, 10)
def get_version(limit=3): def get_version(limit=3):

View file

@ -5,6 +5,8 @@ import shutil
from unittest import mock from unittest import mock
from urllib.parse import urlencode from urllib.parse import urlencode
import vcr
from django import VERSION from django import VERSION
from django.conf import settings from django.conf import settings
from django.core.exceptions import ImproperlyConfigured from django.core.exceptions import ImproperlyConfigured
@ -15,7 +17,6 @@ from django.test.client import Client
from django.urls import resolve, reverse from django.urls import resolve, reverse
from django.utils.encoding import force_bytes from django.utils.encoding import force_bytes
import vcr
from rosetta import views from rosetta import views
from rosetta.poutil import find_pos from rosetta.poutil import find_pos
from rosetta.signals import entry_changed, post_save from rosetta.signals import entry_changed, post_save

View file

@ -52,19 +52,16 @@ setup(
"Topic :: Software Development :: Localization", "Topic :: Software Development :: Localization",
"Topic :: Software Development :: Internationalization", "Topic :: Software Development :: Internationalization",
"Framework :: Django", "Framework :: Django",
"Framework :: Django :: 3.0", "Framework :: Django :: 4.2",
"Framework :: Django :: 3.1", "Framework :: Django :: 5.0",
"Framework :: Django :: 3.2",
"Framework :: Django :: 4.0",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
], ],
include_package_data=True, include_package_data=True,
zip_safe=False, zip_safe=False,
install_requires=["Django >= 2.2", "requests >= 2.1.0", "polib >= 1.1.0"], install_requires=["Django >= 4.2", "requests >= 2.30.0", "polib >= 1.1.0"],
tests_require=["tox", "vcrpy"], tests_require=["tox", "vcrpy"],
cmdclass={"test": Tox}, cmdclass={"test": Tox},
) )

View file

@ -1,8 +1,6 @@
import os import os
import sys import sys
import django
SITE_ID = 1 SITE_ID = 1
@ -17,22 +15,13 @@ DATABASES = {
} }
} }
if django.VERSION[:3] >= (3, 2, 0): CACHES = {
CACHES = { "default": {
"default": { "BACKEND": "django.core.cache.backends.memcached.PyMemcacheCache",
"BACKEND": "django.core.cache.backends.memcached.PyMemcacheCache", "LOCATION": "127.0.0.1:11211",
"LOCATION": "127.0.0.1:11211", "KEY_PREFIX": "ROSETTA_TEST",
"KEY_PREFIX": "ROSETTA_TEST",
}
}
else:
CACHES = {
"default": {
"BACKEND": "django.core.cache.backends.memcached.MemcachedCache",
"LOCATION": "127.0.0.1:11211",
"KEY_PREFIX": "ROSETTA_TEST",
}
} }
}
# CACHES = {'default': {'BACKEND': 'django.core.cache.backends.dummy.DummyCache'}} # CACHES = {'default': {'BACKEND': 'django.core.cache.backends.dummy.DummyCache'}}
@ -52,11 +41,9 @@ INSTALLED_APPS = [
"django.contrib.sites", "django.contrib.sites",
"django.contrib.messages", "django.contrib.messages",
"rosetta", "rosetta",
"rosetta.tests.test_app.apps.TestAppConfig",
] ]
if django.VERSION[0:2] >= (1, 7):
INSTALLED_APPS.append("rosetta.tests.test_app.apps.TestAppConfig")
LANGUAGE_CODE = "en" LANGUAGE_CODE = "en"
MIDDLEWARE = ( MIDDLEWARE = (
@ -84,8 +71,6 @@ SILENCED_SYSTEM_CHECKS = ["translation.E002"]
LOCALE_PATHS = [os.path.join(PROJECT_PATH, "locale")] LOCALE_PATHS = [os.path.join(PROJECT_PATH, "locale")]
SOUTH_TESTS_MIGRATE = False
FIXTURE_DIRS = (os.path.join(PROJECT_PATH, "fixtures"),) FIXTURE_DIRS = (os.path.join(PROJECT_PATH, "fixtures"),)
STATIC_URL = "/static/" STATIC_URL = "/static/"
ROOT_URLCONF = "testproject.urls" ROOT_URLCONF = "testproject.urls"
@ -112,6 +97,8 @@ TEMPLATES = [
} }
] ]
USE_TZ = True
STATIC_URL = "/static/" STATIC_URL = "/static/"
# SESSION_ENGINE = "django.contrib.sessions.backends.signed_cookies" # SESSION_ENGINE = "django.contrib.sessions.backends.signed_cookies"

14
tox.ini
View file

@ -1,16 +1,18 @@
[tox] [tox]
envlist = envlist =
flake8, flake8,
py{38,39,310}-django{32,40,41,42}, py{38,39,310}-django42,
py{310,311,312}-django50,
gettext, gettext,
docs docs
[gh-actions] [gh-actions]
python = python =
3.10: py310-django32, py310-django40, py310-django41, py310-django42 3.12: py312-django50
3.9: py39-django32, py39-django40, py39-django41, py39-django42 3.11: py311-django42, py311-django50
3.8: py38-django32, py38-django40, py38-django41, py38-django42 3.10: py310-django42, py310-django50
3.9: py39-django42
skipsdist = True skipsdist = True
@ -27,10 +29,8 @@ setenv =
PYTHONDONTWRITEBYTECODE=1 PYTHONDONTWRITEBYTECODE=1
deps = deps =
django32: Django>=3.2,<=3.2.99
django40: Django>=4.0,<4.1
django41: Django>=4.1a,<4.2
django42: Django>=4.2a,<4.3 django42: Django>=4.2a,<4.3
django50: Django>=5.0,<5.1
pymemcache pymemcache
requests requests