Skip to content

Add support for Django 4.1 and Python 3.11 - tox #24

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

Merged
merged 7 commits into from
Jan 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 12 additions & 20 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,38 +18,30 @@ jobs:
matrix:
include:

- name: Python 3.7 / Django 3.2
- name: Python 3.7 / Django 2.2
python_version: "3.7"
tox_env: py37-django32
tox_env: py37-django22

- name: Python 3.8 / Django 3.2
- name: Python 3.8 / Django 3.0
python_version: "3.8"
tox_env: py38-django32

- name: Python 3.9 / Django 2.2
python_version: "3.9"
tox_env: py39-django22

- name: Python 3.9 / Django 3.0
python_version: "3.9"
tox_env: py39-django30
tox_env: py38-django30

- name: Python 3.9 / Django 3.1
python_version: "3.9"
tox_env: py39-django31

- name: Python 3.9 / Django 3.2
python_version: "3.9"
tox_env: py39-django32

- name: Python 3.9 / Django 4.0
python_version: "3.9"
tox_env: py39-django40

- name: Python 3.10 / Django 3.2
python_version: "3.10"
tox_env: py310-django32

- name: Python 3.10 / Django 4.0
python_version: "3.10"
tox_env: py310-django40

- name: Python 3.11 / Django 4.1
python_version: "3.11"
tox_env: py311-django41

- name: Lint
python_version: "3"
tox_env: lint
Expand Down
6 changes: 3 additions & 3 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ Contributors (by alphabetic order)
----------------------------------

* `ewjoachim <https://github.com/ewjoachim>`_
- `@brunobord <https://github.com/brunobord>`_
- `@k4nar <https://github.com/k4nar>`_
- `@zebuline <https://github.com/zebuline>`_
* `@brunobord <https://github.com/brunobord>`_
* `@k4nar <https://github.com/k4nar>`_
* `@zebuline <https://github.com/zebuline>`_
1 change: 1 addition & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ History
1.0.6 (unreleased)
++++++++++++++++++

- Run tests for Django 4.1 and Python 3.11

1.0.5 (2019-04-23)
++++++++++++++++++
Expand Down
23 changes: 7 additions & 16 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@ Django Readonly Field
.. image:: https://img.shields.io/codecov/c/github/peopledoc/django-readonly-field/master.svg
:target: https://codecov.io/github/peopledoc/django-readonly-field?branch=master

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

Requirements
------------

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

Documentation
-------------
Expand Down Expand Up @@ -72,19 +72,19 @@ You might have to write an SQL migration for this.
Running Tests
--------------

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

::

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

Run tests for a specific version

::

(myenv) $ python runtests.py
(myenv) $ pytest


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

$ tox

Using the project
-----------------

Many operations are documented in the Makefile. For more information, use:

::

$ make help


Credits
---------
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
html_static_path = []

# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
Expand Down
29 changes: 0 additions & 29 deletions docs/django_readonly_field.rst

This file was deleted.

7 changes: 0 additions & 7 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,4 @@
Installation
============

At the command line::

$ easy_install django-readonly-field

Or, if you have virtualenvwrapper installed::

$ mkvirtualenv django-readonly-field
$ pip install django-readonly-field
7 changes: 0 additions & 7 deletions docs/modules.rst

This file was deleted.

2 changes: 2 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,13 @@ classifiers =
Framework :: Django :: 3.1
Framework :: Django :: 3.2
Framework :: Django :: 4.0
Framework :: Django :: 4.1
Programming Language :: Python :: 3
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

[options]
zip_safe = True
Expand Down
14 changes: 7 additions & 7 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
[tox]
skipsdist = True
envlist =
py39-django{22,30,31,40}
py{37,38,39,310}-django32,
py37-django22
py38-django30
py39-django31,
py310-django{32,40}
py311-django41,
linters
docs

Expand All @@ -20,25 +22,23 @@ deps =
django31: Django==3.1.*
django32: Django==3.2.*
django40: Django==4.0.*
django41: Django==4.1.*
djangostable: Django
commands =
/usr/bin/find . -name '*.pyc' -delete
python --version
pip freeze -l
pytest

# Dedicated linter tox target
[testenv:lint]
whitelist_externals = make
deps =
# Does not need any other requirement
flake8>=2.1.0
commands =
flake8 django_readonly_field tests

[testenv:docs]
whitelist_externals =
allowlist_externals =
make
commands =
sphinx-apidoc --force --output-dir docs/ django_readonly_field
make -C docs clean html