(config.py): no verify ssl doesnt parse with python<3.9 #275

Closed
opened 2023-06-26 15:01:28 +02:00 by pvl1 · 2 comments
pvl1 commented 2023-06-26 15:01:28 +02:00 (Migrated from github.com)

19a158ec82/netbox_agent/config.py (L40)

please see the following stackoverflow link for an explanation:
https://stackoverflow.com/a/15008806

for the use:
create a clean python env with python>3.9
use that pip, to install pynetbox packaging jsonargparse slugify netifaces netaddr

for the devs: maybe adapt the lines or bump version requirement
parser.add_argument('--no-feature', dest='feature', action='store_false') parser.set_defaults(feature=True)

I have recently been experimenting (quite a bit) with different python version environments (primarily using conda envs for python then pip) on centos 6-7.9 and ubuntu 14.04+ with 0.7.2

on ubuntu 14.04 my finding are that,
#272 happened with python version 3.4 (perhaps packages where installed with python 3.4, but now python 3.10 is using them?)
and then with python=3.5 i found that jsonargparse couldnt parse the ssl verify disablement configuration. So I had to install python=3.9 in the conda env, and then install with the newly installed pip, pynetbox packaging jsonargparse slugify netifaces netaddr

From what I remember experimenting with centos 6+7, python 3.4 and 3.5 were also causing issues, probably because pip would install more recent versions of deps

https://github.com/Solvik/netbox-agent/blob/19a158ec823bea04d4473e9f829f6d277a1e39a9/netbox_agent/config.py#L40 please see the following stackoverflow link for an explanation: https://stackoverflow.com/a/15008806 ~~for the use: create a clean python env with python>3.9 use that pip, to install pynetbox packaging jsonargparse slugify netifaces netaddr~~ ~~for the devs: maybe adapt the lines or bump version requirement `parser.add_argument('--no-feature', dest='feature', action='store_false') parser.set_defaults(feature=True)`~~ I have recently been experimenting (quite a bit) with different python version environments (primarily using conda envs for python then pip) on centos 6-7.9 and ubuntu 14.04+ with 0.7.2 on ubuntu 14.04 my finding are that, #272 happened with python version 3.4 (perhaps packages where installed with python 3.4, but now python 3.10 is using them?) and then with python=3.5 i found that jsonargparse couldnt parse the ssl verify disablement configuration. So I had to install python=3.9 in the conda env, and then install with the newly installed pip, pynetbox packaging jsonargparse slugify netifaces netaddr From what I remember experimenting with centos 6+7, python 3.4 and 3.5 were also causing issues, probably because pip would install more recent versions of deps
pvl1 commented 2023-06-26 19:22:40 +02:00 (Migrated from github.com)

more detail, look like the latest versions of jsonargparse expect a type=bool which would conflict with the default action, all in that same line 19a158ec82/netbox_agent/config.py (L40C33-L40C33)

more detail, look like the latest versions of jsonargparse expect a type=bool which would conflict with the default action, all in that same line https://github.com/Solvik/netbox-agent/blob/19a158ec823bea04d4473e9f829f6d277a1e39a9/netbox_agent/config.py#L40C33-L40C33
Solvik commented 2023-08-18 17:31:55 +02:00 (Migrated from github.com)

I'm gonna go with an upgrade of jsonargparse in v4 and fix this argument, it will be backward incompatible as I think we'll move to netbox.no_ssl_verify to disable this.

I'm gonna go with an upgrade of jsonargparse in v4 and fix this argument, it will be backward incompatible as I think we'll move to `netbox.no_ssl_verify` to disable this.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: DGNum/netbox-agent#275
No description provided.