forked from cookiecutter/cookiecutter
-
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable py311 support #2
Closed
Closed
Conversation
This file contains 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
Remove direct dependency on markupsafe
…_commit_hook pre-commit: add bandit hook
…_major Force click<8.0.0
add safety ci step
…ironment ensure filesystem isolation during tests execution
…se_drafter Make release-drafter diff only between master releases
…-scm Adopt setuptools-scm packaging
* Make read_user_dict compatible with click 8.x The `read_user_dict` function uses a "default" sentinel instead of the actual default value. Being a JSON dict, the latter would often be hard to type. Under click 8.x, the default value for `click.prompt` is passed to the `read_proc` callback. We use this callback to load JSON from the user input, and this would choke on an input like "default" (without quotes). Therefore, change the callback to return the default value when it receives the "default" sentinel. Under click 7.x (which is our minimum version), the default value for `click.prompt` is returned as-is. Therefore, continue to handle the case where `click.prompt` returns "default" instead of the actual default value, but only if we're actually running under click 7.x. (Checking for click 7.x is only done for clarity. Under click 8.x, `click.prompt` would never return "default", even if a user entered it as a valid JSON string. This is because our callback requires a dict, not a string.) * test: Expect read_user_dict to call click.prompt with partial object Previously, tests for `read_user_dict` expected `process_json` to be passed to click.prompt directly. Instead, we now pass an instance of `functools.partial`, so adapt the mock to reflect that. * test: Avoid mocking `click.prompt` when testing defaults Do not mock `click.prompt` when testing that `read_user_dict` returns the proper default value (rather than the sentinel "default"). Mocking `click.prompt` prevents our callback from running, and under click >= 8.0 we process the sentinel in the callback. Instead, use `click.testing.CliRunner` to fake standard input. * test: Adapt regression test for default handling Expect `json.loads` not to be called with the sentinel ("default"). Previously, the test expected `process_json` not to be called, but under click >= 8.0 that is now where we handle the sentinel. * Update dependencies for click 8.x
* Add test cases for untested branches * Add branches coverage Branch coverage helps to find out untested branches. Closes: cookiecutter#1541
- Name corrections for @audreyfeldroy and @pydanny - Run Prettier on Markdown files
- Resolves GitHub check failures due to GitHub no longer supporting those environments on Mac OSX. - Python 3.6 is in maintenance status *security* with EOL in 2 months. - PyPy was last updated to Python 3.8, which is outdated.
Co-authored-by: Daniel Roy Greenfeld <[email protected]>
- Update Black version - Use Black python target of Python 3.9 Co-authored-by: Daniel Roy Greenfeld <[email protected]>
Code quality: Core files: Added exception reason reraise when exception class changed (PEP 3134)
…ests-use-pathlib Code quality: Tests upgrade: Use pathlib for files read/write
…ake_sure_path_exists
Co-authored-by: Jens W. Klein <[email protected]>
Code quality: find.py refactored and type annotated
…re_path_exists_and_related_code Code quality: utils.make_sure_path_exists refactored and type annotated
Fix typos and add minor doc updates
There is a small typo in docs/conf.py. Should read `that` rather than `shat`.
Authored-by: Segun Babalola <[email protected]>
…xt (cookiecutter#1771) * Changes to cookiecutter/main.py: * Add resolved template repository path as _repo_dir to the context * Changes to tests/test_cli.py: * corrected test test_echo_undefined_variable_error to check for new context item _repo_dir Co-authored-by: Thomas Meckel <[email protected]>
- enable py311 pipelines - expose py311 support in metadata
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.
--no-input
documentation cookiecutter/cookiecutter#1543)no_input
flag