Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes to make it work on macOS Sonoma / Python 3.11 #353

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,6 @@ tmp/

# VS Code
.vscode

# PyCharm
.idea
6 changes: 3 additions & 3 deletions did/plugins/confluence.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
import urllib.parse

import requests
from requests.packages.urllib3.exceptions import InsecureRequestWarning
import urllib3
from urllib3.exceptions import InsecureRequestWarning
from requests_gssapi import DISABLED, HTTPSPNEGOAuth

from did.base import Config, ReportError
Expand Down Expand Up @@ -245,8 +246,7 @@ def session(self):
log.debug("Connecting to {0}".format(self.auth_url))
# Disable SSL warning when ssl_verify is False
if not self.ssl_verify:
requests.packages.urllib3.disable_warnings(
InsecureRequestWarning)
urllib3.disable_warnings(InsecureRequestWarning)
if self.auth_type == "basic":
basic_auth = (self.auth_username, self.auth_password)
response = self._session.get(
Expand Down
5 changes: 3 additions & 2 deletions did/plugins/gitlab.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@

import dateutil
import requests
from requests.packages.urllib3.exceptions import InsecureRequestWarning
import urllib3
from urllib3.exceptions import InsecureRequestWarning

from did.base import Config, ReportError, get_token
from did.stats import Stats, StatsGroup
Expand Down Expand Up @@ -387,7 +388,7 @@ def __init__(self, option, name=None, parent=None, user=None):
except KeyError:
self.ssl_verify = GITLAB_SSL_VERIFY
if not self.ssl_verify:
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
urllib3.disable_warnings(InsecureRequestWarning)
self.gitlab = GitLab(self.url, self.token, self.ssl_verify)
# Create the list of stats
self.stats = [
Expand Down
6 changes: 3 additions & 3 deletions did/plugins/jira.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@

import dateutil.parser
import requests
from requests.packages.urllib3.exceptions import InsecureRequestWarning
import urllib3
from urllib3.exceptions import InsecureRequestWarning
from requests_gssapi import DISABLED, HTTPSPNEGOAuth

from did.base import Config, ReportError, get_token
Expand Down Expand Up @@ -390,8 +391,7 @@ def session(self):
log.debug("Connecting to {0}".format(self.auth_url))
# Disable SSL warning when ssl_verify is False
if not self.ssl_verify:
requests.packages.urllib3.disable_warnings(
InsecureRequestWarning)
urllib3.disable_warnings(InsecureRequestWarning)
if self.auth_type == 'basic':
basic_auth = (self.auth_username, self.auth_password)
response = self._session.get(
Expand Down
2 changes: 1 addition & 1 deletion did/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ def __init__(self, user=None, options=None, config=None):
self.stats = self.configured_plugins(config)
except did.base.ConfigFileError as error:
# Missing config file is OK if building options (--help).
# Otherwise raise the expection to suggest config example.
# Otherwise, raise the exception to suggest config example.
if options is None:
log.debug(error)
log.debug("This is OK for now as we're just building options.")
Expand Down
10 changes: 10 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
certifi==2023.11.17
charset-normalizer==3.3.2
decorator==5.1.1
gssapi==1.8.3
idna==3.6
python-dateutil==2.8.2
requests==2.31.0
requests-gssapi==1.2.3
six==1.16.0
urllib3==2.1.0
2 changes: 2 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
install_requires = [
'python_dateutil',
'requests',
'requests-gssapi',
'urllib3'
]
extras_require = {
'bodhi': ['bodhi-client'],
Expand Down