Copier

Latest version: v9.4.1

Safety actively analyzes 682471 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 7

8.0.0

BREAKING CHANGE

- Updates will overwrite existing files always. If you need to select only some files,
just use `git mergetool` or `git difftool` after updating.
- Flag `--overwrite/-w` disappeared from `copier update`. It is now implicit.
- To update via API, `overwrite=True` is now required.
- The default update conflict mode is now `inline` instead of `rej`.
- By default, updates now consider 3 lines of context instead of just 1.
- All CLI calls to Copier must now include the subcommand as the 1st argument. For
example, `copier` must become now `copier update`; also `copier ./tpl ./dst` must
become `copier copy ./tpl ./dst`.
- All flags must go after the subcommand now. For example,
`copier -r HEAD update ./dst` must now become `copier update -r HEAD ./dst` or
`copier update ./dst -r HEAD`.
- Automatic mode removed. Since now subcommands are required, the automatic mode is
removed.
- Deprecated `copier.copy` function is removed. Use `copier.run_copy`,
`copier.run_update` or `copier.run_recopy` explicitly as needed.
- default values must be of the same type than the question.

Feat

- disable unsafe features by default and add `--UNSAFE` switch (1171)
- basic nixpkgs overlay
- add `recopy` command and function
- support conditional choices (1010)
- validate default values (1075)

Fix

- explain better why an answer casting fails
- **cli**: display subcommand args meaning
- preserver recursive symlinks
- work around Pydantic bug when parsing choices
- skip validating question and generating its default value when its skip condition is
met

Refactor

- overwrite always on updates
- **update**: default to inline markers and 3 lines of context
- remove unused local overrides to answers

7.2.0

Feat

- customizable update accuracy

Fix

- fix using a branch name as VCS ref
- answer validation for question with complex choices (1110)

7.1.0

Feat

- include git in flake app
- support preserving symlinks when copying templates (938)
- allow imports in inline templates (986)
- properly support update in repo subdirectory (1069)
- allow templating `_answers_file` setting (1027)
- let answers file exist in a subdirectory
- validate answers given via CLI/API
- exclude nothing by default when using subdirectory
- add native OS directory separator variable in `_copier_conf.sep` to allow generating
dynamic directory structures
- nix support

Fix

- include dirty local changes when copying HEAD
- require answer for questions without default value (958)
- **cleanup**: don't clean up local template in parent folder
- delete conditionally created file when answer changes (982)
- properly support diffs over updates with new interactive answers
- ignore Git hooks during project update (1066)
- properly support diffs over updates with new answers
- skip tasks in pretend mode (970)
- parse CLI data using question's answer parser
- don't set YAML `!include` constructor globally (947)
- **cli**: use `--conflict` flag only in `copier update` subcommand
- ignore template repo tags that aren't valid PEP 440 versions
- --skip option was ignored (966)
- Remove useless is_dir check
- don't attempt to render a file if its name is empty
- warn users against using shallow clones as template source

Refactor

- **tests**: remove unknown timeout marker
- deduplicate code
- remove unused method argument
- simplify casting boolean question settings
- remove useless code related to not asking a question
- **typing**: use `Mapping` instead of `ChainMap` type
- move unrelated code out of try-except block
- **inline**: smarter inline conflict markers algorithm

7.1.0a0

Feat

- experimental inline conflict markers when updating
- merge copier settings from multiple documents

Fix

- remove dependency on iteration_utilities

7.0.1

Fix

- remove deprecated code scheduled for removal in Copier v7 (843)

7.0.0

Feat

- expand tilde in template source path (835)

Fix

- delete temporary clones after execution automatically (802)
- **typing**: remove invalid migration task stage "task"

Refactor

- **typing**: use abstract container types where possible (832)
- use `dict` constructor as default factory
- **typing**: remove unused types
- remove unreachable code (826)
- model a task to execute using a dataclass
- reduce module imports

Page 3 of 7

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.