Skip to content

Commit 36997cb

Browse files
authored
Merge pull request #24 from ewjoachim/patch-1
Add support for Django 4.1 and Python 3.11 - tox
2 parents 8e1d396 + e5ca430 commit 36997cb

File tree

10 files changed

+33
-90
lines changed

10 files changed

+33
-90
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -18,38 +18,30 @@ jobs:
1818
matrix:
1919
include:
2020

21-
- name: Python 3.7 / Django 3.2
21+
- name: Python 3.7 / Django 2.2
2222
python_version: "3.7"
23-
tox_env: py37-django32
23+
tox_env: py37-django22
2424

25-
- name: Python 3.8 / Django 3.2
25+
- name: Python 3.8 / Django 3.0
2626
python_version: "3.8"
27-
tox_env: py38-django32
28-
29-
- name: Python 3.9 / Django 2.2
30-
python_version: "3.9"
31-
tox_env: py39-django22
32-
33-
- name: Python 3.9 / Django 3.0
34-
python_version: "3.9"
35-
tox_env: py39-django30
27+
tox_env: py38-django30
3628

3729
- name: Python 3.9 / Django 3.1
3830
python_version: "3.9"
3931
tox_env: py39-django31
4032

41-
- name: Python 3.9 / Django 3.2
42-
python_version: "3.9"
43-
tox_env: py39-django32
44-
45-
- name: Python 3.9 / Django 4.0
46-
python_version: "3.9"
47-
tox_env: py39-django40
48-
4933
- name: Python 3.10 / Django 3.2
5034
python_version: "3.10"
5135
tox_env: py310-django32
5236

37+
- name: Python 3.10 / Django 4.0
38+
python_version: "3.10"
39+
tox_env: py310-django40
40+
41+
- name: Python 3.11 / Django 4.1
42+
python_version: "3.11"
43+
tox_env: py311-django41
44+
5345
- name: Lint
5446
python_version: "3"
5547
tox_env: lint

AUTHORS.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ Contributors (by alphabetic order)
66
----------------------------------
77

88
* `ewjoachim <https://github.com/ewjoachim>`_
9-
- `@brunobord <https://github.com/brunobord>`_
10-
- `@k4nar <https://github.com/k4nar>`_
11-
- `@zebuline <https://github.com/zebuline>`_
9+
* `@brunobord <https://github.com/brunobord>`_
10+
* `@k4nar <https://github.com/k4nar>`_
11+
* `@zebuline <https://github.com/zebuline>`_

HISTORY.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ History
66
1.0.6 (unreleased)
77
++++++++++++++++++
88

9+
- Run tests for Django 4.1 and Python 3.11
910

1011
1.0.5 (2019-04-23)
1112
++++++++++++++++++

README.rst

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,16 @@ Django Readonly Field
1111
.. image:: https://img.shields.io/codecov/c/github/peopledoc/django-readonly-field/master.svg
1212
:target: https://codecov.io/github/peopledoc/django-readonly-field?branch=master
1313

14-
Make Django model fields readonly. In other words, make it so that Django will
15-
read from your fields in your database, but never try to write them. It can be
14+
Make some Django model fields readonly. In other words, it lets you tell Django to
15+
read some fields from your database, but never try to write those back. It can be
1616
useful if your fields are populated by triggers or something.
1717

1818
Requirements
1919
------------
2020

2121
+ **Postgresql only**
22-
+ Django, obviously. v1.11+ (until proven otherwise)
23-
+ Running under Python 2.7 or 3.5+
22+
+ Django, tested from 2.2 to 4.1
23+
+ With Python, tested from 3.7 to 3.11
2424

2525
Documentation
2626
-------------
@@ -72,19 +72,19 @@ You might have to write an SQL migration for this.
7272
Running Tests
7373
--------------
7474

75-
You will need an usable Postgresql database in ordre to test the project.
75+
You will need a usable Postgresql database in order to test the project.
7676

7777
::
7878

7979
source <YOURVIRTUALENV>/bin/activate
8080
export DATABASE_URL=postgres://USER:PASSWORD@HOST:PORT/NAME
81-
(myenv) $ pip install -r requirements_test.txt
81+
(myenv) $ pip install -r requirements.txt
8282

8383
Run tests for a specific version
8484

8585
::
8686

87-
(myenv) $ python runtests.py
87+
(myenv) $ pytest
8888

8989

9090
Run tests for all versions (if tox is installed globally, you don't need a
@@ -94,15 +94,6 @@ virtual environment)
9494

9595
$ tox
9696

97-
Using the project
98-
-----------------
99-
100-
Many operations are documented in the Makefile. For more information, use:
101-
102-
::
103-
104-
$ make help
105-
10697

10798
Credits
10899
---------

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@
129129
# Add any paths that contain custom static files (such as style sheets) here,
130130
# relative to this directory. They are copied after the builtin static files,
131131
# so a file named "default.css" will overwrite the builtin "default.css".
132-
html_static_path = ['_static']
132+
html_static_path = []
133133

134134
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
135135
# using the given strftime format.

docs/django_readonly_field.rst

Lines changed: 0 additions & 29 deletions
This file was deleted.

docs/installation.rst

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,4 @@
22
Installation
33
============
44

5-
At the command line::
6-
7-
$ easy_install django-readonly-field
8-
9-
Or, if you have virtualenvwrapper installed::
10-
11-
$ mkvirtualenv django-readonly-field
125
$ pip install django-readonly-field

docs/modules.rst

Lines changed: 0 additions & 7 deletions
This file was deleted.

setup.cfg

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,13 @@ classifiers =
1717
Framework :: Django :: 3.1
1818
Framework :: Django :: 3.2
1919
Framework :: Django :: 4.0
20+
Framework :: Django :: 4.1
2021
Programming Language :: Python :: 3
2122
Programming Language :: Python :: 3.7
2223
Programming Language :: Python :: 3.8
2324
Programming Language :: Python :: 3.9
2425
Programming Language :: Python :: 3.10
26+
Programming Language :: Python :: 3.11
2527

2628
[options]
2729
zip_safe = True

tox.ini

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
[tox]
2-
skipsdist = True
32
envlist =
4-
py39-django{22,30,31,40}
5-
py{37,38,39,310}-django32,
3+
py37-django22
4+
py38-django30
5+
py39-django31,
6+
py310-django{32,40}
7+
py311-django41,
68
linters
79
docs
810

@@ -20,25 +22,23 @@ deps =
2022
django31: Django==3.1.*
2123
django32: Django==3.2.*
2224
django40: Django==4.0.*
25+
django41: Django==4.1.*
2326
djangostable: Django
2427
commands =
25-
/usr/bin/find . -name '*.pyc' -delete
2628
python --version
2729
pip freeze -l
2830
pytest
2931

3032
# Dedicated linter tox target
3133
[testenv:lint]
32-
whitelist_externals = make
3334
deps =
3435
# Does not need any other requirement
3536
flake8>=2.1.0
3637
commands =
3738
flake8 django_readonly_field tests
3839

3940
[testenv:docs]
40-
whitelist_externals =
41+
allowlist_externals =
4142
make
4243
commands =
43-
sphinx-apidoc --force --output-dir docs/ django_readonly_field
4444
make -C docs clean html

0 commit comments

Comments
 (0)