Skip to content

Conversation

@metemaad
Copy link

No description provided.

- Update sqlparse from ==0.2.4 to >=0.4.4 (security fix)
- Remove upper version bounds on pymongo (was <=3.11.4)
- Remove upper version bounds on django (was <=3.1.12)
- Update Python requirement to >=3.8
- Add classifiers for Python 3.8-3.12 and Django 3.2-5.1

This allows djongo to work with modern Django and PyMongo versions.

Co-Authored-By: MahYA <[email protected]>
Replace deprecated collection_names() with list_collection_names()
which is available in PyMongo 3.7+ and required for PyMongo 4.x.

Co-Authored-By: MahYA <[email protected]>
operations.py:
- Update sql_flush() signature for Django 4.1+ compatibility
- Add **kwargs to absorb new parameters like 'sequences'

features.py:
- Add supports_json_field for Django 3.1+
- Add Django 4.0+ feature flags (expression_defaults, check_constraints, etc.)
- Add Django 4.1+ feature flags (comments support)

Co-Authored-By: MahYA <[email protected]>
New version includes:
- Django 4.x/5.x compatibility
- PyMongo 4.x compatibility
- Security fix for sqlparse dependency

Co-Authored-By: MahYA <[email protected]>
sqlparse 0.5.x changed how certain SQL keywords are tokenized:
- 'ORDER BY' is now a single token instead of separate 'ORDER' and 'BY'
- 'GROUP BY' is now a single token instead of separate 'GROUP' and 'BY'
- 'VALUES (...)' is now wrapped in a Values token

Changes:
- query.py: Import Values token, update SelectQuery.parse() to handle
  both 'ORDER' and 'ORDER BY' keywords, add _process_values_parenthesis
  helper method
- converters.py: Update OrderConverter and GroupbyConverter to handle
  both old and new sqlparse token formats

Co-Authored-By: MahYA <[email protected]>
Add explicit package configuration to prevent setuptools from
auto-discovering tmp/ and docs/ as packages, which caused
installation failures.

Co-Authored-By: MahYA <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants