Juniper/py-junos-eznc

Support py3.12

chenrui333 opened this issue · 4 comments

There is some build issue with 2.6.8 release build against py3.12

Using pip 23.2.1 from /opt/homebrew/lib/python3.12/site-packages/pip (python 3.12)
Processing /private/tmp/ansible--junos-eznc-20231020-28117-bbknce/junos-eznc-2.6.8
  Preparing metadata (setup.py): started
  Running command python setup.py egg_info
  /private/tmp/ansible--junos-eznc-20231020-28117-bbknce/junos-eznc-2.6.8/versioneer.py:432: SyntaxWarning: invalid escape sequence '\s'
    ] = '''
  Traceback (most recent call last):
    File "<string>", line 2, in <module>
    File "<pip-setuptools-caller>", line 34, in <module>
    File "/private/tmp/ansible--junos-eznc-20231020-28117-bbknce/junos-eznc-2.6.8/setup.py", line 11, in <module>
      version=versioneer.get_version(),
              ^^^^^^^^^^^^^^^^^^^^^^^^
    File "/private/tmp/ansible--junos-eznc-20231020-28117-bbknce/junos-eznc-2.6.8/versioneer.py", line 1524, in get_version
      return get_versions()["version"]
             ^^^^^^^^^^^^^^
    File "/private/tmp/ansible--junos-eznc-20231020-28117-bbknce/junos-eznc-2.6.8/versioneer.py", line 1451, in get_versions
      cfg = get_config_from_root(root)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/private/tmp/ansible--junos-eznc-20231020-28117-bbknce/junos-eznc-2.6.8/versioneer.py", line 346, in get_config_from_root
      parser = configparser.SafeConfigParser()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  AttributeError: module 'configparser' has no attribute 'SafeConfigParser'. Did you mean: 'RawConfigParser'?
  error: subprocess-exited-with-error

full build log, https://github.com/Homebrew/homebrew-core/actions/runs/6582900775/job/17885208567
relates to Homebrew/homebrew-core#151733

Issue is related to the NETCONF library underpinning PyEz. We have been getting around this issue by continuing to use Python 3.11 until ncclient has an update, which was completed in the last few days.

ncclient/ncclient#572

Opened a PR to bump the dependency and resolve the issue.

#1277

In addition to #1277, this repo also needs to update the vendored versioneer.py for the same reason as the linked ncclient issue: #1278

It would be more than awesome to run this software on the current Python software (3.12) instead of 3.9 or older which is nearly EoE: https://devguide.python.org/versions/

PyEZ support python 3.10 and above