rackspace/runway

[BUG] Unable to update to latest requests library

jake-skipper opened this issue · 2 comments

Bug Description

Merging the recent dependabot PR for requests library causes the "Functional" CI/CD tests to fail.

Expected Behavior

Functional tests should complete without issue.

Steps To Reproduce

  1. Examine the changes that were made at #2339 ,
  2. Update this library in a local dev environment and attempt functional tests.

Runway version

latest

Installation Type

npm (npm, yarn, etc)

OS / Environment

Any

Anything else?

No response

@jake-skipper Should we use URLLIB instead of requests?

This will reduce external dependencies since it is built into python.
Reading: https://medium.com/@technige/what-does-requests-offer-over-urllib3-in-2022-e6a38d9273d9

eg from a project I work on:

from urllib.request import Request, urlopen, URLError, HTTPError

def send_to_teams(message, webhookurl):
    teams_message = message
    req = Request(webhookurl, data=json.dumps(teams_message).encode("utf-8"),
                  headers={"content-type": "application/json"})
    try:
        response = urlopen(req)
        response.read()
    except HTTPError as e:
        print("Request failed : ", e.code, e.reason)
    except URLError as e:
        print("Server connection failed: ", e.reason, e.reason)

both pending PR for updating requests passed functional tests and were able to be merged. closing this as resolved.