Skip to content

Fix for DeprecationWarning (about regular expression flags) on python 3.6#1127

Merged
pydanny merged 1 commit intocookiecutter:masterfrom
reinout:reinout-fix-deprecation-warning
Jul 3, 2019
Merged

Fix for DeprecationWarning (about regular expression flags) on python 3.6#1127
pydanny merged 1 commit intocookiecutter:masterfrom
reinout:reinout-fix-deprecation-warning

Conversation

@reinout
Copy link
Copy Markdown
Contributor

@reinout reinout commented Dec 3, 2018

When running tests on travis with python 3.6, I got the following
deprecationwarning in cookiecutter/repository.py:19:

DeprecationWarning: Flags not at the start of the expression '\n(?x)\n((((git|hg)\\+)' (truncated)
""")

Python 3.6 prefers the flags right at the start, so it doesn't allow a newline
in front of it.
I fixed it by adding the flag at the end, which is more clear/verbose in any
case. Which is fitting as the flag is re.VERBOSE :-)

When running tests on travis with python 3.6, I got the following
deprecationwarning in cookiecutter/repository.py:19:

    DeprecationWarning: Flags not at the start of the expression '\n(?x)\n((((git|hg)\\+)' (truncated)
    """)

Python 3.6 prefers the flags right at the start, so it doesn't allow a newline
in front of it.
I fixed it by adding the flag at the end, which is more clear/verbose in any
case. Which is fitting as the flag is `re.VERBOSE` :-)
@reinout
Copy link
Copy Markdown
Contributor Author

reinout commented Dec 3, 2018

Note: the regular expression is tested in detail, so I haven't added an extra test. The existing tests are proof enough that the regex is still treated as a verbose regular expression.

@reinout
Copy link
Copy Markdown
Contributor Author

reinout commented Dec 3, 2018

Hm, I see the travis tests are failing. I saw the same two failures locally when running on a clean fork of master. I hoped those tests would be OK on travis, but apparently not.

So: I guess my PR is fine (as those tests still run fine), but master needs some fixing?

@reinout
Copy link
Copy Markdown
Contributor Author

reinout commented Dec 3, 2018

The last time the master tests ran, everything was OK. I suspect the "click" dependency myself: it had an update recently and it deals with the output we're seeing the error in.

The output is now Invalid value for "[EXTRA_CONTEXT]" instead of the expected Invalid value for "extra_context".

Perhaps someone can fire off master's travis tests again just to be sure?

@ssbarnea
Copy link
Copy Markdown
Member

Can we get this fixed and have a new release? ... last one was in 2017.

.tox/py37-ansible28-unit/lib/python3.7/site-packages/cookiecutter/repository.py:19
  /Users/ssbarnea/os/molecule/.tox/py37-ansible28-unit/lib/python3.7/site-packages/cookiecutter/repository.py:19: DeprecationWarning: Flags not at the start of the expression '\n(?x)\n((((git|hg)\\+)' (truncated)
    """)

@reinout
Copy link
Copy Markdown
Contributor Author

reinout commented Jun 17, 2019

I checked the "click" library: as far as I can see, the parts dealing with this error's formatting are all three or five years old. So that probably isn't the reason.

Our error message:

Invalid value for "[EXTRA_CONTEXT]...": EXTRA_CONTEXT should contain 

This matches the error format here:

https://github.com/pallets/click/blame/master/click/exceptions.py#L106

And here is the make_metavar() that does the uppercasing, the square brackets and the dots:

https://github.com/pallets/click/blob/master/click/core.py#L1891

Copy link
Copy Markdown
Member

@ssbarnea ssbarnea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we please merge this one? The current code triggeres a very noisy deprecation warning, I faces it myself in molecule.

ansible/molecule#2145

@insspb
Copy link
Copy Markdown
Member

insspb commented Jul 3, 2019

I can confirm that after this patch local tests works well, as travis should too.
This suspends deprecation warning.
Here is tox report from local test, no warnings:

(venv) insspb@insspb-notebook:~/cookiecutter$ tox
GLOB sdist-make: /home/insspb/cookiecutter/setup.py
py27 inst-nodeps: /home/insspb/cookiecutter/.tox/dist/cookiecutter-1.6.0.zip
py27 installed: DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.,arrow==0.14.2,atomicwrites==1.3.0,attrs==19.1.0,backports.functools-lru-cache==1.5,binaryornot==0.4.4,certifi==2019.6.16,chardet==3.0.4,Click==7.0,configparser==3.7.4,contextlib2==0.5.5,cookiecutter==1.6.0,coverage==4.5.3,freezegun==0.3.12,funcsigs==1.0.2,future==0.17.1,idna==2.8,importlib-metadata==0.18,Jinja2==2.10.1,jinja2-time==0.2.0,MarkupSafe==1.1.1,mock==3.0.5,more-itertools==5.0.0,packaging==19.0,pathlib2==2.3.4,pkg-resources==0.0.0,pluggy==0.12.0,poyo==0.4.2,py==1.8.0,pyparsing==2.4.0,pytest==4.6.4,pytest-catchlog==1.2.2,pytest-cov==2.7.1,pytest-mock==1.10.4,python-dateutil==2.8.0,requests==2.22.0,scandir==1.10.0,six==1.12.0,urllib3==1.25.3,wcwidth==0.1.7,whichcraft==0.5.2,zipp==0.5.1
py27 runtests: PYTHONHASHSEED='3448090936'
py27 runtests: commands[0] | pytest --cov=cookiecutter tests
/home/insspb/cookiecutter/.tox/py27/local/lib/python2.7/site-packages/_pytest/config/__init__.py:316: PytestConfigWarning: pytest-catchlog plugin has been merged into the core, please remove it from your requirements.
  name.replace("_", "-")
=============================================================================================== test session starts ===============================================================================================
platform linux2 -- Python 2.7.15+, pytest-4.6.4, py-1.8.0, pluggy-0.12.0
rootdir: /home/insspb/cookiecutter, inifile: setup.cfg, testpaths: tests
plugins: cov-2.7.1, catchlog-1.2.2, mock-1.10.4
collected 261 items                                                                                                                                                                                               

tests/test_abort_generate_on_hook_error.py ..                                                                                                                                                               [  0%]
tests/test_cli.py ...........................                                                                                                                                                               [ 11%]
tests/test_cookiecutter_invocation.py ..                                                                                                                                                                    [ 11%]
tests/test_cookiecutter_local_no_input.py .......                                                                                                                                                           [ 14%]
tests/test_cookiecutter_local_with_input.py ..                                                                                                                                                              [ 15%]
tests/test_custom_extensions_in_hooks.py ..                                                                                                                                                                 [ 16%]
tests/test_default_extensions.py .                                                                                                                                                                          [ 16%]
tests/test_environment.py ..                                                                                                                                                                                [ 17%]
tests/test_exceptions.py .                                                                                                                                                                                  [ 17%]
tests/test_find.py ..                                                                                                                                                                                       [ 18%]
tests/test_generate_context.py ..........                                                                                                                                                                   [ 22%]
tests/test_generate_copy_without_render.py .                                                                                                                                                                [ 22%]
tests/test_generate_file.py .....                                                                                                                                                                           [ 24%]
tests/test_generate_files.py ..................                                                                                                                                                             [ 31%]
tests/test_generate_hooks.py ........                                                                                                                                                                       [ 34%]
tests/test_get_config.py .....                                                                                                                                                                              [ 36%]
tests/test_get_user_config.py .........                                                                                                                                                                     [ 39%]
tests/test_hooks.py ..........                                                                                                                                                                              [ 43%]
tests/test_log.py ...                                                                                                                                                                                       [ 44%]
tests/test_main.py ..                                                                                                                                                                                       [ 45%]
tests/test_output_folder.py ..                                                                                                                                                                              [ 46%]
tests/test_preferred_encoding.py s                                                                                                                                                                          [ 46%]
tests/test_prompt.py .........................                                                                                                                                                              [ 56%]
tests/test_read_repo_password.py .                                                                                                                                                                          [ 56%]
tests/test_read_user_choice.py .....                                                                                                                                                                        [ 58%]
tests/test_read_user_dict.py .......                                                                                                                                                                        [ 61%]
tests/test_read_user_variable.py .                                                                                                                                                                          [ 61%]
tests/test_read_user_yes_no.py .                                                                                                                                                                            [ 62%]
tests/test_repo_not_found.py .                                                                                                                                                                              [ 62%]
tests/test_specify_output_dir.py ..                                                                                                                                                                         [ 63%]
tests/test_utils.py .........                                                                                                                                                                               [ 66%]
tests/replay/test_dump.py .....                                                                                                                                                                             [ 68%]
tests/replay/test_load.py ....                                                                                                                                                                              [ 70%]
tests/replay/test_replay.py ......                                                                                                                                                                          [ 72%]
tests/repository/test_abbreviation_expansion.py .......                                                                                                                                                     [ 75%]
tests/repository/test_determine_repo_dir_clones_repo.py .....                                                                                                                                               [ 77%]
tests/repository/test_determine_repo_dir_finds_existing_cookiecutter.py .                                                                                                                                   [ 77%]
tests/repository/test_determine_repository_should_use_local_repo.py ...                                                                                                                                     [ 78%]
tests/repository/test_is_repo_url.py .............                                                                                                                                                          [ 83%]
tests/repository/test_repository_has_cookiecutter_json.py ...                                                                                                                                               [ 84%]
tests/vcs/test_clone.py ..........                                                                                                                                                                          [ 88%]
tests/vcs/test_identify_repo.py .............                                                                                                                                                               [ 93%]
tests/vcs/test_is_vcs_installed.py ....                                                                                                                                                                     [ 95%]
tests/zipfile/test_unzip.py .............                                                                                                                                                                   [100%]

---------- coverage: platform linux2, python 2.7.15-final-0 ----------
Name                          Stmts   Miss  Cover
-------------------------------------------------
cookiecutter/__init__.py          2      0   100%
cookiecutter/__main__.py          3      0   100%
cookiecutter/cli.py              50      0   100%
cookiecutter/config.py           52      0   100%
cookiecutter/environment.py      21      0   100%
cookiecutter/exceptions.py       24      0   100%
cookiecutter/extensions.py        9      0   100%
cookiecutter/find.py             18      0   100%
cookiecutter/generate.py        166      0   100%
cookiecutter/hooks.py            61      0   100%
cookiecutter/log.py              22      0   100%
cookiecutter/main.py             31      0   100%
cookiecutter/prompt.py           90      0   100%
cookiecutter/replay.py           30      0   100%
cookiecutter/repository.py       39      0   100%
cookiecutter/utils.py            50      2    96%
cookiecutter/vcs.py              54      0   100%
cookiecutter/zipfile.py          61      0   100%
-------------------------------------------------
TOTAL                           783      2    99%


====================================================================================== 260 passed, 1 skipped in 4.84 seconds ======================================================================================
py35 inst-nodeps: /home/insspb/cookiecutter/.tox/dist/cookiecutter-1.6.0.zip
py35 installed: arrow==0.14.2,atomicwrites==1.3.0,attrs==19.1.0,binaryornot==0.4.4,certifi==2019.6.16,chardet==3.0.4,Click==7.0,cookiecutter==1.6.0,coverage==4.5.3,freezegun==0.3.12,future==0.17.1,idna==2.8,importlib-metadata==0.18,Jinja2==2.10.1,jinja2-time==0.2.0,MarkupSafe==1.1.1,more-itertools==7.1.0,packaging==19.0,pathlib2==2.3.4,pkg-resources==0.0.0,pluggy==0.12.0,poyo==0.4.2,py==1.8.0,pyparsing==2.4.0,pytest==5.0.0,pytest-catchlog==1.2.2,pytest-cov==2.7.1,pytest-mock==1.10.4,python-dateutil==2.8.0,requests==2.22.0,six==1.12.0,urllib3==1.25.3,wcwidth==0.1.7,whichcraft==0.5.2,zipp==0.5.1
py35 runtests: PYTHONHASHSEED='3448090936'
py35 runtests: commands[0] | pytest --cov=cookiecutter tests
/home/insspb/cookiecutter/.tox/py35/lib/python3.5/site-packages/_pytest/config/__init__.py:297: PytestConfigWarning: pytest-catchlog plugin has been merged into the core, please remove it from your requirements.
  name.replace("_", "-")
=============================================================================================== test session starts ===============================================================================================
platform linux -- Python 3.5.7, pytest-5.0.0, py-1.8.0, pluggy-0.12.0
rootdir: /home/insspb/cookiecutter, inifile: setup.cfg, testpaths: tests
plugins: cov-2.7.1, catchlog-1.2.2, mock-1.10.4
collected 261 items                                                                                                                                                                                               

tests/test_abort_generate_on_hook_error.py ..                                                                                                                                                               [  0%]
tests/test_cli.py ...........................                                                                                                                                                               [ 11%]
tests/test_cookiecutter_invocation.py ..                                                                                                                                                                    [ 11%]
tests/test_cookiecutter_local_no_input.py .......                                                                                                                                                           [ 14%]
tests/test_cookiecutter_local_with_input.py ..                                                                                                                                                              [ 15%]
tests/test_custom_extensions_in_hooks.py ..                                                                                                                                                                 [ 16%]
tests/test_default_extensions.py .                                                                                                                                                                          [ 16%]
tests/test_environment.py ..                                                                                                                                                                                [ 17%]
tests/test_exceptions.py .                                                                                                                                                                                  [ 17%]
tests/test_find.py ..                                                                                                                                                                                       [ 18%]
tests/test_generate_context.py ..........                                                                                                                                                                   [ 22%]
tests/test_generate_copy_without_render.py .                                                                                                                                                                [ 22%]
tests/test_generate_file.py .....                                                                                                                                                                           [ 24%]
tests/test_generate_files.py ..................                                                                                                                                                             [ 31%]
tests/test_generate_hooks.py ........                                                                                                                                                                       [ 34%]
tests/test_get_config.py .....                                                                                                                                                                              [ 36%]
tests/test_get_user_config.py .........                                                                                                                                                                     [ 39%]
tests/test_hooks.py ..........                                                                                                                                                                              [ 43%]
tests/test_log.py ...                                                                                                                                                                                       [ 44%]
tests/test_main.py ..                                                                                                                                                                                       [ 45%]
tests/test_output_folder.py ..                                                                                                                                                                              [ 46%]
tests/test_preferred_encoding.py .                                                                                                                                                                          [ 46%]
tests/test_prompt.py .........................                                                                                                                                                              [ 56%]
tests/test_read_repo_password.py .                                                                                                                                                                          [ 56%]
tests/test_read_user_choice.py .....                                                                                                                                                                        [ 58%]
tests/test_read_user_dict.py .......                                                                                                                                                                        [ 61%]
tests/test_read_user_variable.py .                                                                                                                                                                          [ 61%]
tests/test_read_user_yes_no.py .                                                                                                                                                                            [ 62%]
tests/test_repo_not_found.py .                                                                                                                                                                              [ 62%]
tests/test_specify_output_dir.py ..                                                                                                                                                                         [ 63%]
tests/test_utils.py .........                                                                                                                                                                               [ 66%]
tests/replay/test_dump.py .....                                                                                                                                                                             [ 68%]
tests/replay/test_load.py ....                                                                                                                                                                              [ 70%]
tests/replay/test_replay.py ......                                                                                                                                                                          [ 72%]
tests/repository/test_abbreviation_expansion.py .......                                                                                                                                                     [ 75%]
tests/repository/test_determine_repo_dir_clones_repo.py .....                                                                                                                                               [ 77%]
tests/repository/test_determine_repo_dir_finds_existing_cookiecutter.py .                                                                                                                                   [ 77%]
tests/repository/test_determine_repository_should_use_local_repo.py ...                                                                                                                                     [ 78%]
tests/repository/test_is_repo_url.py .............                                                                                                                                                          [ 83%]
tests/repository/test_repository_has_cookiecutter_json.py ...                                                                                                                                               [ 84%]
tests/vcs/test_clone.py ..........                                                                                                                                                                          [ 88%]
tests/vcs/test_identify_repo.py .............                                                                                                                                                               [ 93%]
tests/vcs/test_is_vcs_installed.py ....                                                                                                                                                                     [ 95%]
tests/zipfile/test_unzip.py .............                                                                                                                                                                   [100%]

----------- coverage: platform linux, python 3.5.7-final-0 -----------
Name                          Stmts   Miss  Cover
-------------------------------------------------
cookiecutter/__init__.py          2      0   100%
cookiecutter/__main__.py          3      0   100%
cookiecutter/cli.py              50      0   100%
cookiecutter/config.py           52      0   100%
cookiecutter/environment.py      21      0   100%
cookiecutter/exceptions.py       24      0   100%
cookiecutter/extensions.py        9      0   100%
cookiecutter/find.py             18      0   100%
cookiecutter/generate.py        166      0   100%
cookiecutter/hooks.py            61      0   100%
cookiecutter/log.py              22      0   100%
cookiecutter/main.py             31      0   100%
cookiecutter/prompt.py           90      0   100%
cookiecutter/replay.py           30      0   100%
cookiecutter/repository.py       39      0   100%
cookiecutter/utils.py            50      2    96%
cookiecutter/vcs.py              54      0   100%
cookiecutter/zipfile.py          61      2    97%
-------------------------------------------------
TOTAL                           783      4    99%


=========================================================================================== 261 passed in 6.38 seconds ============================================================================================
py36 inst-nodeps: /home/insspb/cookiecutter/.tox/dist/cookiecutter-1.6.0.zip
py36 installed: arrow==0.14.2,atomicwrites==1.3.0,attrs==19.1.0,binaryornot==0.4.4,certifi==2019.6.16,chardet==3.0.4,Click==7.0,cookiecutter==1.6.0,coverage==4.5.3,freezegun==0.3.12,future==0.17.1,idna==2.8,importlib-metadata==0.18,Jinja2==2.10.1,jinja2-time==0.2.0,MarkupSafe==1.1.1,more-itertools==7.1.0,packaging==19.0,pkg-resources==0.0.0,pluggy==0.12.0,poyo==0.4.2,py==1.8.0,pyparsing==2.4.0,pytest==5.0.0,pytest-catchlog==1.2.2,pytest-cov==2.7.1,pytest-mock==1.10.4,python-dateutil==2.8.0,requests==2.22.0,six==1.12.0,urllib3==1.25.3,wcwidth==0.1.7,whichcraft==0.5.2,zipp==0.5.1
py36 runtests: PYTHONHASHSEED='3448090936'
py36 runtests: commands[0] | pytest --cov=cookiecutter tests
/home/insspb/cookiecutter/.tox/py36/lib/python3.6/site-packages/_pytest/config/__init__.py:297: PytestConfigWarning: pytest-catchlog plugin has been merged into the core, please remove it from your requirements.
  name.replace("_", "-")
=============================================================================================== test session starts ===============================================================================================
platform linux -- Python 3.6.8, pytest-5.0.0, py-1.8.0, pluggy-0.12.0
rootdir: /home/insspb/cookiecutter, inifile: setup.cfg, testpaths: tests
plugins: cov-2.7.1, catchlog-1.2.2, mock-1.10.4
collected 261 items                                                                                                                                                                                               

tests/test_abort_generate_on_hook_error.py ..                                                                                                                                                               [  0%]
tests/test_cli.py ...........................                                                                                                                                                               [ 11%]
tests/test_cookiecutter_invocation.py ..                                                                                                                                                                    [ 11%]
tests/test_cookiecutter_local_no_input.py .......                                                                                                                                                           [ 14%]
tests/test_cookiecutter_local_with_input.py ..                                                                                                                                                              [ 15%]
tests/test_custom_extensions_in_hooks.py ..                                                                                                                                                                 [ 16%]
tests/test_default_extensions.py .                                                                                                                                                                          [ 16%]
tests/test_environment.py ..                                                                                                                                                                                [ 17%]
tests/test_exceptions.py .                                                                                                                                                                                  [ 17%]
tests/test_find.py ..                                                                                                                                                                                       [ 18%]
tests/test_generate_context.py ..........                                                                                                                                                                   [ 22%]
tests/test_generate_copy_without_render.py .                                                                                                                                                                [ 22%]
tests/test_generate_file.py .....                                                                                                                                                                           [ 24%]
tests/test_generate_files.py ..................                                                                                                                                                             [ 31%]
tests/test_generate_hooks.py ........                                                                                                                                                                       [ 34%]
tests/test_get_config.py .....                                                                                                                                                                              [ 36%]
tests/test_get_user_config.py .........                                                                                                                                                                     [ 39%]
tests/test_hooks.py ..........                                                                                                                                                                              [ 43%]
tests/test_log.py ...                                                                                                                                                                                       [ 44%]
tests/test_main.py ..                                                                                                                                                                                       [ 45%]
tests/test_output_folder.py ..                                                                                                                                                                              [ 46%]
tests/test_preferred_encoding.py .                                                                                                                                                                          [ 46%]
tests/test_prompt.py .........................                                                                                                                                                              [ 56%]
tests/test_read_repo_password.py .                                                                                                                                                                          [ 56%]
tests/test_read_user_choice.py .....                                                                                                                                                                        [ 58%]
tests/test_read_user_dict.py .......                                                                                                                                                                        [ 61%]
tests/test_read_user_variable.py .                                                                                                                                                                          [ 61%]
tests/test_read_user_yes_no.py .                                                                                                                                                                            [ 62%]
tests/test_repo_not_found.py .                                                                                                                                                                              [ 62%]
tests/test_specify_output_dir.py ..                                                                                                                                                                         [ 63%]
tests/test_utils.py .........                                                                                                                                                                               [ 66%]
tests/replay/test_dump.py .....                                                                                                                                                                             [ 68%]
tests/replay/test_load.py ....                                                                                                                                                                              [ 70%]
tests/replay/test_replay.py ......                                                                                                                                                                          [ 72%]
tests/repository/test_abbreviation_expansion.py .......                                                                                                                                                     [ 75%]
tests/repository/test_determine_repo_dir_clones_repo.py .....                                                                                                                                               [ 77%]
tests/repository/test_determine_repo_dir_finds_existing_cookiecutter.py .                                                                                                                                   [ 77%]
tests/repository/test_determine_repository_should_use_local_repo.py ...                                                                                                                                     [ 78%]
tests/repository/test_is_repo_url.py .............                                                                                                                                                          [ 83%]
tests/repository/test_repository_has_cookiecutter_json.py ...                                                                                                                                               [ 84%]
tests/vcs/test_clone.py ..........                                                                                                                                                                          [ 88%]
tests/vcs/test_identify_repo.py .............                                                                                                                                                               [ 93%]
tests/vcs/test_is_vcs_installed.py ....                                                                                                                                                                     [ 95%]
tests/zipfile/test_unzip.py .............                                                                                                                                                                   [100%]

----------- coverage: platform linux, python 3.6.8-final-0 -----------
Name                          Stmts   Miss  Cover
-------------------------------------------------
cookiecutter/__init__.py          2      0   100%
cookiecutter/__main__.py          3      0   100%
cookiecutter/cli.py              50      0   100%
cookiecutter/config.py           52      0   100%
cookiecutter/environment.py      21      0   100%
cookiecutter/exceptions.py       24      0   100%
cookiecutter/extensions.py        9      0   100%
cookiecutter/find.py             18      0   100%
cookiecutter/generate.py        166      0   100%
cookiecutter/hooks.py            61      0   100%
cookiecutter/log.py              22      0   100%
cookiecutter/main.py             31      0   100%
cookiecutter/prompt.py           90      0   100%
cookiecutter/replay.py           30      0   100%
cookiecutter/repository.py       39      0   100%
cookiecutter/utils.py            50      2    96%
cookiecutter/vcs.py              54      0   100%
cookiecutter/zipfile.py          61      2    97%
-------------------------------------------------
TOTAL                           783      4    99%


=========================================================================================== 261 passed in 5.49 seconds ============================================================================================
py37 inst-nodeps: /home/insspb/cookiecutter/.tox/dist/cookiecutter-1.6.0.zip
py37 installed: arrow==0.14.2,atomicwrites==1.3.0,attrs==19.1.0,binaryornot==0.4.4,certifi==2019.6.16,chardet==3.0.4,Click==7.0,cookiecutter==1.6.0,coverage==4.5.3,freezegun==0.3.12,future==0.17.1,idna==2.8,importlib-metadata==0.18,Jinja2==2.10.1,jinja2-time==0.2.0,MarkupSafe==1.1.1,more-itertools==7.1.0,packaging==19.0,pkg-resources==0.0.0,pluggy==0.12.0,poyo==0.4.2,py==1.8.0,pyparsing==2.4.0,pytest==5.0.0,pytest-catchlog==1.2.2,pytest-cov==2.7.1,pytest-mock==1.10.4,python-dateutil==2.8.0,requests==2.22.0,six==1.12.0,urllib3==1.25.3,wcwidth==0.1.7,whichcraft==0.5.2,zipp==0.5.1
py37 runtests: PYTHONHASHSEED='3448090936'
py37 runtests: commands[0] | pytest --cov=cookiecutter tests
/home/insspb/cookiecutter/.tox/py37/lib/python3.7/site-packages/_pytest/config/__init__.py:297: PytestConfigWarning: pytest-catchlog plugin has been merged into the core, please remove it from your requirements.
  name.replace("_", "-")
=============================================================================================== test session starts ===============================================================================================
platform linux -- Python 3.7.3, pytest-5.0.0, py-1.8.0, pluggy-0.12.0
rootdir: /home/insspb/cookiecutter, inifile: setup.cfg, testpaths: tests
plugins: cov-2.7.1, catchlog-1.2.2, mock-1.10.4
collected 261 items                                                                                                                                                                                               

tests/test_abort_generate_on_hook_error.py ..                                                                                                                                                               [  0%]
tests/test_cli.py ...........................                                                                                                                                                               [ 11%]
tests/test_cookiecutter_invocation.py ..                                                                                                                                                                    [ 11%]
tests/test_cookiecutter_local_no_input.py .......                                                                                                                                                           [ 14%]
tests/test_cookiecutter_local_with_input.py ..                                                                                                                                                              [ 15%]
tests/test_custom_extensions_in_hooks.py ..                                                                                                                                                                 [ 16%]
tests/test_default_extensions.py .                                                                                                                                                                          [ 16%]
tests/test_environment.py ..                                                                                                                                                                                [ 17%]
tests/test_exceptions.py .                                                                                                                                                                                  [ 17%]
tests/test_find.py ..                                                                                                                                                                                       [ 18%]
tests/test_generate_context.py ..........                                                                                                                                                                   [ 22%]
tests/test_generate_copy_without_render.py .                                                                                                                                                                [ 22%]
tests/test_generate_file.py .....                                                                                                                                                                           [ 24%]
tests/test_generate_files.py ..................                                                                                                                                                             [ 31%]
tests/test_generate_hooks.py ........                                                                                                                                                                       [ 34%]
tests/test_get_config.py .....                                                                                                                                                                              [ 36%]
tests/test_get_user_config.py .........                                                                                                                                                                     [ 39%]
tests/test_hooks.py ..........                                                                                                                                                                              [ 43%]
tests/test_log.py ...                                                                                                                                                                                       [ 44%]
tests/test_main.py ..                                                                                                                                                                                       [ 45%]
tests/test_output_folder.py ..                                                                                                                                                                              [ 46%]
tests/test_preferred_encoding.py .                                                                                                                                                                          [ 46%]
tests/test_prompt.py .........................                                                                                                                                                              [ 56%]
tests/test_read_repo_password.py .                                                                                                                                                                          [ 56%]
tests/test_read_user_choice.py .....                                                                                                                                                                        [ 58%]
tests/test_read_user_dict.py .......                                                                                                                                                                        [ 61%]
tests/test_read_user_variable.py .                                                                                                                                                                          [ 61%]
tests/test_read_user_yes_no.py .                                                                                                                                                                            [ 62%]
tests/test_repo_not_found.py .                                                                                                                                                                              [ 62%]
tests/test_specify_output_dir.py ..                                                                                                                                                                         [ 63%]
tests/test_utils.py .........                                                                                                                                                                               [ 66%]
tests/replay/test_dump.py .....                                                                                                                                                                             [ 68%]
tests/replay/test_load.py ....                                                                                                                                                                              [ 70%]
tests/replay/test_replay.py ......                                                                                                                                                                          [ 72%]
tests/repository/test_abbreviation_expansion.py .......                                                                                                                                                     [ 75%]
tests/repository/test_determine_repo_dir_clones_repo.py .....                                                                                                                                               [ 77%]
tests/repository/test_determine_repo_dir_finds_existing_cookiecutter.py .                                                                                                                                   [ 77%]
tests/repository/test_determine_repository_should_use_local_repo.py ...                                                                                                                                     [ 78%]
tests/repository/test_is_repo_url.py .............                                                                                                                                                          [ 83%]
tests/repository/test_repository_has_cookiecutter_json.py ...                                                                                                                                               [ 84%]
tests/vcs/test_clone.py ..........                                                                                                                                                                          [ 88%]
tests/vcs/test_identify_repo.py .............                                                                                                                                                               [ 93%]
tests/vcs/test_is_vcs_installed.py ....                                                                                                                                                                     [ 95%]
tests/zipfile/test_unzip.py .............                                                                                                                                                                   [100%]

----------- coverage: platform linux, python 3.7.3-final-0 -----------
Name                          Stmts   Miss  Cover
-------------------------------------------------
cookiecutter/__init__.py          2      0   100%
cookiecutter/__main__.py          3      0   100%
cookiecutter/cli.py              50      0   100%
cookiecutter/config.py           52      0   100%
cookiecutter/environment.py      21      0   100%
cookiecutter/exceptions.py       24      0   100%
cookiecutter/extensions.py        9      0   100%
cookiecutter/find.py             18      0   100%
cookiecutter/generate.py        166      0   100%
cookiecutter/hooks.py            61      0   100%
cookiecutter/log.py              22      0   100%
cookiecutter/main.py             31      0   100%
cookiecutter/prompt.py           90      0   100%
cookiecutter/replay.py           30      0   100%
cookiecutter/repository.py       39      0   100%
cookiecutter/utils.py            50      2    96%
cookiecutter/vcs.py              54      0   100%
cookiecutter/zipfile.py          61      2    97%
-------------------------------------------------
TOTAL                           783      4    99%


=========================================================================================== 261 passed in 5.22 seconds ============================================================================================
pypy create: /home/insspb/cookiecutter/.tox/pypy
ERROR: InterpreterNotFound: pypy
flake8 inst-nodeps: /home/insspb/cookiecutter/.tox/dist/cookiecutter-1.6.0.zip
flake8 installed: arrow==0.14.2,binaryornot==0.4.4,certifi==2019.6.16,chardet==3.0.4,Click==7.0,cookiecutter==1.6.0,flake8==3.5.0,future==0.17.1,idna==2.8,Jinja2==2.10.1,jinja2-time==0.2.0,MarkupSafe==1.1.1,mccabe==0.6.1,pkg-resources==0.0.0,poyo==0.4.2,pycodestyle==2.3.1,pyflakes==1.6.0,python-dateutil==2.8.0,requests==2.22.0,six==1.12.0,urllib3==1.25.3,whichcraft==0.5.2
flake8 runtests: PYTHONHASHSEED='3448090936'
flake8 runtests: commands[0] | flake8 cookiecutter tests setup.py
_____________________________________________________________________________________________________ summary _____________________________________________________________________________________________________
  py27: commands succeeded
  py35: commands succeeded
  py36: commands succeeded
  py37: commands succeeded
ERROR:   pypy: InterpreterNotFound: pypy
  flake8: commands succeeded

```

@insspb
Copy link
Copy Markdown
Member

insspb commented Jul 3, 2019

tested with merged #1181

@insspb insspb removed their assignment Jul 3, 2019
@pydanny pydanny merged commit 7c1eaed into cookiecutter:master Jul 3, 2019
@reinout reinout deleted the reinout-fix-deprecation-warning branch July 3, 2019 22:34
@reinout
Copy link
Copy Markdown
Contributor Author

reinout commented Jul 3, 2019

Thanks!

Unrelated to this PR, but perhaps of interest: https://www.youtube.com/watch?v=xuPGdxQOJ1s
I gave a talk about it at the Dutch PyGrunn conference (some 300 people attending).
I used my model railway as an illustration :-)

@rzuckerm
Copy link
Copy Markdown

rzuckerm commented Dec 7, 2019

When is this going to be released?

@insspb insspb added the code style This issue/PR relates to the project code style modification label Apr 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

code style This issue/PR relates to the project code style modification

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants