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

Changed to python 3.11 for issue #33 #61

Closed
wants to merge 9 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates


version: 2

updates:
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "daily"
versioning-strategy: increase
- package-ecosystem: "npm"
directory: "/src/pretix/static/npm_dir"
schedule:
interval: "daily"
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
- name: Set up Python 3.11
uses: actions/setup-python@v1
with:
python-version: 3.8
python-version: 3.11
- uses: actions/cache@v1
with:
path: ~/.cache/pip
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/strings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:
name: Check gettext syntax
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
- name: Set up Python 3.11
uses: actions/setup-python@v1
with:
python-version: 3.8
python-version: 3.11
- uses: actions/cache@v1
with:
path: ~/.cache/pip
Expand All @@ -43,10 +43,10 @@ jobs:
name: Spellcheck
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
- name: Set up Python 3.11
uses: actions/setup-python@v1
with:
python-version: 3.8
python-version: 3.11
- uses: actions/cache@v1
with:
path: ~/.cache/pip
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
- name: Set up Python 3.11
uses: actions/setup-python@v1
with:
python-version: 3.8
python-version: 3.11
- uses: actions/cache@v1
with:
path: ~/.cache/pip
Expand All @@ -38,10 +38,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
- name: Set up Python 3.11
uses: actions/setup-python@v1
with:
python-version: 3.8
python-version: 3.11
- uses: actions/cache@v1
with:
path: ~/.cache/pip
Expand Down
12 changes: 4 additions & 8 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,13 @@ jobs:
name: Tests
strategy:
matrix:
python-version: [3.6, 3.7, 3.8]
python-version: [3.11]
database: [sqlite, postgres, mysql]
exclude:
- database: mysql
python-version: 3.7
python-version: 3.11
- database: sqlite
python-version: 3.7
- database: mysql
python-version: 3.6
- database: sqlite
python-version: 3.6
python-version: 3.11
steps:
- uses: actions/checkout@v2
- uses: getong/[email protected]
Expand Down Expand Up @@ -75,4 +71,4 @@ jobs:
with:
file: src/coverage.xml
fail_ci_if_error: true
if: matrix.database == 'postgres' && matrix.python-version == '3.8'
if: matrix.database == 'postgres' && matrix.python-version == '3.11'
4 changes: 1 addition & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
FROM python:3.8
FROM python:3.11

RUN apt-get update && \
apt-get install -y --no-install-recommends \
build-essential \
default-libmysqlclient-dev \
gettext \
git \
libffi-dev \
Expand Down Expand Up @@ -51,7 +50,6 @@ RUN pip3 install -U \
pip3 install \
-r requirements.txt \
-r requirements/memcached.txt \
-r requirements/mysql.txt \
gunicorn django-extensions ipython && \
rm -rf ~/.cache/pip

Expand Down
11 changes: 2 additions & 9 deletions doc/admin/config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -135,30 +135,23 @@ Database settings
Example::

[database]
backend=mysql
backend=postgresql
name=pretix
user=pretix
password=abcd
host=localhost
port=3306

``backend``
One of ``mysql``, ``sqlite3``, ``oracle`` and ``postgresql``.
One of ``sqlite3``, ``oracle`` and ``postgresql``.
Default: ``sqlite3``.

If you use MySQL, be sure to create your database using
``CREATE DATABASE <dbname> CHARACTER SET utf8;``. Otherwise, Unicode
support will not properly work.

``name``
The database's name. Default: ``db.sqlite3``.

``user``, ``password``, ``host``, ``port``
Connection details for the database connection. Empty by default.

``galera``
Indicates if the database backend is a MySQL/MariaDB Galera cluster and
turns on some optimizations/special case handlers. Default: ``False``

.. _`config-replica`:

Expand Down
4 changes: 2 additions & 2 deletions doc/admin/installation/manual_smallscale.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ installation guides):

* A SMTP server to send out mails, e.g. `Postfix`_ on your machine or some third-party server you have credentials for
* A HTTP reverse proxy, e.g. `nginx`_ or Apache to allow HTTPS connections
* A `PostgreSQL`_ 9.5+, `MySQL`_ 5.7+, or MariaDB 10.2.7+ database server
* A `PostgreSQL`_ 11+, `MySQL`_ 5.7+, or MariaDB 10.2.7+ database server
* A `redis`_ server
* A `nodejs_` installation

Expand Down Expand Up @@ -134,7 +134,7 @@ command if you're running MySQL::

(venv)$ pip3 install "pretix[postgres]" gunicorn

Note that you need Python 3.6 or newer. You can find out your Python version using ``python -V``.
Note that you need Python 3.9 or newer. You can find out your Python version using ``python -V``.

We also need to create a data directory::

Expand Down
4 changes: 3 additions & 1 deletion doc/development/setup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@ Your should install the following on your system:
* ``libssl`` (Debian package: ``libssl-dev``)
* ``libxml2`` (Debian package ``libxml2-dev``)
* ``libxslt`` (Debian package ``libxslt1-dev``)
* ``libenchant1c2a`` (Debian package ``libenchant1c2a``)
* ``libenchant1c2a`` (Debian package ``libenchant1c2a`` or ``libenchant2-2``)
* ``msgfmt`` (Debian package ``gettext``)
* ``freetype`` (Debian package ``libfreetype-dev``)
* ``git``
* for pillow: ``libjpeg`` (Debian Package ``libjpeg-dev``)

Your local python environment
-----------------------------
Expand Down
2 changes: 1 addition & 1 deletion src/pretix/api/middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def __call__(self, request: HttpRequest):
call.response_body = json.dumps(resp.data)
else:
call.response_body = repr(resp).encode()
call.response_headers = json.dumps(resp._headers)
call.response_headers = json.dumps(resp.headers._store)
call.locked = None
call.save(update_fields=['locked', 'response_code', 'response_headers',
'response_body'])
Expand Down
9 changes: 5 additions & 4 deletions src/pretix/base/i18n.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,11 @@ def __str__(self):
def get_babel_locale():
babel_locale = 'en'
# Babel, and therefore django-phonenumberfield, do not support our custom locales such das de_Informal
if localedata.exists(translation.get_language()):
babel_locale = translation.get_language()
elif localedata.exists(translation.get_language()[:2]):
babel_locale = translation.get_language()[:2]
if translation.get_language():
if localedata.exists(translation.get_language()):
babel_locale = translation.get_language()
elif localedata.exists(translation.get_language()[:2]):
babel_locale = translation.get_language()[:2]
return babel_locale


Expand Down
9 changes: 4 additions & 5 deletions src/pretix/base/migrations/0102_auto_20181017_0024.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# Generated by Django 2.1 on 2018-10-17 00:24

import jsonfallback.fields
from django.core.exceptions import ImproperlyConfigured
from django.db import migrations
from django.db import migrations, models
from django_mysql.checks import mysql_connections
from django_mysql.utils import connection_is_mariadb

Expand Down Expand Up @@ -77,19 +76,19 @@ class Migration(migrations.Migration):
migrations.AddField(
model_name='cartposition',
name='attendee_name_parts',
field=jsonfallback.fields.FallbackJSONField(null=False, default=dict),
field=models.JSONField(null=False, default=dict),
preserve_default=False,
),
migrations.AddField(
model_name='orderposition',
name='attendee_name_parts',
field=jsonfallback.fields.FallbackJSONField(null=False, default=dict),
field=models.JSONField(null=False, default=dict),
preserve_default=False,
),
migrations.AddField(
model_name='invoiceaddress',
name='name_parts',
field=jsonfallback.fields.FallbackJSONField(default=dict),
field=models.JSONField(default=dict),
preserve_default=False,
),
migrations.RunPython(set_attendee_name_parts, migrations.RunPython.noop)
Expand Down
1 change: 0 additions & 1 deletion src/pretix/base/migrations/0103_auto_20181121_1224.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Generated by Django 2.1.1 on 2018-11-21 12:24

import django.db.models.deletion
import jsonfallback.fields
from django.db import migrations, models

import pretix.base.models.fields
Expand Down
1 change: 0 additions & 1 deletion src/pretix/base/migrations/0104_auto_20181114_1526.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import django.db.models.deletion
import django.db.models.manager
import jsonfallback.fields
from django.db import migrations, models


Expand Down
1 change: 0 additions & 1 deletion src/pretix/base/migrations/0105_auto_20190112_1512.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Generated by Django 2.1 on 2019-01-12 15:12

import django.db.models.deletion
import jsonfallback.fields
from django.db import migrations, models

import pretix.base.models.fields
Expand Down
1 change: 0 additions & 1 deletion src/pretix/base/migrations/0107_auto_20190129_1337.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Generated by Django 2.1.5 on 2019-01-29 13:37

import django.db.models.deletion
import jsonfallback.fields
from django.db import migrations, models

import pretix.base.models.fields
Expand Down
1 change: 0 additions & 1 deletion src/pretix/base/migrations/0108_auto_20190201_1527.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Generated by Django 2.1.5 on 2019-02-01 15:27

import django.db.models.deletion
import jsonfallback.fields
from django.db import migrations, models

import pretix.base.models.fields
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from decimal import Decimal

import django.db.models.deletion
import jsonfallback.fields
from django.conf import settings
from django.core.cache import cache
from django.db import migrations, models
Expand Down Expand Up @@ -190,7 +189,7 @@ class Migration(migrations.Migration):
migrations.AlterField(
model_name='cartposition',
name='attendee_name_parts',
field=jsonfallback.fields.FallbackJSONField(default=dict),
field=models.JSONField(default=dict),
),
migrations.AlterField(
model_name='cartposition',
Expand All @@ -210,7 +209,7 @@ class Migration(migrations.Migration):
migrations.AlterField(
model_name='invoiceaddress',
name='name_parts',
field=jsonfallback.fields.FallbackJSONField(default=dict),
field=models.JSONField(default=dict),
),
migrations.AlterField(
model_name='item',
Expand All @@ -225,7 +224,7 @@ class Migration(migrations.Migration):
migrations.AlterField(
model_name='orderposition',
name='attendee_name_parts',
field=jsonfallback.fields.FallbackJSONField(default=dict),
field=models.JSONField(default=dict),
),
migrations.AlterField(
model_name='orderposition',
Expand Down
1 change: 0 additions & 1 deletion src/pretix/base/migrations/0109_auto_20190208_1432.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Generated by Django 2.1 on 2019-02-08 14:32

import django.db.models.deletion
import jsonfallback.fields
from django.db import migrations, models

import pretix.base.models.fields
Expand Down
1 change: 0 additions & 1 deletion src/pretix/base/migrations/0110_auto_20190219_1245.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Generated by Django 2.1.5 on 2019-02-19 12:45

import django.db.models.deletion
import jsonfallback.fields
from django.db import migrations, models

import pretix.base.models.fields
Expand Down
1 change: 0 additions & 1 deletion src/pretix/base/migrations/0111_auto_20190219_0949.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Generated by Django 2.1.5 on 2019-02-19 09:49

import django.db.models.deletion
import jsonfallback.fields
from django.db import migrations, models

import pretix.base.models.fields
Expand Down
1 change: 0 additions & 1 deletion src/pretix/base/migrations/0113_auto_20190312_0942.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Generated by Django 2.1.5 on 2019-03-12 09:42

import django.db.models.deletion
import jsonfallback.fields
from django.db import migrations, models

import pretix.base.models.fields
Expand Down
1 change: 0 additions & 1 deletion src/pretix/base/migrations/0114_auto_20190316_1014.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Generated by Django 2.1.7 on 2019-03-16 10:14

import django.db.models.deletion
import jsonfallback.fields
from django.db import migrations, models

import pretix.base.models.fields
Expand Down
1 change: 0 additions & 1 deletion src/pretix/base/migrations/0115_auto_20190323_2238.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from decimal import Decimal

import django.db.models.deletion
import jsonfallback.fields
from django.db import migrations, models

import pretix.base.models.fields
Expand Down
1 change: 0 additions & 1 deletion src/pretix/base/migrations/0116_auto_20190402_0722.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Generated by Django 2.1.5 on 2019-04-02 07:22

import django.db.models.deletion
import jsonfallback.fields
from django.db import migrations, models

import pretix.base.models.fields
Expand Down
1 change: 0 additions & 1 deletion src/pretix/base/migrations/0118_auto_20190423_0839.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Generated by Django 2.2 on 2019-04-23 08:39

import django.db.models.deletion
import jsonfallback.fields
from django.db import migrations, models

import pretix.base.models.fields
Expand Down
1 change: 0 additions & 1 deletion src/pretix/base/migrations/0119_auto_20190509_0654.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Generated by Django 2.2 on 2019-05-09 06:54

import django.db.models.deletion
import jsonfallback.fields
from django.db import migrations, models

import pretix.base.models.fields
Expand Down
Loading