Skip to content

deprecation warning with python 3.11 #164

Description

@hannob

Version information

Git snapshot.

Steps to replicate

  1. run "pyzor ping" with PYTHONWARNINGS=d variable set.

Actual result

It shows a deprecation warning about the warn method of the logger and a warning about an unclosed socket:

$ PYTHONWARNINGS=d pyzor ping
/usr/lib/python3.11/site-packages/pyzor/config.py:170: DeprecationWarning: The 'warn' method is deprecated, use 'warning' instead
  log.warn("No accounts are setup.  All commands will be executed by "
/usr/lib/python3.11/site-packages/pyzor/client.py:258: ResourceWarning: unclosed <socket.socket fd=3, family=2, type=2, proto=17, laddr=('0.0.0.0', 44911)>
  response = self.routine(*args, **kwargs)
ResourceWarning: Enable tracemalloc to get the object allocation traceback
public.pyzor.org:24441	(200, 'OK')

Expected result

No warnings.

Other notes

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions