Skip to content

Commit

Permalink
Bump version 3.4.0 w/ Django 5 support
Browse files Browse the repository at this point in the history
  • Loading branch information
nshafer committed Jan 9, 2024
1 parent d04472a commit b0c2c44
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 19 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,15 @@ jobs:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
django:
- "3.2.13"
- "4.0.5"
- "3.2.23"
- "4.2.9"
- "5.0.1"
drf:
- "no"
- "3.13.1"
- "3.14.0"

name: "Python ${{ matrix.python }} - Django ${{ matrix.django }} - DRF ${{ matrix.drf }}"
runs-on: ubuntu-latest
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [3.4.0] - 2024-01-09
- Add support for Django 5.0
- Drop support for Django < 3.2, 4.0, 4.1

## [3.3.7] - 2022-10-18
- [#74]: Fix regression introduced in 3.3.2 that allowed integer lookups even when allow_int_lookups was set to False,
in the specific case that the integer being looked up was equal to or fewer characters than the prefix for the field.
Expand Down Expand Up @@ -270,6 +274,7 @@ with 1.11 and DRF 3.7.3, so we are supporting (and testing) DRF 3.6.4 for Django
### Added
- Initial release

[3.4.0]: https://github.com/nshafer/django-hashid-field/compare/3.3.7...3.4.0
[3.3.7]: https://github.com/nshafer/django-hashid-field/compare/3.3.6...3.3.7
[3.3.6]: https://github.com/nshafer/django-hashid-field/compare/3.3.5...3.3.6
[3.3.5]: https://github.com/nshafer/django-hashid-field/compare/3.3.4...3.3.5
Expand Down
13 changes: 10 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ Requirements

This module is tested and known to work with:

* Python 3.7, 3.8, 3.9, 3.10
* Django 3.2, 4.0
* Python 3.7, 3.8, 3.9, 3.10, 3.11, 3.12
* Django 3.2, 4.2, 5.0
* Hashids 1.3
* Django REST Framework 3.13
* Django REST Framework 3.14

*Please Note*: Python 2.x is at its end of life and is no longer supported.

Expand Down Expand Up @@ -609,6 +609,13 @@ Hashid\*Field. See `HashidSerializerCharField`_ for parameters.
*Please Note*: This field will always serialize to an integer and thus will also de-serialize integers into valid
objects, regardless of the `allow_int_lookup` setting.

Known Issues
============

With Django 5.0, attempting to filter on a field that is a ForeignKey to another model that uses a Hashid*Field as its
primary key will result in an error such as "'Hashid' object is not iterable". The workaround is to specify the exact
field of the related model to filter on. e.g. instead of `list_filter = ['author']` use `list_filter = ['author__name']`.

Development
===========

Expand Down
2 changes: 1 addition & 1 deletion hashid_field/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from .hashid import Hashid

__title__ = 'Django Hashid Field'
__version__ = "3.3.7"
__version__ = "3.4.0"
__author__ = 'Nathan Shafer'
__license__ = 'MIT License'
__copyright__ = 'Copyright 2017-2021 Nathan Shafer'
Expand Down
11 changes: 6 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,16 +88,17 @@ def get_version(package):
# Specify the Python versions you support here. In particular, ensure
# that you indicate whether you support Python 2, Python 3 or both.
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'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',

# Django
'Framework :: Django',
'Framework :: Django :: 1.11',
'Framework :: Django :: 2.1',
'Framework :: Django :: 2.2',
'Framework :: Django :: 3.0',
'Framework :: Django :: 3.2',
'Framework :: Django :: 4.2',
'Framework :: Django :: 5.0',
],

# What does your project relate to?
Expand Down
17 changes: 10 additions & 7 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,17 @@

[tox]
envlist = py37-django32-{rest,norest},
py38-django{32,40}-{rest,norest}
py39-django{32,40}-{rest,norest}
py310-django{32,40}-{rest,norest}
py38-django{32,42}-{rest,norest}
py39-django{32,42}-{rest,norest}
py310-django{32,42,50}-{rest,norest}
py311-django{42,50}-{rest,norest}
py312-django{42,50}-{rest,norest}

[testenv]
commands = python runtests.py
deps =
hashids>=1.3.
django32: Django==3.2.13
django40: Django==4.0.5
rest: djangorestframework==3.13.1
hashids>=1.3.1
django32: Django==3.2.23
django42: Django==4.2.9
django50: Django==5.0.1
rest: djangorestframework==3.14.0

0 comments on commit b0c2c44

Please sign in to comment.