etingof / pysnmp

Python SNMP library
http://snmplabs.com/pysnmp/
BSD 2-Clause "Simplified" License
576 stars 198 forks source link

Deprecation warning due to invalid escape sequences in Python 3.8 #344

Open tirkarthi opened 4 years ago

tirkarthi commented 4 years ago
find . -iname '*.py'  | xargs -P 4 -I{} python -Wall -m py_compile {}

./pysnmp/hlapi/v3arch/asyncore/sync/cmdgen.py:18: DeprecationWarning: invalid escape sequence \*
  """Creates a generator to perform one or more SNMP GET queries.
./pysnmp/hlapi/v3arch/asyncore/sync/cmdgen.py:124: DeprecationWarning: invalid escape sequence \*
  """Creates a generator to perform one or more SNMP SET queries.
./pysnmp/hlapi/v3arch/asyncore/sync/cmdgen.py:231: DeprecationWarning: invalid escape sequence \*
  """Creates a generator to perform one or more SNMP GETNEXT queries.
./pysnmp/hlapi/v3arch/asyncore/sync/cmdgen.py:418: DeprecationWarning: invalid escape sequence \*
  """Creates a generator to perform one or more SNMP GETBULK queries.
./pysnmp/hlapi/v3arch/asyncore/sync/ntforg.py:14: DeprecationWarning: invalid escape sequence \*
  """Creates a generator to send one or more SNMP notifications.
./pysnmp/hlapi/v3arch/asyncore/ntforg.py:23: DeprecationWarning: invalid escape sequence \*
  """Send SNMP notification.
./pysnmp/hlapi/v3arch/asyncore/cmdgen.py:26: DeprecationWarning: invalid escape sequence \*
  """Performs SNMP GET query.
./pysnmp/hlapi/v3arch/asyncore/cmdgen.py:140: DeprecationWarning: invalid escape sequence \*
  """Performs SNMP SET query.
./pysnmp/hlapi/v3arch/asyncore/cmdgen.py:254: DeprecationWarning: invalid escape sequence \*
  """Performs SNMP GETNEXT query.
./pysnmp/hlapi/v3arch/asyncore/cmdgen.py:370: DeprecationWarning: invalid escape sequence \*
  """Performs SNMP GETBULK query.
./pysnmp/hlapi/v3arch/asyncio/ntforg.py:34: DeprecationWarning: invalid escape sequence \*
  """Creates a generator to send SNMP notification.
./pysnmp/hlapi/v3arch/asyncio/cmdgen.py:60: DeprecationWarning: invalid escape sequence \*
  """Creates a generator to perform SNMP GET query.
./pysnmp/hlapi/v3arch/asyncio/cmdgen.py:170: DeprecationWarning: invalid escape sequence \*
  """Creates a generator to perform SNMP SET query.
./pysnmp/hlapi/v3arch/asyncio/cmdgen.py:281: DeprecationWarning: invalid escape sequence \*
  """Creates a generator to perform SNMP GETNEXT query.
./pysnmp/hlapi/v3arch/asyncio/cmdgen.py:397: DeprecationWarning: invalid escape sequence \*
  """Creates a generator to perform SNMP GETBULK query.
./pysnmp/hlapi/v3arch/twisted/ntforg.py:27: DeprecationWarning: invalid escape sequence \*
  """Sends SNMP notification.
./pysnmp/hlapi/v3arch/twisted/cmdgen.py:30: DeprecationWarning: invalid escape sequence \*
  """Performs SNMP GET query.
./pysnmp/hlapi/v3arch/twisted/cmdgen.py:150: DeprecationWarning: invalid escape sequence \*
  """Performs SNMP SET query.
./pysnmp/hlapi/v3arch/twisted/cmdgen.py:270: DeprecationWarning: invalid escape sequence \*
  """Performs SNMP GETNEXT query.
./pysnmp/hlapi/v3arch/twisted/cmdgen.py:406: DeprecationWarning: invalid escape sequence \*
  """Performs SNMP GETBULK query.
./pysnmp/hlapi/v1arch/asyncore/sync/ntforg.py:15: DeprecationWarning: invalid escape sequence \*
  """Creates a generator to send one or more SNMP notifications.
./pysnmp/hlapi/v1arch/asyncore/sync/cmdgen.py:19: DeprecationWarning: invalid escape sequence \*
  """Creates a generator to perform one or more SNMP GET queries.
./pysnmp/hlapi/v1arch/asyncore/sync/cmdgen.py:111: DeprecationWarning: invalid escape sequence \*
  """Creates a generator to perform one or more SNMP SET queries.
./pysnmp/hlapi/v1arch/asyncore/sync/cmdgen.py:203: DeprecationWarning: invalid escape sequence \*
  """Create a generator to perform one or more SNMP GETNEXT queries.
./pysnmp/hlapi/v1arch/asyncore/sync/cmdgen.py:368: DeprecationWarning: invalid escape sequence \*
  """Creates a generator to perform one or more SNMP GETBULK queries.
./pysnmp/hlapi/v1arch/asyncore/ntforg.py:22: DeprecationWarning: invalid escape sequence \*
  """Send SNMP notification.
./pysnmp/hlapi/v1arch/asyncore/cmdgen.py:20: DeprecationWarning: invalid escape sequence \*
  """Initiate SNMP GET query over SNMPv1/v2c.
./pysnmp/hlapi/v1arch/asyncore/cmdgen.py:164: DeprecationWarning: invalid escape sequence \*
  """Initiate SNMP SET query over SNMPv1/v2c.
./pysnmp/hlapi/v1arch/asyncore/cmdgen.py:308: DeprecationWarning: invalid escape sequence \*
  """Initiate SNMP GETNEXT query over SNMPv1/v2c.
./pysnmp/hlapi/v1arch/asyncore/cmdgen.py:453: DeprecationWarning: invalid escape sequence \*
  """Initiate SNMP GETBULK query over SNMPv2c.
./pysnmp/hlapi/v1arch/asyncio/ntforg.py:28: DeprecationWarning: invalid escape sequence \*
  """Creates a generator to send SNMP notification.
./pysnmp/hlapi/v1arch/asyncio/cmdgen.py:29: DeprecationWarning: invalid escape sequence \*
  """Creates a generator to perform SNMP GET query.
./pysnmp/hlapi/v1arch/asyncio/cmdgen.py:156: DeprecationWarning: invalid escape sequence \*
  """Creates a generator to perform SNMP SET query.
./pysnmp/hlapi/v1arch/asyncio/cmdgen.py:283: DeprecationWarning: invalid escape sequence \*
  """Creates a generator to perform SNMP GETNEXT query.
./pysnmp/hlapi/v1arch/asyncio/cmdgen.py:416: DeprecationWarning: invalid escape sequence \*
  """Creates a generator to perform SNMP GETBULK query.
./pysnmp/smi/mibs/SNMPv2-SMI.py:505: DeprecationWarning: invalid escape sequence \*
  """Test the ability to read Managed Object Instance.
./pysnmp/smi/mibs/SNMPv2-SMI.py:575: DeprecationWarning: invalid escape sequence \*
  """Read Managed Object Instance.
./pysnmp/smi/mibs/SNMPv2-SMI.py:701: DeprecationWarning: invalid escape sequence \*
  """Test the ability to read the next Managed Object Instance.
./pysnmp/smi/mibs/SNMPv2-SMI.py:754: DeprecationWarning: invalid escape sequence \*
  """Read the next Managed Object Instance.
./pysnmp/smi/mibs/SNMPv2-SMI.py:803: DeprecationWarning: invalid escape sequence \*
  """Test the ability to modify Managed Object Instance.
./pysnmp/smi/mibs/SNMPv2-SMI.py:861: DeprecationWarning: invalid escape sequence \*
  """Commit new value of the Managed Object Instance.
./pysnmp/smi/mibs/SNMPv2-SMI.py:928: DeprecationWarning: invalid escape sequence \*
  """Finalize Managed Object Instance modification.
./pysnmp/smi/mibs/SNMPv2-SMI.py:994: DeprecationWarning: invalid escape sequence \*
  """Finalize Managed Object Instance modification.
./pysnmp/smi/mibs/SNMPv2-SMI.py:1140: DeprecationWarning: invalid escape sequence \*
  """Read Managed Object Instance.
./pysnmp/smi/mibs/SNMPv2-SMI.py:1206: DeprecationWarning: invalid escape sequence \*
  """Read the next Managed Object Instance.
./pysnmp/smi/mibs/SNMPv2-SMI.py:1277: DeprecationWarning: invalid escape sequence \*
  """Test the ability to modify Managed Object Instance.
./pysnmp/smi/mibs/SNMPv2-SMI.py:1345: DeprecationWarning: invalid escape sequence \*
  """Test the ability to create a Managed Object Instance.
./pysnmp/smi/mibs/SNMPv2-SMI.py:1421: DeprecationWarning: invalid escape sequence \*
  """Create Managed Object Instance.
./pysnmp/smi/mibs/SNMPv2-SMI.py:1484: DeprecationWarning: invalid escape sequence \*
  """Finalize Managed Object Instance creation.
./pysnmp/smi/mibs/SNMPv2-SMI.py:1537: DeprecationWarning: invalid escape sequence \*
  """Undo Managed Object Instance creation.
./pysnmp/smi/mibs/SNMPv2-SMI.py:1676: DeprecationWarning: invalid escape sequence \*
  """Test the ability to read Managed Object Instance.
./pysnmp/smi/mibs/SNMPv2-SMI.py:1727: DeprecationWarning: invalid escape sequence \*
  """Read Managed Object Instance.
./pysnmp/smi/mibs/SNMPv2-SMI.py:1778: DeprecationWarning: invalid escape sequence \*
  """Test the ability to read the next Managed Object Instance.
./pysnmp/smi/mibs/SNMPv2-SMI.py:1842: DeprecationWarning: invalid escape sequence \*
  """Read the next Managed Object Instance.
./pysnmp/smi/mibs/SNMPv2-SMI.py:1900: DeprecationWarning: invalid escape sequence \*
  """Test the ability to modify Managed Object Instance.
./pysnmp/smi/mibs/SNMPv2-SMI.py:1978: DeprecationWarning: invalid escape sequence \*
  """Commit new value of the Managed Object Instance.
./pysnmp/smi/mibs/SNMPv2-SMI.py:2033: DeprecationWarning: invalid escape sequence \*
  """Finalize Managed Object Instance modification.
./pysnmp/smi/mibs/SNMPv2-SMI.py:2088: DeprecationWarning: invalid escape sequence \*
  """Undo Managed Object Instance modification.
./pysnmp/smi/mibs/SNMPv2-SMI.py:2190: DeprecationWarning: invalid escape sequence \*
  """Test the ability to destroy a Managed Object Instance.
./pysnmp/smi/mibs/SNMPv2-SMI.py:2268: DeprecationWarning: invalid escape sequence \*
  """Destroy Managed Object Instance.
./pysnmp/smi/mibs/SNMPv2-SMI.py:2330: DeprecationWarning: invalid escape sequence \*
  """Finalize Managed Object Instance destruction.
./pysnmp/smi/mibs/SNMPv2-SMI.py:2386: DeprecationWarning: invalid escape sequence \*
  """Undo Managed Object Instance destruction.
./pysnmp/smi/mibs/SNMPv2-SMI.py:2613: DeprecationWarning: invalid escape sequence \*
  """Announce mass operation on parent table's row.
./pysnmp/smi/mibs/SNMPv2-SMI.py:2696: DeprecationWarning: invalid escape sequence \*
  """Apply mass operation on extending table's row.
./pysnmp/smi/mibs/SNMPv2-SMI.py:2792: DeprecationWarning: invalid escape sequence \*
  """Apply a management action on all columns
./pysnmp/smi/mibs/SNMPv2-SMI.py:2882: DeprecationWarning: invalid escape sequence \*
  """Check the consistency of all columns.
./pysnmp/smi/mibs/SNMPv2-SMI.py:2952: DeprecationWarning: invalid escape sequence \*
  """Test the ability to create/destroy or modify Managed Object Instance.
./pysnmp/smi/mibs/SNMPv2-SMI.py:3034: DeprecationWarning: invalid escape sequence \*
  """Create/destroy or modify Managed Object Instance.
./pysnmp/smi/mibs/SNMPv2-SMI.py:3124: DeprecationWarning: invalid escape sequence \*
  """Finalize Managed Object Instance modification.
./pysnmp/smi/mibs/SNMPv2-SMI.py:3197: DeprecationWarning: invalid escape sequence \*
  """Undo Managed Object Instance modification.
./pysnmp/smi/instrum.py:218: DeprecationWarning: invalid escape sequence \*
  """Read, modify, create or remove Managed Objects Instances.
./pysnmp/smi/instrum.py:384: DeprecationWarning: invalid escape sequence \*
  """Read Managed Objects Instances.
./pysnmp/smi/instrum.py:438: DeprecationWarning: invalid escape sequence \*
  """Read Managed Objects Instances next to the given ones.
./pysnmp/smi/instrum.py:498: DeprecationWarning: invalid escape sequence \*
  """Create, destroy or modify Managed Objects Instances.
etingof commented 4 years ago

Thanks for rising this! Are you planning to push a PR or should I fix it?

BTW, are you running this check against current master?