Works well on 3.8 so far.

This commit is contained in:
Daniel Gagnon 2023-02-04 16:06:04 -05:00
parent d4865711ec
commit 893e7ae958
11 changed files with 20 additions and 11 deletions

1
.gitignore vendored
View File

@ -215,3 +215,4 @@ tags
.idea/
.pytest_cache/
/out/

View File

@ -12,7 +12,7 @@ repos:
rev: v3.3.1
hooks:
- id: pyupgrade
args: [--py310-plus]
args: [--py38-plus]
exclude: hooks/
- repo: https://github.com/psf/black

View File

@ -33,7 +33,7 @@ To run all tests using various versions of python in virtualenvs defined in tox.
It is possible to test with a specific version of python. To do this, the command
is:
$ tox -e py310
$ tox -e py38
This will run pytest with the python3.10 interpreter, for example.

View File

@ -17,6 +17,8 @@
"windows": "n",
"use_pycharm": "n",
"use_docker": "n",
"use_sqlite": "n",
"use_postgresql": "n",
"postgresql_version": [
"14",
"13",

View File

@ -14,6 +14,8 @@ Make sure to have the following on your host:
* Redis_, if using Celery
* Cookiecutter_
And if using Windows, you will also need the rust compiler.
First things first.
#. Create a virtualenv: ::

View File

@ -46,6 +46,9 @@ timezone:
windows:
Indicates whether the project should be configured for development on Windows.
use_sqlite:
Indicates whether the project should be configured for SQlite. Requires Windows.
use_pycharm:
Indicates whether the project should be configured for development with PyCharm_.

View File

@ -1,6 +1,6 @@
[tox]
skipsdist = true
envlist = py310,black-template
envlist = py38,black-template
[testenv]
deps = -rrequirements.txt

View File

@ -13,7 +13,7 @@ repos:
rev: v3.3.1
hooks:
- id: pyupgrade
args: [--py310-plus]
args: [--py38-plus]
- repo: https://github.com/psf/black
rev: 23.1.0

View File

@ -38,7 +38,7 @@ LOCALE_PATHS = [str(BASE_DIR / "locale")]
# DATABASES
# ------------------------------------------------------------------------------
# https://docs.djangoproject.com/en/dev/ref/settings/#databases
{% if cookiecutter.use_docker == "y" -%}
{% if cookiecutter.use_docker == "y" or cookiecutter.use_sqlite == "y" -%}
DATABASES = {"default": env.db("DATABASE_URL")}
{%- else %}
DATABASES = {

View File

@ -2,11 +2,12 @@ pytz==2022.7.1 # https://github.com/stub42/pytz
python-slugify==8.0.0 # https://github.com/un33k/python-slugify
Pillow==9.4.0 # https://github.com/python-pillow/Pillow
{%- if cookiecutter.frontend_pipeline == 'Django Compressor' %}
{%- if cookiecutter.windows == 'y' and cookiecutter.use_docker == 'n' %}
rcssmin==1.1.0 --install-option="--without-c-extensions" # https://github.com/ndparker/rcssmin
{%- else %}
# BUG: prevents Django Compressor from installing on windows. I was able to install rcssmin==1.1.1 without issues
# {#%- if cookiecutter.windows == 'y' and cookiecutter.use_docker == 'n' %#}
# rcssmin==1.1.0 --install-option="--without-c-extensions" # https://github.com/ndparker/rcssmin
# {%- else %}
rcssmin==1.1.1 # https://github.com/ndparker/rcssmin
{%- endif %}
# {#%- endif %#}
{%- endif %}
argon2-cffi==21.3.0 # https://github.com/hynek/argon2_cffi
{%- if cookiecutter.use_whitenoise == 'y' %}

View File

@ -2,9 +2,9 @@
Werkzeug[watchdog]==2.2.2 # https://github.com/pallets/werkzeug
ipdb==0.13.11 # https://github.com/gotcha/ipdb
{%- if cookiecutter.use_docker == 'y' %}
{%- if cookiecutter.use_docker == 'y' and cookiecutter.use_postgresql == 'y' %}
psycopg2==2.9.5 # https://github.com/psycopg/psycopg2
{%- else %}
{%- elif cookiecutter.use_postgresql == 'y' %}
psycopg2-binary==2.9.5 # https://github.com/psycopg/psycopg2
{%- endif %}
{%- if cookiecutter.use_async == 'y' or cookiecutter.use_celery == 'y' %}