fix: foreign keys accept self-referential and circular foreign keys #1750
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Foreign keys are implemented by building a lookup for the referenced resources. This lookup creation opens and closes the resource, which should therefore be a copy to not interfere with other processes manipulating the resource.
Unit tests for explicit and implicit self-referencing, and circular foreign keys have been added.
CI debug session
hatch --env ci.py3.11 shell
reproduces the test failLooks like a message previously echoed to stdout is now outputed to stderr.
Behavior observed with click 8.2.1 and typer 0.16.0
Default environment (no test fail) has click 8.1.8 and typer 0.15.2
Click 8.2 has removed support for py3.8 and py3.9 which would explain that the tests still pass in ci.3.{8,9} environments.
Ok, here is the breaking change of click 8.2 : pallets/click#2522