Skip to content

Commit d27cbc4

Browse files
authored
Merge pull request #295 from bjester/merge-up
Merge up release-v0.8.x
2 parents 75ec835 + 9df9d5a commit d27cbc4

18 files changed

Lines changed: 102 additions & 64 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

morango/sync/stream/serialize.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
from django.core.serializers.json import DjangoJSONEncoder
1111
from django.db.models import Q
12-
from typing_extensions import Literal
1312

1413
from morango.models.certificates import Filter
1514
from morango.models.core import DatabaseMaxCounter
@@ -71,8 +70,14 @@ def __init__(
7170
profile: str,
7271
sync_filter: Optional[Filter] = None,
7372
dirty_only: bool = True,
74-
partition_order: Literal["asc", "desc"] = "asc",
73+
partition_order: str = "asc",
7574
):
75+
"""
76+
:param profile: The Morango model profile
77+
:param sync_filter: The Filter object for this sync
78+
:param dirty_only: Whether to filter on dirty records only
79+
:param partition_order: Controls how the filter specificity is applied, "asc" or "desc"
80+
"""
7681
self.profile = profile
7782
self.sync_filter = sync_filter
7883
self.dirty_only = dirty_only

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 & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
"djangorestframework>3.10",
3030
"django-ipware==4.0.2",
3131
"requests",
32-
"typing-extensions==4.1.1",
3332
"ifcfg",
3433
],
3534
license="MIT",
@@ -48,6 +47,7 @@
4847
'Programming Language :: Python :: 3.11',
4948
'Programming Language :: Python :: 3.12',
5049
'Programming Language :: Python :: 3.13',
50+
'Programming Language :: Python :: 3.14',
5151
],
52-
python_requires=">=3.6, <3.14",
52+
python_requires=">=3.6, <3.15",
5353
)

0 commit comments

Comments
 (0)