Skip to content
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

Remove any syntax required for python < 3.8 #376

Merged
merged 2 commits into from
Aug 19, 2022
Merged

Remove any syntax required for python < 3.8 #376

merged 2 commits into from
Aug 19, 2022

Conversation

WhyNotHugo
Copy link
Contributor

@WhyNotHugo WhyNotHugo commented Aug 15, 2022

> find . -iname "*.py" -exec pyupgrade --py38-plus {} \;

    find . -iname "*.py" -exec pyupgrade --py38-plus {} \;
Copy link
Member

@mauritsvanrees mauritsvanrees left a comment

Choose a reason for hiding this comment

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

Looks okay. Thanks. I guess compat.py can be removed now, like you did on your PR #327.
Waiting on an answer to my recent question there.

@WhyNotHugo
Copy link
Contributor Author

WhyNotHugo commented Aug 15, 2022 via email

@niccokunzmann
Copy link
Member

I would wait until #368 is merged so we know if we want to drop Python 3.7 already.

find . -iname "*.py" -exec pyupgrade --py38-plus {} ;

Cool! That might also work for Python 3.7 if needed. Thanks for showing that, I did not know it existed!

@WhyNotHugo
Copy link
Contributor Author

WhyNotHugo commented Aug 17, 2022

If you want to keep 3.7 around for now, I can just redo the PR using:

find . -iname "*.py" -exec pyupgrade --py37-plus {} \;

@niccokunzmann
Copy link
Member

@WhyNotHugo #368b has been merged. Would you like to make a new PR for py37?

@WhyNotHugo
Copy link
Contributor Author

As far as I can tell, master only supports 3.8:

I've created a PR for the 4.x branch, see: #384

@niccokunzmann
Copy link
Member

@WhyNotHugo thanks for your effort - I just ran the tests for Python3.7 and it works with this PR. I think, you can close #384 and we will merge this one...

~/icalendar$ git merge niccokunzmann-test-py37
Auto-merging setup.py
Merge made by the 'ort' strategy.
 .github/workflows/tests.yml | 1 +
 CHANGES.rst                 | 2 +-
 setup.py                    | 3 ++-
 tox.ini                     | 2 +-
 4 files changed, 5 insertions(+), 3 deletions(-)
sabin@schneidebrett:~/icalendar$ tox -e py37
/home/sabin/icalendar/.tox/py37/lib/python3.7/site-packages/setuptools/config/setupcfg.py:463: SetuptoolsDeprecationWarning: The license_file parameter is deprecated, use license_files instead.
  warnings.warn(msg, warning_class)
py37 develop-inst-nodeps: /home/sabin/icalendar
py37 installed: attrs==22.1.0,coverage==6.4.4,-e git+ssh://git@github.com/niccokunzmann/icalendar@c22c64f86ed0807ae4667dd4681051f555d4e450#egg=icalendar,importlib-metadata==4.12.0,iniconfig==1.1.1,packaging==21.3,pluggy==1.0.0,py==1.11.0,pyparsing==3.0.9,pytest==7.1.2,python-dateutil==2.8.2,pytz==2022.2.1,six==1.16.0,tomli==2.0.1,typing_extensions==4.3.0,zipp==3.8.1
py37 run-test-pre: PYTHONHASHSEED='983511143'
py37 run-test: commands[0] | coverage run --source=src/icalendar '--omit=*/tests/*' --module pytest
============================= test session starts ==============================
platform linux -- Python 3.7.13, pytest-7.1.2, pluggy-1.0.0
cachedir: .tox/py37/.pytest_cache
rootdir: /home/sabin/icalendar, configfile: setup.cfg
collected 97 items                                                             

src/icalendar/tests/test_encoding.py ....                                [  4%]
src/icalendar/tests/test_fixed_issues.py .....................           [ 25%]
src/icalendar/tests/test_icalendar.py .........                          [ 35%]
src/icalendar/tests/test_multiple.py .                                   [ 36%]
src/icalendar/tests/test_property_params.py .......                      [ 43%]
src/icalendar/tests/test_recurrence.py ..                                [ 45%]
src/icalendar/tests/test_time.py ..                                      [ 47%]
src/icalendar/tests/test_timezoned.py ........                           [ 55%]
src/icalendar/tests/test_unit_cal.py ...........                         [ 67%]
src/icalendar/tests/test_unit_caselessdict.py ....                       [ 71%]
src/icalendar/tests/test_unit_parser_tools.py ..                         [ 73%]
src/icalendar/tests/test_unit_prop.py .........................          [ 98%]
src/icalendar/tests/test_unit_tools.py .                                 [100%]

============================== 97 passed in 1.66s ==============================
py37 run-test: commands[1] | coverage report
Name                                Stmts   Miss  Cover
-------------------------------------------------------
src/icalendar/__init__.py               5      0   100%
src/icalendar/cal.py                  332      8    98%
src/icalendar/caselessdict.py          62      5    92%
src/icalendar/cli.py                   35     35     0%
src/icalendar/compat.py                 1      0   100%
src/icalendar/parser.py               202      6    97%
src/icalendar/parser_tools.py          20      0   100%
src/icalendar/prop.py                 562     61    89%
src/icalendar/timezone_cache.py         1      0   100%
src/icalendar/tools.py                 18      0   100%
src/icalendar/windows_to_olson.py       1      0   100%
-------------------------------------------------------
TOTAL                                1239    115    91%
py37 run-test: commands[2] | coverage html
Wrote HTML report to htmlcov/index.html
___________________________________ summary ____________________________________
  py37: commands succeeded
  congratulations :)
sabin@schneidebrett:~/icalendar$ git status
On branch WhyNotHugo-py38

@niccokunzmann niccokunzmann merged commit de7a96a into collective:master Aug 19, 2022
@WhyNotHugo WhyNotHugo deleted the py38 branch August 19, 2022 17:59
@WhyNotHugo WhyNotHugo restored the py38 branch August 19, 2022 17:59
@WhyNotHugo WhyNotHugo deleted the py38 branch August 19, 2022 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants