1797 Commits

Author SHA1 Message Date
Timothée Mazzucotelli
9003ceb4b0
Merge branch 'master' into python-311 2021-12-21 09:17:53 +01:00
Timothée Mazzucotelli
734d14852b Update tests/test_jinja2_extensions.py
Co-authored-by: Jairo Llopis <Yajo@users.noreply.github.com>
2021-12-20 14:50:20 +00:00
Timothée Mazzucotelli
407471a2c2 docs: Document _copier_conf.json() removal in changelog 2021-12-20 14:50:20 +00:00
Timothée Mazzucotelli
0e5654660a tests: Add test for the patched to_json filter 2021-12-20 14:50:20 +00:00
Timothée Mazzucotelli
77e3e53c4b refactor: Remove json method from Copier conf 2021-12-20 14:50:20 +00:00
Timothée Mazzucotelli
64732d2c68 Update copier/main.py
Co-authored-by: Jairo Llopis <Yajo@users.noreply.github.com>
2021-12-20 14:50:20 +00:00
Timothée Mazzucotelli
fc36f5af41 style: Lint 2021-12-20 14:50:20 +00:00
Timothée Mazzucotelli
0a118ec783 feat: Make the to_json filter support the conf object
Fixes issue #389
2021-12-20 14:50:20 +00:00
dependabot[bot]
55e527ceb7 build(deps): bump mkdocs-material from 8.1.2 to 8.1.3
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 8.1.2 to 8.1.3.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/8.1.2...8.1.3)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-20 14:48:38 +00:00
Timothée Mazzucotelli
a169e5f50b docs: Update changelog (dropped Python 3.6 support) 2021-12-17 22:23:12 +01:00
Timothée Mazzucotelli
3425db5b96 tests: Use datetime.fromisoformat 2021-12-17 22:22:37 +01:00
Timothée Mazzucotelli
669fc69cf5 refactor: Use ChainMap 2021-12-17 22:14:46 +01:00
Timothée Mazzucotelli
6f1ba70a74 ci: Allow failure on Python 3.11 2021-12-17 21:59:19 +01:00
Timothée Mazzucotelli
0773fcef5c build: Drop support for Python 3.6 2021-12-17 21:59:19 +01:00
Timothée Mazzucotelli
fa8f76bcbd chore: Update lock file 2021-12-17 21:59:19 +01:00
Timothée Mazzucotelli
b9f04ff073 build: Set upper Python bound to 4.0 2021-12-17 21:51:39 +01:00
Timothée Mazzucotelli
6fb05eda6d build: Accept Python 3.11 as requirement 2021-12-17 21:16:26 +01:00
dependabot[bot]
c70ea4cb04 build(deps): bump mkdocs-material from 8.1.1 to 8.1.2
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 8.1.1 to 8.1.2.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/8.1.1...8.1.2)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-15 16:45:56 +00:00
dependabot[bot]
963bfa59de build(deps): bump mkdocs-material from 8.1.0 to 8.1.1
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 8.1.0 to 8.1.1.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/8.1.0...8.1.1)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-14 12:49:50 +00:00
dependabot[bot]
b24d81ac64 build(deps): bump mkdocs-material from 8.0.5 to 8.1.0
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 8.0.5 to 8.1.0.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/8.0.5...8.1.0)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-10 20:44:16 +00:00
Yajo
5db76d1df8 test: make sure copier won't delete a preexisting folder
This was already happening, but the test is now more complete.

Fix #https://github.com/copier-org/copier/issues/262 by just asserting it was fixed already.
2021-12-10 20:37:05 +00:00
dependabot[bot]
7353699946 build(deps-dev): bump pytest-xdist from 2.4.0 to 2.5.0
Bumps [pytest-xdist](https://github.com/pytest-dev/pytest-xdist) from 2.4.0 to 2.5.0.
- [Release notes](https://github.com/pytest-dev/pytest-xdist/releases)
- [Changelog](https://github.com/pytest-dev/pytest-xdist/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest-xdist/compare/v2.4.0...v2.5.0)

---
updated-dependencies:
- dependency-name: pytest-xdist
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-10 20:22:32 +00:00
dependabot[bot]
e037a3c331 build(deps): bump mkdocs-material from 8.0.4 to 8.0.5
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 8.0.4 to 8.0.5.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/8.0.4...8.0.5)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-07 15:32:47 +00:00
dependabot[bot]
8e7d8c788e build(deps): bump mkdocs-material from 8.0.3 to 8.0.4
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 8.0.3 to 8.0.4.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/8.0.3...8.0.4)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-06 14:48:13 +00:00
dependabot[bot]
1b655e631f build(deps-dev): bump black from 21.11b1 to 21.12b0
Bumps [black](https://github.com/psf/black) from 21.11b1 to 21.12b0.
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
- [Commits](https://github.com/psf/black/commits)

---
updated-dependencies:
- dependency-name: black
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-06 14:47:49 +00:00
dependabot[bot]
4a64bde979 build(deps-dev): bump flake8-bugbear from 21.11.28 to 21.11.29
Bumps [flake8-bugbear](https://github.com/PyCQA/flake8-bugbear) from 21.11.28 to 21.11.29.
- [Release notes](https://github.com/PyCQA/flake8-bugbear/releases)
- [Commits](https://github.com/PyCQA/flake8-bugbear/compare/21.11.28...21.11.29)

---
updated-dependencies:
- dependency-name: flake8-bugbear
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-03 13:50:14 +00:00
dependabot[bot]
bd9c93ab0e build(deps-dev): bump pre-commit from 2.15.0 to 2.16.0
Bumps [pre-commit](https://github.com/pre-commit/pre-commit) from 2.15.0 to 2.16.0.
- [Release notes](https://github.com/pre-commit/pre-commit/releases)
- [Changelog](https://github.com/pre-commit/pre-commit/blob/master/CHANGELOG.md)
- [Commits](https://github.com/pre-commit/pre-commit/compare/v2.15.0...v2.16.0)

---
updated-dependencies:
- dependency-name: pre-commit
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-03 09:26:06 +00:00
dependabot[bot]
ac0b0f1fe4 build(deps): bump mkdocs-material from 8.0.1 to 8.0.3
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 8.0.1 to 8.0.3.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/8.0.1...8.0.3)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-03 09:12:11 +00:00
dependabot[bot]
cd0b9f364d build(deps): bump actions/cache from 2.1.6 to 2.1.7
Bumps [actions/cache](https://github.com/actions/cache) from 2.1.6 to 2.1.7.
- [Release notes](https://github.com/actions/cache/releases)
- [Commits](https://github.com/actions/cache/compare/v2.1.6...v2.1.7)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-02 18:59:03 +00:00
Yajo
eb1425e5fc test: fix outdated prettier hook 2021-12-02 07:59:23 +00:00
dependabot[bot]
78d17c2c15 build(deps): bump mkdocs-material from 7.3.6 to 8.0.1
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 7.3.6 to 8.0.1.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Upgrade guide](https://github.com/squidfunk/mkdocs-material/blob/master/docs/upgrade.md)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/7.3.6...8.0.1)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-29 15:20:52 +00:00
dependabot[bot]
3a1e5c19b2 build(deps-dev): bump flake8-bugbear from 21.9.2 to 21.11.28
Bumps [flake8-bugbear](https://github.com/PyCQA/flake8-bugbear) from 21.9.2 to 21.11.28.
- [Release notes](https://github.com/PyCQA/flake8-bugbear/releases)
- [Commits](https://github.com/PyCQA/flake8-bugbear/compare/21.9.2...21.11.28)

---
updated-dependencies:
- dependency-name: flake8-bugbear
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-29 14:58:14 +00:00
dependabot[bot]
95dd89880d build(deps): bump plumbum from 1.7.0 to 1.7.1
Bumps [plumbum](https://github.com/tomerfiliba/plumbum) from 1.7.0 to 1.7.1.
- [Release notes](https://github.com/tomerfiliba/plumbum/releases)
- [Changelog](https://github.com/tomerfiliba/plumbum/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/tomerfiliba/plumbum/compare/v1.7.0...v1.7.1)

---
updated-dependencies:
- dependency-name: plumbum
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-24 12:37:33 +00:00
Jacob Straszynski
126a7460b5
feat: allow overriden defaults in questionnaire (#477)
* allow overriden defaults in questionnaire

This works in conjunction with https://github.com/copier-org/copier/pull/476.
If partial answers are written out to a file, they can be re-loaded as
default overrides to whatever is specified in the template allowing one
to resume progress.

* fix failing test
2021-11-20 17:36:16 +00:00
Carlos Meza
96b80db992 chore(pkg): update urls 2021-11-20 13:57:27 +00:00
Carlos Meza
32891e5bfc chore(pkg): update classifiers 2021-11-20 13:57:27 +00:00
dependabot[bot]
0041fa5159 build(deps): bump packaging from 21.2 to 21.3
Bumps [packaging](https://github.com/pypa/packaging) from 21.2 to 21.3.
- [Release notes](https://github.com/pypa/packaging/releases)
- [Changelog](https://github.com/pypa/packaging/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pypa/packaging/compare/21.2...21.3)

---
updated-dependencies:
- dependency-name: packaging
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-19 16:53:40 +00:00
dependabot[bot]
397b6036c0 build(deps-dev): bump black from 21.10b0 to 21.11b1
Bumps [black](https://github.com/psf/black) from 21.10b0 to 21.11b1.
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
- [Commits](https://github.com/psf/black/commits)

---
updated-dependencies:
- dependency-name: black
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-19 16:53:27 +00:00
Jacob Straszynski
600ebdb492
feat: raise CopierAnswersInterrupt on partial answers (#476)
* includes a unit-y test in it's own file, tests/test_interrupts.
* includes an integration test that verifies that we don't dump
  a stacktrace. E.g. this test will fail if CopierAnswersInterrupt no
  longer subclasses KeyboardInterrupt.
* update changelog with CopierAnswersInterrupt
2021-11-15 13:29:57 +00:00
dependabot[bot]
b659b748bb build(deps-dev): bump poethepoet from 0.10.0 to 0.11.0
Bumps [poethepoet](https://github.com/nat-n/poethepoet) from 0.10.0 to 0.11.0.
- [Release notes](https://github.com/nat-n/poethepoet/releases)
- [Commits](https://github.com/nat-n/poethepoet/compare/v0.10.0...v0.11.0)

---
updated-dependencies:
- dependency-name: poethepoet
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-15 13:26:29 +00:00
Jacob Straszynski
fefc5921f9
fix: relax git semver parsing (#475)
* relax git semver parsing

Fixes:
```
git version
git version 2.24.3 (Apple Git-128)

Version("git version 2.24.3 (Apple Git-128)".split()[-1].replace(".windows", "+windows"))

raise InvalidVersion(f"Invalid version: '{version}'")
packaging.version.InvalidVersion: Invalid version: 'Git-128)
```

* Update copier/vcs.py

Co-authored-by: Jairo Llopis <Yajo@users.noreply.github.com>

Co-authored-by: Jairo Llopis <Yajo@users.noreply.github.com>
2021-11-13 23:20:38 +00:00
dependabot[bot]
9f05fdf77d build(deps): bump jinja2 from 3.0.2 to 3.0.3
Bumps [jinja2](https://github.com/pallets/jinja) from 3.0.2 to 3.0.3.
- [Release notes](https://github.com/pallets/jinja/releases)
- [Changelog](https://github.com/pallets/jinja/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/jinja/compare/3.0.2...3.0.3)

---
updated-dependencies:
- dependency-name: jinja2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-10 13:20:57 +00:00
Jairo Llopis
3fd8226649 perf(clone): clone faster without blobs
When git 2.27 or newer is installed, we can add `--filter=blob:none` to avoid getting useless information from the git server. This makes clone much faster if your template has a big history.

Close https://github.com/copier-org/copier/issues/450 (it does not exactly fix it, but maybe makes it irrelevant).
2021-11-02 19:17:56 +00:00
Jairo Llopis
080e3f645e test(migrations): add test for new PEP 440 environment variables in migrations
In 745a4904152058b1095ce72480a3dc30c446c88a I added this new feature, but did not add a test for it.
2021-11-02 08:02:47 +00:00
Jairo Llopis
2a059d2fb2
fix(ci): publish on python 3.10
It was using python 3.1 due to the last 0 being stripped from the float value. Passed as string now.
v6.0.0a9
2021-11-02 07:27:36 +00:00
Jairo Llopis
4cc2e48474
build: do not require release to publish
Releases for alpha are a bit too much work. Just pushing a tag should be enough.
v6.0.0a8
2021-11-01 16:31:07 +00:00
dependabot[bot]
6842a0a78b build(deps-dev): bump black from 21.9b0 to 21.10b0
Bumps [black](https://github.com/psf/black) from 21.9b0 to 21.10b0.
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
- [Commits](https://github.com/psf/black/commits)

---
updated-dependencies:
- dependency-name: black
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-01 16:16:13 +00:00
Jairo Llopis
745a490415
fix: always compare versions as PEP440 strings (#434)
In migration scripts, environment variables `$VERSION_FROM`, `$VERSION_CURRENT` and `$VERSION_TO` didn't always get a valid PEP440 version identifier, but the tag. Now we add the PEP440 variants of those variables, autogenerated with dunamai, and these are used instead to sort the versions. This will help comparing template evolution when doing a checkout to an untagged version, or when you happen to add a tag without `v` when the previous one had it. If you want to get the exact commit or version, you can still use the old variables in your scripts, so no backwards incompatibility is introduced. It should remove some false negatives when comparing those version strings.

Fixes https://github.com/copier-org/copier/issues/269.
2021-11-01 08:28:58 +00:00
Timo Furrer
5ab752c11f
feat: keep trailing newlines for Jinja templates by default (#465)
Closes #464
2021-10-31 07:28:43 +00:00
dependabot[bot]
211e9b4742 build(deps): bump importlib-metadata from 3.10.1 to 4.2.0
Bumps [importlib-metadata](https://github.com/python/importlib_metadata) from 3.10.1 to 4.2.0.
- [Release notes](https://github.com/python/importlib_metadata/releases)
- [Changelog](https://github.com/python/importlib_metadata/blob/main/CHANGES.rst)
- [Commits](https://github.com/python/importlib_metadata/compare/v3.10.1...v4.2.0)

---
updated-dependencies:
- dependency-name: importlib-metadata
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-30 08:07:47 +01:00