Bug 1594834 - python3-gssapi raises deprecation warning on Python 3.7
Summary: python3-gssapi raises deprecation warning on Python 3.7
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: python3-gssapi
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Robbie Harwood
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-06-25 14:04 UTC by Christian Heimes
Modified: 2018-07-18 20:25 UTC (History)
2 users (show)

Fixed In Version: python-gssapi-1.5.1-1.fc29
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-07-18 20:25:38 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Christian Heimes 2018-06-25 14:04:10 UTC
Description of problem:
Python 3.7 has deprecated ABCs in the collection module. Instead you have to import ABCs from collections.abs.

Version-Release number of selected component (if applicable):
1.3.0, 1.5.0

How reproducible:
Always

Steps to Reproduce:
1. dnf install python37
2. python3.7 -m venv /tmp/venv
3. /tmp/venv/bin/pip install gssapi
4. /tmp/venv/bin/python -Werror::DeprecationWarning -c "import gssapi"

Actual results:
$ /tmp/venv/bin/python -Werror::DeprecationWarning -c "import gssapi"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/tmp/venv/lib64/python3.7/site-packages/gssapi/__init__.py", line 29, in <module>
    from gssapi.raw.types import NameType, RequirementFlag, AddressType  # noqa
  File "/tmp/venv/lib64/python3.7/site-packages/gssapi/raw/__init__.py", line 50, in <module>
    from gssapi.raw.creds import *  # noqa
  File "gssapi/raw/names.pxd", line 3, in init gssapi.raw.creds
  File "gssapi/raw/names.pyx", line 6, in init gssapi.raw.names
  File "gssapi/raw/misc.pyx", line 1, in init gssapi.raw.misc
  File "gssapi/raw/cython_converters.pyx", line 4, in init gssapi.raw.cython_converters
  File "gssapi/raw/types.pyx", line 109, in init gssapi.raw.types
  File "/usr/lib64/python3.7/collections/__init__.py", line 52, in __getattr__
    DeprecationWarning, stacklevel=2)
DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working


Expected results:
no error

Additional info:
The deprecation warning breaks Custodia's tests.

Comment 1 Christian Heimes 2018-06-25 14:18:26 UTC
I opened PR https://github.com/pythongssapi/python-gssapi/pull/154

Comment 2 Robbie Harwood 2018-07-16 22:05:37 UTC
Tell me more about this please.  Why does a deprecation warning break your tests?  It's not in your component, and it's a warning (not an error).

What I'm after specifically: I would like to wait this change until either the next python-gssapi release or python3.8, whichever comes first, and want to know how much pain that will cause you.

Comment 3 Christian Heimes 2018-07-17 15:13:03 UTC
Usually deprecation warnings are just warnings. But Custodia's tests turn all warnings into fatal errors, so we can spot our internal warnings. Also Python 3.7 has turned all DeprecationWarnings from __main__ scripts into user-visible warnings on stderr. Since the deprecation warning in gssapi is triggered on import time, it will may appear on the console. 

See https://docs.python.org/3/whatsnew/3.7.html#whatsnew37-pep565


Note You need to log in before you can comment on or make changes to this bug.