Skip to content

Commit 889f779

Browse files
committed
Merge remote-tracking branch 'upstream/release-v0.8.x' into merge-up
2 parents 75ec835 + 0d8fe8f commit 889f779

17 files changed

Lines changed: 95 additions & 61 deletions

File tree

.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ insert_final_newline = true
1010
charset = utf-8
1111
end_of_line = lf
1212

13+
[*.{yaml,yml}]
14+
indent_size = 2
15+
1316
[*.bat]
1417
indent_style = tab
1518
end_of_line = crlf

.github/workflows/tox.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
strategy:
2121
max-parallel: 5
2222
matrix:
23-
python-version: [3.9, '3.10', '3.11', '3.12', '3.13']
23+
python-version: [3.9, '3.10', '3.11', '3.12', '3.13', '3.14']
2424
steps:
2525
- uses: actions/checkout@v6
2626
- name: Set up Python ${{ matrix.python-version }}
@@ -77,7 +77,7 @@ jobs:
7777
strategy:
7878
max-parallel: 5
7979
matrix:
80-
python-version: [3.9, '3.10', '3.11', '3.12', '3.13']
80+
python-version: [3.9, '3.10', '3.11', '3.12', '3.13', '3.14']
8181
steps:
8282
- uses: actions/checkout@v6
8383
- name: Set up Python ${{ matrix.python-version }}

.pre-commit-config.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ repos:
99
- id: debug-statements
1010
- id: end-of-file-fixer
1111
exclude: '^.+?\.json$'
12+
- repo: https://github.com/PyCQA/flake8
13+
rev: 7.1.2
14+
hooks:
15+
- id: flake8
16+
additional_dependencies: ['flake8-print==5.0.0']
1217
- repo: https://github.com/asottile/reorder_python_imports
1318
rev: v1.4.0
1419
hooks:

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
List of the most important changes for each release.
44

5+
## 0.8.9
6+
- Removes debugging print statements
7+
- Adds flake8 linting
8+
9+
## 0.8.8
10+
- Adds support for Python 3.14
11+
512
## 0.8.7
613
- Adds flexibility for customizing deserialization behavior using sync filter to `SyncableModel` methods
714

morango/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.8.7"
1+
__version__ = "0.8.9"

morango/models/core.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -483,8 +483,6 @@ def _deserialize_store_model(self, fk_cache, defer_fks=False, sync_filter=None):
483483
klass_model.syncing_objects.filter(id=self.id).delete()
484484
return None, deferred_fks
485485
else:
486-
if sync_filter:
487-
print("Has filter", sync_filter)
488486
# load model into memory
489487
app_model = klass_model.deserialize(json.loads(self.serialized), sync_filter=sync_filter)
490488
app_model._morango_source_id = self.source_id

morango/sync/operations.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,6 @@ def _deserialize_from_store(profile, skip_erroring=False, filter=None):
262262
lambda x, y: x | y,
263263
[Q(partition__startswith=prefix) for prefix in filter],
264264
)
265-
print("prefix_condition: ", prefix_condition)
266265
store_models = store_models.filter(prefix_condition)
267266

268267
# if requested, skip any records that previously errored, to be faster

requirements/test.txt

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
# These are for testing
2-
factory-boy==2.7.0
3-
fake-factory==0.5.7
4-
mock==2.0.0
5-
pytest==6.2.5
2+
factory-boy>=3.0,<4
3+
mock>=4.0,<6
4+
pytest>=6.2.5,<8
65
pytest-django==4.5.2
7-
more-itertools<=8.10.0
8-
typing
6+
more-itertools<=10.0.0

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
'Programming Language :: Python :: 3.11',
4949
'Programming Language :: Python :: 3.12',
5050
'Programming Language :: Python :: 3.13',
51+
'Programming Language :: Python :: 3.14',
5152
],
52-
python_requires=">=3.6, <3.14",
53+
python_requires=">=3.6, <3.15",
5354
)

tests/testapp/tests/compat.py

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,21 @@
1-
try:
2-
# In the Python EOL GH workflows, we have to install backported version
3-
# as the Docker container images we use does not have the test module installed.
4-
from backports.test.support import EnvironmentVarGuard # noqa F401
5-
except ImportError:
6-
try:
7-
# For python >3.8 and <3.10
8-
from test.support import EnvironmentVarGuard # noqa F401
9-
except ImportError:
10-
# In Python 3.10, this has been moved to test.support.os_helper
11-
from test.support.os_helper import EnvironmentVarGuard # noqa F401
1+
import os
2+
from unittest.mock import patch as _patch
3+
4+
5+
class EnvironmentVarGuard:
6+
"""
7+
Vendored replacement for the removed test.support EnvironmentVarGuard.
8+
Uses unittest.mock.patch.dict(os.environ) under the hood.
9+
Supports the context-manager-with-dict-assignment pattern:
10+
with EnvironmentVarGuard() as env: env[k] = v
11+
"""
12+
13+
def __init__(self):
14+
self._patcher = _patch.dict(os.environ)
15+
16+
def __enter__(self):
17+
self._patcher.start()
18+
return os.environ
19+
20+
def __exit__(self, *args):
21+
self._patcher.stop()

0 commit comments

Comments
 (0)