cloudant / python-cloudant

A Python library for Cloudant and CouchDB
Apache License 2.0
163 stars 55 forks source link

Fix "DeprecationWarning" from "collections" #451

Closed tretinha closed 4 years ago

tretinha commented 4 years ago

Checklist

Description

Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working.

1. Steps to reproduce and the simplest code sample possible to demonstrate the issue

1) start your python3 interpreter with -Wd so it shows deprecation warnings 2) import cloudant._common_util

2. What you expected to happen

The import should work wihout warnings

3. What actually happened

DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
  from collections import Sequence

Approach

Use the error message suggested change

Schema & API Changes

Security and Privacy

Testing

I don't know how (and if it's necessary for this change, actually) to test an import change like this. But if you have any ideas, let me know!

bessbd commented 4 years ago

@tretinha : thank you for the change! @emlaver : thank you for the review!

I'm about to merge this PR