Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Backports:SLE-15-SP1:Update
python-pynamodb
no_vendored_requests.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File no_vendored_requests.patch of Package python-pynamodb
From debdc3e672d0ef67bc326f29d10f3c7bd4ce7159 Mon Sep 17 00:00:00 2001 From: Todd <toddrme2178@gmail.com> Date: Thu, 29 Nov 2018 12:03:02 -0500 Subject: [PATCH 1/4] Allow using system requests Some downstreams change botocore to use the system's built-in requests rather than the vendored version. --- pynamodb/settings.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pynamodb/settings.py b/pynamodb/settings.py index 32babe1b..67686ab5 100644 --- a/pynamodb/settings.py +++ b/pynamodb/settings.py @@ -3,7 +3,10 @@ import os from os import getenv -from botocore.vendored import requests +try: + from botocore.vendored import requests +except ImportError: + import requests log = logging.getLogger(__name__) From a351bfa1c765bbab806710697a2fb7061abcec63 Mon Sep 17 00:00:00 2001 From: Todd <toddrme2178@gmail.com> Date: Thu, 29 Nov 2018 12:05:16 -0500 Subject: [PATCH 2/4] Allow using system requests --- pynamodb/connection/base.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pynamodb/connection/base.py b/pynamodb/connection/base.py index f835293b..0ff554c7 100644 --- a/pynamodb/connection/base.py +++ b/pynamodb/connection/base.py @@ -16,10 +16,15 @@ from botocore.client import ClientError from botocore.exceptions import BotoCoreError from botocore.session import get_session -from botocore.vendored import requests -from botocore.vendored.requests import Request from six.moves import range +try: + from botocore.vendored import requests + from botocore.vendored.requests import Request +except ImportError: + import requests + from requests import Request + from pynamodb.compat import NullHandler from pynamodb.connection.util import pythonic from pynamodb.constants import ( From 1a88b73f766e01b37b8c15d506b583d610fd394a Mon Sep 17 00:00:00 2001 From: Todd <toddrme2178@gmail.com> Date: Thu, 29 Nov 2018 12:06:31 -0500 Subject: [PATCH 3/4] Allow using system requests --- pynamodb/tests/test_base_connection.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pynamodb/tests/test_base_connection.py b/pynamodb/tests/test_base_connection.py index b9b33fa0..b7aa9ec6 100644 --- a/pynamodb/tests/test_base_connection.py +++ b/pynamodb/tests/test_base_connection.py @@ -7,7 +7,6 @@ from pynamodb.compat import CompatTestCase as TestCase from pynamodb.connection import Connection from pynamodb.connection.base import MetaTable -from botocore.vendored import requests from pynamodb.exceptions import (VerboseClientError, TableError, DeleteError, UpdateError, PutError, GetError, ScanError, QueryError, TableDoesNotExist) from pynamodb.constants import ( @@ -23,6 +22,10 @@ else: from mock import patch import mock +try: + from botocore.vendored import requests +except ImportError: + import requests PATCH_METHOD = 'pynamodb.connection.Connection._make_api_call' From cc9754f8077f79366411fb7c68f1fe0984bd77e2 Mon Sep 17 00:00:00 2001 From: Todd <toddrme2178@gmail.com> Date: Thu, 29 Nov 2018 12:07:12 -0500 Subject: [PATCH 4/4] Allow using system requests --- pynamodb/tests/test_model.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pynamodb/tests/test_model.py b/pynamodb/tests/test_model.py index 9d6775e1..1b4eb7c9 100644 --- a/pynamodb/tests/test_model.py +++ b/pynamodb/tests/test_model.py @@ -9,9 +9,13 @@ import six from botocore.client import ClientError -from botocore.vendored import requests import pytest +try: + from botocore.vendored import requests +except ImportError: + import requests + from pynamodb.compat import CompatTestCase as TestCase from pynamodb.tests.deep_eq import deep_eq from pynamodb.connection.util import pythonic
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor