Skip to content

Conversation

@pschelle
Copy link
Contributor

@pschelle pschelle commented Jun 6, 2019

When running pytest the latest version with Python 3.7, 2 warnings are displayed.
This PR solves them and adds Python 3.7 to travis and setup.py.

Below are the results of pytest before and after the changes.
BEFORE
=============================== test session starts ================================
platform linux -- Python 3.7.3, pytest-4.6.2, py-1.8.0, pluggy-0.12.0
rootdir: /home/peter/proj/minio-py_
collected 131 items

tests/unit/bucket_exist_test.py .... [ 3%]
tests/unit/copy_object_test.py ....... [ 8%]
tests/unit/generate_xml_test.py .. [ 9%]
tests/unit/get_bucket_policy_test.py .. [ 11%]
tests/unit/get_object_test.py ... [ 13%]
tests/unit/get_s3_endpoint_test.py .. [ 15%]
tests/unit/header_value_test.py ....... [ 20%]
tests/unit/list_buckets_test.py .. [ 22%]
tests/unit/list_incomplete_uploads_test.py ... [ 24%]
tests/unit/list_objects_test.py ... [ 26%]
tests/unit/list_objects_v2_test.py .. [ 28%]
tests/unit/list_uploaded_parts_test.py ... [ 30%]
tests/unit/make_bucket_test.py .... [ 33%]
tests/unit/minio_test.py .................. [ 47%]
tests/unit/optimal_part_test.py ....... [ 52%]
tests/unit/presigned_get_object_test.py .... [ 55%]
tests/unit/presigned_put_object_test.py ... [ 58%]
tests/unit/put_object_test.py .... [ 61%]
tests/unit/remove_bucket_test.py .... [ 64%]
tests/unit/remove_object_test.py .... [ 67%]
tests/unit/remove_objects_test.py ....... [ 72%]
tests/unit/set_bucket_notification_test.py .................. [ 86%]
tests/unit/sign_test.py ............. [ 96%]
tests/unit/stat_object_test.py .... [ 99%]
tests/unit/trace_test.py . [100%]

================================= warnings summary =================================
minio/helpers.py:56
/home/peter/proj/minio-py_/minio/helpers.py:56: DeprecationWarning: invalid escape sequence _
'^((?!-)(?!)[A-Z_\d-]{1,63}(?<!-)(?<!)\.)*((?!)(?!-)[A-Z_\d-]{1,63}(?<!-)(?<!))$',

minio/copy_conditions.py:39
/home/peter/proj/minio-py_/minio/copy_conditions.py:39: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
class CopyConditions(collections.MutableMapping):

-- Docs: https://docs.pytest.org/en/latest/warnings.html
====================== 131 passed, 2 warnings in 0.59 seconds ======================

AFTER
=============================== test session starts ================================
platform linux -- Python 3.7.3, pytest-4.6.2, py-1.8.0, pluggy-0.12.0
rootdir: /home/peter/proj/minio-py
collected 131 items

tests/unit/bucket_exist_test.py .... [ 3%]
tests/unit/copy_object_test.py ....... [ 8%]
tests/unit/generate_xml_test.py .. [ 9%]
tests/unit/get_bucket_policy_test.py .. [ 11%]
tests/unit/get_object_test.py ... [ 13%]
tests/unit/get_s3_endpoint_test.py .. [ 15%]
tests/unit/header_value_test.py ....... [ 20%]
tests/unit/list_buckets_test.py .. [ 22%]
tests/unit/list_incomplete_uploads_test.py ... [ 24%]
tests/unit/list_objects_test.py ... [ 26%]
tests/unit/list_objects_v2_test.py .. [ 28%]
tests/unit/list_uploaded_parts_test.py ... [ 30%]
tests/unit/make_bucket_test.py .... [ 33%]
tests/unit/minio_test.py .................. [ 47%]
tests/unit/optimal_part_test.py ....... [ 52%]
tests/unit/presigned_get_object_test.py .... [ 55%]
tests/unit/presigned_put_object_test.py ... [ 58%]
tests/unit/put_object_test.py .... [ 61%]
tests/unit/remove_bucket_test.py .... [ 64%]
tests/unit/remove_object_test.py .... [ 67%]
tests/unit/remove_objects_test.py ....... [ 72%]
tests/unit/set_bucket_notification_test.py .................. [ 86%]
tests/unit/sign_test.py ............. [ 96%]
tests/unit/stat_object_test.py .... [ 99%]
tests/unit/trace_test.py . [100%]

============================ 131 passed in 0.66 seconds ============================

vadmeste
vadmeste previously approved these changes Jun 6, 2019
Copy link
Member

@vadmeste vadmeste left a comment

Choose a reason for hiding this comment

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

LGTM

@pschelle
Copy link
Contributor Author

pschelle commented Jun 6, 2019

Oops, looks like .travis.yml needs some more attention.

https://docs.travis-ci.com/user/languages/python/
see Python 3.7 and higher #You’ll need to add dist: xenial to your .travis.yml file to use Python 3.7 and higher.

Copy link
Collaborator

@Praveenrajmani Praveenrajmani left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@vadmeste vadmeste left a comment

Choose a reason for hiding this comment

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

LGTM

@kannappanr kannappanr merged commit f3c0818 into minio:master Jun 11, 2019
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.

4 participants