Skip to content

Conversation

JordanHyatt
Copy link
Contributor

@JordanHyatt JordanHyatt commented Sep 16, 2024

Adds support for HistoricOneToOneField

Description

Implemented the solution proposed by @quadracik in issue #1031

Related Issue

This PR addresses issue #1031 and #1389

Motivation and Context

How Has This Been Tested?

Appropriate unit tests have been written and follow the ones written for HistoricForeignKey

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have run the pre-commit run command to format and lint.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • I have added my name and/or github handle to AUTHORS.rst
  • I have added my change to CHANGES.rst
  • All new and existing tests passed.

This was referenced Sep 16, 2024
@erry-whiskypartners
Copy link

Hi, is this going to be merged and if so when please

@JordanHyatt
Copy link
Contributor Author

Hi, is this going to be merged and if so when please

Waiting for maintainers to review!

Copy link
Member

@tim-schilling tim-schilling left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you again Jordan! There are some documentation changes I think we should make and a few more I have questions about.

@tim-schilling
Copy link
Member

JordanHyatt and others added 2 commits November 19, 2024 18:14
- Added suggested doc string to HistoricOneToOneField

- Updated test doc strings
@JordanHyatt
Copy link
Contributor Author

Ok, I made the requested changes, let me know if I missed/messed something up!

@JordanHyatt
Copy link
Contributor Author

I had to update language_version: python3.11 in the .pre-commit-config.yaml because it was failing to find a python3.8 interpreter

Copy link
Member

@tim-schilling tim-schilling left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made some last clean-up tweaks. When CI passes, I'll merge. Thank you for the PR!

@JordanHyatt
Copy link
Contributor Author

I made some last clean-up tweaks. When CI passes, I'll merge. Thank you for the PR!

Sounds Good! I think we also need to give quadracik credit. It was his solution from issue #1031 that I mostly borrowed from.

@tim-schilling
Copy link
Member

I'll give it a go, no promises that it'll work because I don't have their email address. Sorry @quadracik if it doesn't work 🤞

@tim-schilling tim-schilling merged commit 4325591 into django-commons:master Nov 20, 2024
17 checks passed
@tim-schilling
Copy link
Member

It worked! 🎉

@JordanHyatt JordanHyatt deleted the historic-one-to-one branch November 20, 2024 19:37
@quadracik
Copy link
Contributor

Thanks guys! I really appreciate it.

acrawford13 pushed a commit to guestready/django-simple-history that referenced this pull request Aug 28, 2025
* Implemented HistoricOneToOneField with unit tests

* Updated AUTHORS.rst

* Added HistoricOneToOneFiled to querying_history.rst

* removed call to field cache

* - created HistoricDescriptorMixin to DRY out get_queryset method

- Added suggested doc string to HistoricOneToOneField

* Switch to lowest supported python version for pre-commit black


---------

Co-authored-by: quadracik <[email protected]>
Co-authored-by: David Diamant <[email protected]>
Co-authored-by: Tim Schilling <[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.

5 participants