Skip to content

Conversation

@mcollins-ttd
Copy link
Contributor

  • Bump major version to 3.
  • Replace urllib with requests. This gives us HTTP connection pooling thanks to requests's use of urllib3.
  • Raise minimum required Python version to 3.8, same as requests.
  • Remove deprecated pkg_resources in favor of importlib.metadata.

Keeping this in alpha for the moment. Two tests are failing, but they were failing before these changes.

[project]
name = "uid2_client"
version = "2.4.6"
version = "3.0.0a1"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this how the version should be bumped, or is it done as part of the pipeline?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its done by the pipeline. It will bump up the major, minor or patch number corresponding to the Github action that's run. To publish an alpha package it will have to done manually

token_generate_input.get_as_json_string().encode())
resp = post(self._base_url, '/v2/token/generate', headers=auth_headers(self._auth_key), data=req)
resp_body = parse_v2_response(self._secret_key, resp.read(), nonce)
resp.raise_for_status()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In future we should probably wrap base_url, auth_key, secret_key in their own class to get better reuse / single responsibility.
That class could have a method that replaces lines 50-54 with a single line (as those lines appear often):

resp_body = v2_request_helper.request('/v2/token/generate', token_generate_input.get_as_json_string())

@asloobq asloobq merged commit cec164b into main Jun 21, 2024
@asloobq asloobq deleted the mkc-UID2-3626-requests branch June 21, 2024 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants