Skip to content

Commit

Permalink
Merge branch 'release-v0.6.x' into 'release-v0.7.x'
Browse files Browse the repository at this point in the history
# Conflicts:
#	.github/workflows/python-publish.yml
#	.github/workflows/tox.yml
#	morango/__init__.py
#	tests/testapp/tests/compat.py
#	tox.ini
  • Loading branch information
rtibbles committed Dec 12, 2023
2 parents 6e749fb + fb1a67b commit e7a9b76
Show file tree
Hide file tree
Showing 20 changed files with 393 additions and 82 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,13 @@ on:

jobs:
deploy:

runs-on: ubuntu-20.04

runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v3
with:
python-version: 2.7
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/python2-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,11 @@ jobs:
name: Python 2 syntax checking
needs: pre_job
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
container:
image: python:2.7.18-buster
steps:
- uses: actions/checkout@v2
- name: Set up Python 2.7
uses: actions/setup-python@v2
with:
python-version: 2.7
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
127 changes: 99 additions & 28 deletions .github/workflows/tox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,67 +18,134 @@ jobs:
unit_test:
name: Python unit tests
needs: pre_job
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
runs-on: ubuntu-20.04
strategy:
max-parallel: 5
matrix:
python-version: [2.7, 3.6, 3.7, 3.8, 3.9, '3.10', '3.11']
python-version: [3.6, 3.7, 3.8, 3.9, '3.10', '3.11']

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install tox
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
run: |
python -m pip install --upgrade pip
pip install tox
- name: tox env cache
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
uses: actions/cache@v2
with:
path: ${{ github.workspace }}/.tox/py${{ matrix.python-version }}
key: ${{ runner.os }}-tox-py${{ matrix.python-version }}-${{ hashFiles('setup.py', 'requirements/*.txt') }}
- name: Test with tox
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
run: tox -e py${{ matrix.python-version }}
unit_test_deprecated:
name: Python unit tests (deprecated python versions)
needs: pre_job
runs-on: ubuntu-20.04
strategy:
max-parallel: 3
matrix:
python-version: [2.7]
container:
image: python:${{ matrix.python-version }}
steps:
- uses: actions/checkout@v2
- name: Install tox
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
run: |
python -m pip install --upgrade pip
pip install tox
- name: tox env cache
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
uses: actions/cache@v2
with:
path: ${{ github.workspace }}/.tox/py${{ matrix.python-version }}
key: ${{ runner.os }}-tox-py${{ matrix.python-version }}-${{ hashFiles('setup.py', 'requirements/*.txt') }}
- name: Test with tox
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
run: tox -e py${{ matrix.python-version }}
cryptography:
name: Python unit tests + cryptography
needs: pre_job
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
runs-on: ubuntu-20.04
strategy:
max-parallel: 5
matrix:
# only crypto 3.3 seems to work
python-version: [ 2.7, 3.6, 3.7, 3.8, 3.9, '3.10', '3.11' ]
python-version: [ 3.6, 3.7, 3.8, 3.9, '3.10', '3.11' ]
crypto-version: [ 3.3 ]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install system dependencies
run: |
sudo apt-get -y -qq update
sudo apt-get install -y openssl libssl-dev
- name: Install tox
run: |
python -m pip install --upgrade pip
pip install tox
- name: tox env cache
uses: actions/cache@v2
with:
path: ${{ github.workspace }}/.tox/py${{ matrix.python-version }}
key: ${{ runner.os }}-tox-py${{ matrix.python-version }}-crypto${{ matrix.crypto-version }}-${{ hashFiles('setup.py', 'requirements/*.txt') }}
- name: Test with tox
run: tox -e py${{ matrix.python-version }}-cryptography${{ matrix.crypto-version }}
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install system dependencies
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
run: |
sudo apt-get -y -qq update
sudo apt-get install -y openssl libssl-dev
- name: Install tox
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
run: |
python -m pip install --upgrade pip
pip install tox
- name: tox env cache
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
uses: actions/cache@v2
with:
path: ${{ github.workspace }}/.tox/py${{ matrix.python-version }}
key: ${{ runner.os }}-tox-py${{ matrix.python-version }}-crypto${{ matrix.crypto-version }}-${{ hashFiles('setup.py', 'requirements/*.txt') }}
- name: Test with tox
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
run: tox -e py${{ matrix.python-version }}-cryptography${{ matrix.crypto-version }}
cryptography_deprecated:
name: Python unit tests (deprecated python versions) + cryptography
needs: pre_job
runs-on: ubuntu-20.04
strategy:
max-parallel: 3
matrix:
# Packages are no longer available for the distribution that comes with the
# python:3.4 image, so we can't install the necessary dependencies. Eventually,
# this will happen to the others as well.
# EOL: [3.4]
python-version: [2.7]
container:
image: python:${{ matrix.python-version }}
steps:
- uses: actions/checkout@v2
- name: Install system dependencies
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
run: |
apt-get -y -qq update
apt-get install -y openssl libssl-dev
- name: Install tox
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
run: |
python -m pip install --upgrade pip
pip install tox
- name: tox env cache
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
uses: actions/cache@v2
with:
path: ${{ github.workspace }}/.tox/py${{ matrix.python-version }}
key: ${{ runner.os }}-tox-py${{ matrix.python-version }}-crypto3.3-${{ hashFiles('setup.py', 'requirements/*.txt') }}
- name: Test with tox
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
run: tox -e py${{ matrix.python-version }}-cryptography3.3
postgres:
name: Python postgres unit tests
needs: pre_job
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
runs-on: ubuntu-20.04
services:
# Label used to access the service container
Expand All @@ -102,19 +169,23 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9 for Postgres
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install tox
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
run: |
python -m pip install --upgrade pip
pip install tox
- name: tox env cache
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
uses: actions/cache@v2
with:
path: ${{ github.workspace }}/.tox/py${{ matrix.python-version }}
key: ${{ runner.os }}-tox-py${{ matrix.python-version }}-${{ hashFiles('setup.py', 'requirements/*.txt') }}
path: ${{ github.workspace }}/.tox/py3.6
key: ${{ runner.os }}-tox-py3.6-${{ hashFiles('setup.py', 'requirements/*.txt') }}
- name: Test with tox
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
run: tox -e postgres
windows:
name: Python unit tests on Windows Server
Expand All @@ -123,7 +194,7 @@ jobs:
strategy:
max-parallel: 5
matrix:
python-version: [3.9]
python-version: [3.8]

steps:
- uses: actions/checkout@v2
Expand Down
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,16 @@ target/
# celery beat schedule file
celerybeat-schedule

# dotenv
# dotenv, envrc
.env
.envrc

# virtualenv
venv/
ENV/
.venv
Pipfile
.envrc

# Spyder project settings
.spyderproject
Expand All @@ -97,4 +99,4 @@ Pipfile

*.db

.vscode
.vscode
12 changes: 12 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: 2
formats: all
build:
os: ubuntu-22.04
tools:
python: "3.9"
sphinx:
configuration: docs/conf.py
python:
install:
- requirements: requirements/docs.txt
- path: .
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,20 @@

List of the most important changes for each release.

## 0.6.19
- The `cleanupsyncs` management command now only cleans up sync sessions if also inactive for `expiration` amount of time
- Fixes issue accessing index on queryset in `cleanupsyncs` management command

## 0.6.18
- Prevent creation of Deleted and HardDeleted models during deserialization to allow propagation of syncable objects that are recreated after a previous deletion without causing a merge conflict.

## 0.6.17
- Added `client-instance-id`, `server-instance-id`, `sync-filter`, `push` and `pull` arguments to `cleanupsyncs` management command
- Added option for resuming a sync to ignore the `SyncSession`'s existing `process_id`
- Added custom user agent to sync HTTP requests
- Fixed documentation build issues
- Makefile no longer defines shell with explicit path

## 0.6.16
- Added dedicated `client_instance_id` and `server_instance_id` fields to `SyncSession`
- Renamed `client_instance` and `server_instance` fields on `SyncSession` to `client_instance_json` and `server_instance_json` respectively
Expand Down
12 changes: 5 additions & 7 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
from django.utils.encoding import force_text
from django.utils.html import strip_tags

import sphinx_rtd_theme

# If extensions (or modules to document with autodoc) are in another
# directory, add these directories to sys.path here. If the directory is
# relative to the documentation root, use os.path.abspath to make it
Expand Down Expand Up @@ -164,14 +166,10 @@ def process_docstring(app, what, name, obj, options, lines):

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'default'

if not False: # only import and set the theme if we're building docs locally
import sphinx_rtd_theme

html_theme = "sphinx_rtd_theme"
html_theme_path = [".", sphinx_rtd_theme.get_html_theme_path()]
# html_theme = 'default'

html_theme = "sphinx_rtd_theme"
html_theme_path = [".", sphinx_rtd_theme.get_html_theme_path()]

# Approach 2 for custom stylesheet:
# adapted from: http://rackerlabs.github.io/docs-rackspace/tools/rtd-tables.html
Expand Down
Loading

0 comments on commit e7a9b76

Please sign in to comment.