Sync Fork from Base#1
Merged
jacobxfrancis merged 736 commits intoMay 15, 2026
Merged
Conversation
Improve tests organization by grouping tests for a given feature together.
The correct key to specify the package to pip install is `path`, not `package`. https://docs.readthedocs.io/en/stable/config-file/v2.html#packages
Reviewed-by: Raphaël Barrois
Reviewed-by: Raphaël Barrois
The requirements file duplicate the `setup.py` instruction since 6f37f9b. - `requirements_dev.txt` has been removed in 66a24ae. - `requirements.txt` has been removed in 7a23a28. - `requirements_docs.txt` has been removed in a0d2e24. The requirements file remaining are `graft`-ed with the examples. Reviewed-by: Raphaël Barrois
Centralize configuration in one place for easier maintenance. Reviewed-by: Raphaël Barrois
Reviewed-by: Raphaël Barrois
The LIST_SIZE constant is not useful, randint already returns an integer in the given range. Additionally, there was an off-by one index as randint bounds are inclusive, causing an IndexError when randint returned 5. Thanks @loren-jiang for the report! Closes #741.
https://timothycrosley.github.io/isort/docs/major_releases/introducing_isort_5/ The `--recursive` option is now the default behavior. Linting failed with error: ``` ERROR: /home/travis/build/FactoryBoy/factory_boy/examples/flask_alchemy/demoapp_factories.py Imports are incorrectly sorted and/or formatted. --- /home/travis/build/FactoryBoy/factory_boy/examples/flask_alchemy/demoapp_factories.py:before 2020-07-31 07:14:11.953212 +++ /home/travis/build/FactoryBoy/factory_boy/examples/flask_alchemy/demoapp_factories.py:after 2020-07-31 07:14:42.688270 @@ -1,4 +1,5 @@ import demoapp + import factory.alchemy import factory.fuzzy ```
Do not break import paths for users doing:
```python
import factory
class MyFactory(factory.django.DjangoModelFactory):
# ...
```
Although it would be cleaner not to import the package at all, users are
relying on these import paths. Without a concrete issue to solve, avoid
breaking the import paths.
Reviewed-by: Raphaël Barrois
Some users have expected the `django_get_or_create` feature to update a model after retrieving it from the database, but this is not the intended behaviour. Add docs to make this explicit. See #483 for discussion on the feature.
ChangeLog is ReStructuredText, not Markdown.
The `django` module is no longer imported by `factory.__init__`. Importing `factory.django` makes it obvious Django is required. Django not being installed can raise an `ImportError`.
Helps users identify breaking changes and the recommended import. Also, fix a couple formatting issues with the changelog.
Before this change, calling `factory.SubFactory(UserModel)` would raise an unexpected error, `Options object has no attribute 'pre_declarations'`. That message isn't very helpful; instead, a `AssociatedClassError` will be raised, pointing at both the calling factory and called model. This change also introduces a module for collecting tests related to the developer experience: error messages, debugging, etc. Closes #561.
Most of those warnings are no longer an issue with current dependency versions.
factory_boy never interacts with the database directly; all access is mediated through mature ORMs (Django, SQLAlchemy). Any difference in behaviour regarding the databases would have to be handled by those ORMs, not on our level. This reduces the size of the test matrix, and simplifies the test setup code. See: #1077
Upstream support has been dropped in April 2024.
And fix related missing references. Closes: #929
I noticed that we're not ensuring the docs build under `3.12`, plus `24.04` will be released later this month (although may take RTD a bit longer to pull it in). Looking at [the docs](https://docs.readthedocs.io/en/stable/config-file/v2.html), there's a `latest` variant for both. It comes with a warning that using latest may unexpectedly break builds if the project isn't compatible... But I think for our use case the odds that it will break are extremely low (and in fact we'd want to know it's broken so we could fix it!) Plus if it starts breaking, it's not hard to temp pin it to an older version. So all-in-all, both lower maintenance and faster realization of breakage if we default to latest on both of these.
Use the more documented ".readthedocs.yaml" file. Fix missing "sphinx.configuration" option.
No longer supported upstream.
Use `pip_pre: true` instead of downloading the sources.
Thanks to Antoliny Lee for spotting this.
Although we don't run tests for those, we would fix any bug discovered on those versions. Fixes: #1093
As caught in #1103, we didn't export the file, as required by PEP 561.
Bumps the github_actions group with 2 updates in the / directory: [actions/checkout](https://github.com/actions/checkout) and [actions/setup-python](https://github.com/actions/setup-python). Updates `actions/checkout` from 4 to 5 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@v4...v5) Updates `actions/setup-python` from 5 to 6 - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](actions/setup-python@v5...v6) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major dependency-group: github_actions - dependency-name: actions/setup-python dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major dependency-group: github_actions ... Signed-off-by: dependabot[bot] <support@github.com>
905cdb8
into
roverdotcom:DEV-142965-update-factory-boy
8 of 10 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Sync