File: use-system-requests.patch

package info (click to toggle)
python-redmine 2.1.1%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 496 kB
  • sloc: python: 3,176; makefile: 6
file content (31 lines) | stat: -rw-r--r-- 1,103 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Description: Use system version of Python requests
 Do not use the bundled requests version which would make security support
 harder.
Author: Benjamin Drung <benjamin.drung@profitbricks.com>
Bug: https://github.com/maxtepkeev/python-redmine/issues/108#issuecomment-149040488

--- a/setup.py
+++ b/setup.py
@@ -45,6 +45,7 @@
     description='Library for communicating with a Redmine project management application',
     long_description=open('README.rst').read() + '\n\n' + open('CHANGELOG.rst').read(),
     keywords='redmine redmineup redminecrm redminelib easyredmine',
+    install_requires=['requests >= 0.12.1'],
     tests_require=tests_require,
     cmdclass={'test': NoseTests},
     zip_safe=False,
--- a/redminelib/packages/__init__.py
+++ b/redminelib/packages/__init__.py
@@ -1,11 +1,3 @@
 import os
 
-from . import requests
-
-try:
-    external_requests = __import__('requests', level=0)
-except ImportError:
-    pass
-else:
-    if os.getenv('REDMINE_USE_EXTERNAL_REQUESTS') or requests.__build__ < external_requests.__build__:
-        requests = external_requests
+import requests