Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Bug 702595 - write initial balrog admin client to support nightly bui…

…ld submissions. r=bhearsum
  • Loading branch information...
commit d3004c243cc96fc24b9ed0ec8f88c893f101178f 1 parent 8971952
Rail Aliiev authored

Showing 51 changed files with 7,356 additions and 1 deletion. Show diff stats Hide diff stats

  1. 60  lib/python/balrog/client/api.py
  2. 80  lib/python/balrog/client/cli.py
  3. 2  lib/python/release/platforms.py
  4. 417  lib/python/vendor/requests-0.10.8/HISTORY.rst
  5. 13  lib/python/vendor/requests-0.10.8/LICENSE
  6. 1  lib/python/vendor/requests-0.10.8/MANIFEST.in
  7. 25  lib/python/vendor/requests-0.10.8/NOTICE
  8. 515  lib/python/vendor/requests-0.10.8/PKG-INFO
  9. 76  lib/python/vendor/requests-0.10.8/README.rst
  10. 515  lib/python/vendor/requests-0.10.8/requests.egg-info/PKG-INFO
  11. 41  lib/python/vendor/requests-0.10.8/requests.egg-info/SOURCES.txt
  12. 1  lib/python/vendor/requests-0.10.8/requests.egg-info/dependency_links.txt
  13. 2  lib/python/vendor/requests-0.10.8/requests.egg-info/requires.txt
  14. 1  lib/python/vendor/requests-0.10.8/requests.egg-info/top_level.txt
  15. 33  lib/python/vendor/requests-0.10.8/requests/__init__.py
  16. 116  lib/python/vendor/requests-0.10.8/requests/api.py
  17. 106  lib/python/vendor/requests-0.10.8/requests/async.py
  18. 148  lib/python/vendor/requests-0.10.8/requests/auth.py
  19. 105  lib/python/vendor/requests-0.10.8/requests/compat.py
  20. 48  lib/python/vendor/requests-0.10.8/requests/defaults.py
  21. 32  lib/python/vendor/requests-0.10.8/requests/exceptions.py
  22. 48  lib/python/vendor/requests-0.10.8/requests/hooks.py
  23. 816  lib/python/vendor/requests-0.10.8/requests/models.py
  24. 3  lib/python/vendor/requests-0.10.8/requests/packages/__init__.py
  25. 3  lib/python/vendor/requests-0.10.8/requests/packages/oreos/__init__.py
  26. 24  lib/python/vendor/requests-0.10.8/requests/packages/oreos/core.py
  27. 773  lib/python/vendor/requests-0.10.8/requests/packages/oreos/monkeys.py
  28. 399  lib/python/vendor/requests-0.10.8/requests/packages/oreos/structures.py
  29. 48  lib/python/vendor/requests-0.10.8/requests/packages/urllib3/__init__.py
  30. 131  lib/python/vendor/requests-0.10.8/requests/packages/urllib3/_collections.py
  31. 629  lib/python/vendor/requests-0.10.8/requests/packages/urllib3/connectionpool.py
  32. 67  lib/python/vendor/requests-0.10.8/requests/packages/urllib3/exceptions.py
  33. 74  lib/python/vendor/requests-0.10.8/requests/packages/urllib3/filepost.py
  34. 4  lib/python/vendor/requests-0.10.8/requests/packages/urllib3/packages/__init__.py
  35. 47  lib/python/vendor/requests-0.10.8/requests/packages/urllib3/packages/mimetools_choose_boundary/__init__.py
  36. 372  lib/python/vendor/requests-0.10.8/requests/packages/urllib3/packages/six.py
  37. 61  lib/python/vendor/requests-0.10.8/requests/packages/urllib3/packages/ssl_match_hostname/__init__.py
  38. 138  lib/python/vendor/requests-0.10.8/requests/packages/urllib3/poolmanager.py
  39. 147  lib/python/vendor/requests-0.10.8/requests/packages/urllib3/request.py
  40. 191  lib/python/vendor/requests-0.10.8/requests/packages/urllib3/response.py
  41. 300  lib/python/vendor/requests-0.10.8/requests/sessions.py
  42. 86  lib/python/vendor/requests-0.10.8/requests/status_codes.py
  43. 66  lib/python/vendor/requests-0.10.8/requests/structures.py
  44. 463  lib/python/vendor/requests-0.10.8/requests/utils.py
  45. 5  lib/python/vendor/requests-0.10.8/setup.cfg
  46. 67  lib/python/vendor/requests-0.10.8/setup.py
  47. 1  lib/python/vendorlibs.pth
  48. 21  misc/mozilla-root.crt
  49. 0  python/balrog/__init__.py b/lib/python/balrog/__init__.py
  50. 0  python/balrog/client/__init__.py b/lib/python/balrog/client/__init__.py
  51. 36  scripts/updates/balrog-client.py
60  lib/python/balrog/client/api.py
... ...
@@ -0,0 +1,60 @@
  1
+# TODO: extend API to handle release blobs
  2
+
  3
+import logging
  4
+import requests
  5
+import os
  6
+
  7
+CA_BUNDLE = os.path.join(os.path.dirname(__file__),
  8
+                        '../../../../misc/mozilla-root.crt')
  9
+
  10
+
  11
+class API(object):
  12
+
  13
+    url_template = \
  14
+        '%(api_root)s/releases/%(name)s/builds/%(build_target)s/%(locale)s'
  15
+
  16
+    verify = False
  17
+    auth = None
  18
+
  19
+    def __init__(self, api_root='https://balrog.build.mozilla.org',
  20
+                 auth=None, ca_certs=CA_BUNDLE, timeout=60, raise_exceptions=True):
  21
+        """ Creates an API object which wraps REST API of Balrog server.
  22
+
  23
+        api_root: API root URL of balrog server
  24
+        auth    : a tuple of (username, password) or None
  25
+        ca_certs: CA bundle. It follows python-requests `verify' usage.
  26
+                  If set to False, no SSL verification is done.
  27
+                  If set to True, it tries to load a CA bundle from certifi
  28
+                  module.
  29
+                  If set to string, puthon-requests uses it as a pth to path to
  30
+                  CA bundle.
  31
+        timeout : request timeout
  32
+        raise_exceptions: Sets danger_mode parameter of python-requests config
  33
+                          which controls excpetion raising.
  34
+        """
  35
+        self.api_root = api_root.rstrip('/')
  36
+        self.verify = ca_certs
  37
+        assert isinstance(auth, tuple) or auth == None, \
  38
+               "auth should be set to tuple or None"
  39
+        self.auth = auth
  40
+        self.timeout = timeout
  41
+        self.config = dict(danger_mode=raise_exceptions)
  42
+
  43
+    def request(self, url, data=None, method='GET'):
  44
+        logging.debug('Balrog request to %s' % url)
  45
+        logging.debug('Data sent: %s' % data)
  46
+        return requests.request(method=method, url=url, data=data,
  47
+                                config=self.config, timeout=self.timeout,
  48
+                                verify=self.verify, auth=self.auth)
  49
+
  50
+    def update_build(self, name, product, version, build_target, locale,
  51
+                     details, copy_to=None):
  52
+        url_template_vars = dict(api_root=self.api_root, name=name,
  53
+                                 locale=locale, build_target=build_target)
  54
+        url = self.url_template % url_template_vars
  55
+        data = dict(product=product, version=version,
  56
+                    details=details)
  57
+        if copy_to:
  58
+            data['copy_to'] = copy_to
  59
+
  60
+        return self.request(method='PUT', url=url, data=data)
80  lib/python/balrog/client/cli.py
... ...
@@ -0,0 +1,80 @@
  1
+try:
  2
+    import simplejson as json
  3
+except ImportError:
  4
+    import json
  5
+
  6
+from release.platforms import buildbot2updatePlatforms
  7
+from balrog.client.api import API
  8
+
  9
+
  10
+def get_nightly_blob_name(appName, branch, build_type, suffix, dummy=False):
  11
+    if dummy:
  12
+        branch = '%s-dummy' % branch
  13
+    return '%s-%s-%s-%s' % (appName, branch, build_type, suffix)
  14
+
  15
+
  16
+class NightlyRunner(object):
  17
+
  18
+    build_type = 'nightly'
  19
+    appName = None
  20
+    branch = None
  21
+    build_target = None
  22
+    appVersion = None
  23
+    name = None
  24
+    locale = None
  25
+
  26
+    def __init__(self, buildprops_file, api_root, auth, dummy=False):
  27
+        self.buildbprops_file = buildprops_file
  28
+        self.api_root = api_root
  29
+        self.auth = auth
  30
+        self.dummy = dummy
  31
+
  32
+    def generate_blob(self):
  33
+        fp = open(self.buildbprops_file)
  34
+        bp = json.load(fp)
  35
+        fp.close()
  36
+
  37
+        props = bp['properties']
  38
+        self.build_target = buildbot2updatePlatforms(props['platform'])[0]
  39
+        buildID = props['buildid']
  40
+
  41
+        self.appName = props['appName']
  42
+        self.branch = props['branch']
  43
+        self.appVersion = props['appVersion']
  44
+        self.name = get_nightly_blob_name(self.appName, self.branch,
  45
+                                          self.build_type, buildID, self.dummy)
  46
+        self.locale = props.get('locale', 'en-US')
  47
+        blob = {
  48
+            'appv': self.appVersion,
  49
+            'extv': props.get('extVersion', self.appVersion),
  50
+            'buildID': props['buildid'],
  51
+        }
  52
+        blob['complete'] = {
  53
+            'from': '*',
  54
+            'filesize': props['completeMarSize'],
  55
+            'hashValue': props['completeMarHash'],
  56
+            'fileUrl': props['completeMarUrl']
  57
+        }
  58
+        if props.get('partialMarFilename'):
  59
+            blob['partial'] = {
  60
+                'from': get_nightly_blob_name(self.appName, self.branch,
  61
+                                              self.build_type,
  62
+                                              props['previous_buildid'],
  63
+                                              self.dummy),
  64
+                'filesize': props['partialMarSize'],
  65
+                'hashValue': props['partialMarHash'],
  66
+                'fileUrl': props['partialMarUrl']
  67
+            }
  68
+        return blob
  69
+
  70
+    def run(self):
  71
+        blob = self.generate_blob()
  72
+        blob = json.dumps(blob)
  73
+        api = API(auth=self.auth, api_root=self.api_root)
  74
+        copy_to = [get_nightly_blob_name(
  75
+            self.appName, self.branch, self.build_type, 'latest', self.dummy)]
  76
+        copy_to = repr(copy_to)
  77
+        api.update_build(name=self.name, product=self.appName,
  78
+                         build_target=self.build_target,
  79
+                         version=self.appVersion, locale=self.locale,
  80
+                         details=blob, copy_to=copy_to)
2  lib/python/release/platforms.py
@@ -49,7 +49,7 @@ def shippedlocales2buildbot(platform):
49 49
         return [platform]
50 50
 
51 51
 def buildbot2updatePlatforms(platform):
52  
-    return update_platform_map.get(platform, platform)
  52
+    return update_platform_map.get(platform, [platform])
53 53
 
54 54
 def getPlatformLocales(shipped_locales, platforms):
55 55
     platform_locales = {}
417  lib/python/vendor/requests-0.10.8/HISTORY.rst
Source Rendered
... ...
@@ -0,0 +1,417 @@
  1
+History
  2
+-------
  3
+
  4
+0.10.8 (2012-03-09)
  5
++++++++++++++++++++
  6
+
  7
+* Generate chunked ValueError fix
  8
+* Proxy configuration by environment variables
  9
+* Simplification of iter_lines.
  10
+* New `trust_env` configuration for disabling system/environment hints.
  11
+* Suppress cookie errors.
  12
+
  13
+0.10.7 (2012-03-07)
  14
++++++++++++++++++++
  15
+
  16
+* `encode_uri` = False
  17
+
  18
+0.10.6 (2012-02-25)
  19
++++++++++++++++++++
  20
+
  21
+* Allow '=' in cookies.
  22
+
  23
+0.10.5 (2012-02-25)
  24
++++++++++++++++++++
  25
+
  26
+* Response body with 0 content-length fix.
  27
+* New async.imap.
  28
+* Don't fail on netrc.
  29
+
  30
+
  31
+0.10.4 (2012-02-20)
  32
++++++++++++++++++++
  33
+
  34
+* Honor netrc.
  35
+
  36
+0.10.3 (2012-02-20)
  37
++++++++++++++++++++
  38
+
  39
+* HEAD requests don't follow redirects anymore.
  40
+* raise_for_status() doesn't raise for 3xx anymore.
  41
+* Make Session objects picklable.
  42
+* ValueError for invalid schema URLs.
  43
+
  44
+0.10.2 (2012-01-15)
  45
++++++++++++++++++++
  46
+
  47
+* Vastly improved URL quoting.
  48
+* Additional allowed cookie key values.
  49
+* Attempted fix for "Too many open files" Error
  50
+* Replace unicode errors on first pass, no need for second pass.
  51
+* Append '/' to bare-domain urls before query insertion.
  52
+* Exceptions now inherit from RuntimeError.
  53
+* Binary uploads + auth fix.
  54
+* Bugfixes.
  55
+
  56
+
  57
+0.10.1 (2012-01-23)
  58
++++++++++++++++++++
  59
+
  60
+* PYTHON 3 SUPPORT!
  61
+* Dropped 2.5 Support. (*Backwards Incompatible*)
  62
+
  63
+0.10.0 (2012-01-21)
  64
++++++++++++++++++++
  65
+
  66
+* ``Response.content`` is now bytes-only. (*Backwards Incompatible*)
  67
+* New ``Response.text`` is unicode-only.
  68
+* If no ``Response.encoding`` is specified and ``chardet`` is available, ``Respoonse.text`` will guess an encoding.
  69
+* Default to ISO-8859-1 (Western) encoding for "text" subtypes.
  70
+* Removal of `decode_unicode`. (*Backwards Incompatible*)
  71
+* New multiple-hooks system.
  72
+* New ``Response.register_hook`` for registering hooks within the pipeline.
  73
+* ``Response.url`` is now Unicode.
  74
+
  75
+0.9.3 (2012-01-18)
  76
+++++++++++++++++++
  77
+
  78
+* SSL verify=False bugfix (apparent on windows machines).
  79
+
  80
+0.9.2 (2012-01-18)
  81
+++++++++++++++++++
  82
+
  83
+* Asynchronous async.send method.
  84
+* Support for proper chunk streams with boundaries.
  85
+* session argument for Session classes.
  86
+* Print entire hook tracebacks, not just exception instance.
  87
+* Fix response.iter_lines from pending next line.
  88
+* Fix but in HTTP-digest auth w/ URI having query strings.
  89
+* Fix in Event Hooks section.
  90
+* Urllib3 update.
  91
+
  92
+
  93
+0.9.1 (2012-01-06)
  94
+++++++++++++++++++
  95
+
  96
+* danger_mode for automatic Response.raise_for_status()
  97
+* Response.iter_lines refactor
  98
+
  99
+0.9.0 (2011-12-28)
  100
+++++++++++++++++++
  101
+
  102
+* verify ssl is default.
  103
+
  104
+
  105
+0.8.9 (2011-12-28)
  106
+++++++++++++++++++
  107
+
  108
+* Packaging fix.
  109
+
  110
+
  111
+0.8.8 (2011-12-28)
  112
+++++++++++++++++++
  113
+
  114
+* SSL CERT VERIFICATION!
  115
+* Release of Cerifi: Mozilla's cert list.
  116
+* New 'verify' argument for SSL requests.
  117
+* Urllib3 update.
  118
+
  119
+0.8.7 (2011-12-24)
  120
+++++++++++++++++++
  121
+
  122
+* iter_lines last-line truncation fix
  123
+* Force safe_mode for async requests
  124
+* Handle safe_mode exceptions more consistently
  125
+* Fix iteration on null responses in safe_mode
  126
+
  127
+0.8.6 (2011-12-18)
  128
+++++++++++++++++++
  129
+
  130
+* Socket timeout fixes.
  131
+* Proxy Authorization support.
  132
+
  133
+0.8.5 (2011-12-14)
  134
+++++++++++++++++++
  135
+
  136
+* Response.iter_lines!
  137
+
  138
+0.8.4 (2011-12-11)
  139
+++++++++++++++++++
  140
+
  141
+* Prefetch bugfix.
  142
+* Added license to installed version.
  143
+
  144
+0.8.3 (2011-11-27)
  145
+++++++++++++++++++
  146
+
  147
+* Converted auth system to use simpler callable objects.
  148
+* New session parameter to API methods.
  149
+* Display full URL while logging.
  150
+
  151
+0.8.2 (2011-11-19)
  152
+++++++++++++++++++
  153
+
  154
+* New Unicode decoding system, based on over-ridable `Response.encoding`.
  155
+* Proper URL slash-quote handling.
  156
+* Cookies with ``[``, ``]``, and ``_`` allowed.
  157
+
  158
+0.8.1 (2011-11-15)
  159
+++++++++++++++++++
  160
+
  161
+* URL Request path fix
  162
+* Proxy fix.
  163
+* Timeouts fix.
  164
+
  165
+0.8.0 (2011-11-13)
  166
+++++++++++++++++++
  167
+
  168
+* Keep-alive support!
  169
+* Complete removal of Urllib2
  170
+* Complete removal of Poster
  171
+* Complete removal of CookieJars
  172
+* New ConnectionError raising
  173
+* Safe_mode for error catching
  174
+* prefetch parameter for request methods
  175
+* OPTION method
  176
+* Async pool size throttling
  177
+* File uploads send real names
  178
+* Vendored in urllib3
  179
+
  180
+0.7.6 (2011-11-07)
  181
+++++++++++++++++++
  182
+
  183
+* Digest authentication bugfix (attach query data to path)
  184
+
  185
+0.7.5 (2011-11-04)
  186
+++++++++++++++++++
  187
+
  188
+* Response.content = None if there was an invalid repsonse.
  189
+* Redirection auth handling.
  190
+
  191
+0.7.4 (2011-10-26)
  192
+++++++++++++++++++
  193
+
  194
+* Session Hooks fix.
  195
+
  196
+0.7.3 (2011-10-23)
  197
+++++++++++++++++++
  198
+
  199
+* Digest Auth fix.
  200
+
  201
+
  202
+0.7.2 (2011-10-23)
  203
+++++++++++++++++++
  204
+
  205
+* PATCH Fix.
  206
+
  207
+
  208
+0.7.1 (2011-10-23)
  209
+++++++++++++++++++
  210
+
  211
+* Move away from urllib2 authentication handling.
  212
+* Fully Remove AuthManager, AuthObject, &c.
  213
+* New tuple-based auth system with handler callbacks.
  214
+
  215
+
  216
+0.7.0 (2011-10-22)
  217
+++++++++++++++++++
  218
+
  219
+* Sessions are now the primary interface.
  220
+* Deprecated InvalidMethodException.
  221
+* PATCH fix.
  222
+* New config system (no more global settings).
  223
+
  224
+
  225
+0.6.6 (2011-10-19)
  226
+++++++++++++++++++
  227
+
  228
+* Session parameter bugfix (params merging).
  229
+
  230
+
  231
+0.6.5 (2011-10-18)
  232
+++++++++++++++++++
  233
+
  234
+* Offline (fast) test suite.
  235
+* Session dictionary argument merging.
  236
+
  237
+
  238
+0.6.4 (2011-10-13)
  239
+++++++++++++++++++
  240
+
  241
+* Automatic decoding of unicode, based on HTTP Headers.
  242
+* New ``decode_unicode`` setting.
  243
+* Removal of ``r.read/close`` methods.
  244
+* New ``r.faw`` interface for advanced response usage.*
  245
+* Automatic expansion of parameterized headers.
  246
+
  247
+
  248
+0.6.3 (2011-10-13)
  249
+++++++++++++++++++
  250
+
  251
+* Beautiful ``requests.async`` module, for making async requests w/ gevent.
  252
+
  253
+
  254
+0.6.2 (2011-10-09)
  255
+++++++++++++++++++
  256
+
  257
+* GET/HEAD obeys allow_redirects=False.
  258
+
  259
+
  260
+0.6.1 (2011-08-20)
  261
+++++++++++++++++++
  262
+
  263
+* Enhanced status codes experience ``\o/``
  264
+* Set a maximum number of redirects (``settings.max_redirects``)
  265
+* Full Unicode URL support
  266
+* Support for protocol-less redirects.
  267
+* Allow for arbitrary request types.
  268
+* Bugfixes
  269
+
  270
+
  271
+0.6.0 (2011-08-17)
  272
+++++++++++++++++++
  273
+
  274
+* New callback hook system
  275
+* New persistient sessions object and context manager
  276
+* Transparent Dict-cookie handling
  277
+* Status code reference object
  278
+* Removed Response.cached
  279
+* Added Response.request
  280
+* All args are kwargs
  281
+* Relative redirect support
  282
+* HTTPError handling improvements
  283
+* Improved https testing
  284
+* Bugfixes
  285
+
  286
+
  287
+0.5.1 (2011-07-23)
  288
+++++++++++++++++++
  289
+
  290
+* International Domain Name Support!
  291
+* Access headers without fetching entire body (``read()``)
  292
+* Use lists as dicts for parameters
  293
+* Add Forced Basic Authentication
  294
+* Forced Basic is default authentication type
  295
+* ``python-requests.org`` default User-Agent header
  296
+* CaseInsensitiveDict lower-case caching
  297
+* Response.history bugfix
  298
+
  299
+
  300
+0.5.0 (2011-06-21)
  301
+++++++++++++++++++
  302
+
  303
+* PATCH Support
  304
+* Support for Proxies
  305
+* HTTPBin Test Suite
  306
+* Redirect Fixes
  307
+* settings.verbose stream writing
  308
+* Querystrings for all methods
  309
+* URLErrors (Connection Refused, Timeout, Invalid URLs) are treated as explicity raised
  310
+  ``r.requests.get('hwe://blah'); r.raise_for_status()``
  311
+
  312
+
  313
+0.4.1 (2011-05-22)
  314
+++++++++++++++++++
  315
+
  316
+* Improved Redirection Handling
  317
+* New 'allow_redirects' param for following non-GET/HEAD Redirects
  318
+* Settings module refactoring
  319
+
  320
+
  321
+0.4.0 (2011-05-15)
  322
+++++++++++++++++++
  323
+
  324
+* Response.history: list of redirected responses
  325
+* Case-Insensitive Header Dictionaries!
  326
+* Unicode URLs
  327
+
  328
+
  329
+0.3.4 (2011-05-14)
  330
+++++++++++++++++++
  331
+
  332
+* Urllib2 HTTPAuthentication Recursion fix (Basic/Digest)
  333
+* Internal Refactor
  334
+* Bytes data upload Bugfix
  335
+
  336
+
  337
+
  338
+0.3.3 (2011-05-12)
  339
+++++++++++++++++++
  340
+
  341
+* Request timeouts
  342
+* Unicode url-encoded data
  343
+* Settings context manager and module
  344
+
  345
+
  346
+0.3.2 (2011-04-15)
  347
+++++++++++++++++++
  348
+
  349
+* Automatic Decompression of GZip Encoded Content
  350
+* AutoAuth Support for Tupled HTTP Auth
  351
+
  352
+
  353
+0.3.1 (2011-04-01)
  354
+++++++++++++++++++
  355
+
  356
+* Cookie Changes
  357
+* Response.read()
  358
+* Poster fix
  359
+
  360
+
  361
+0.3.0 (2011-02-25)
  362
+++++++++++++++++++
  363
+
  364
+* Automatic Authentication API Change
  365
+* Smarter Query URL Parameterization
  366
+* Allow file uploads and POST data together
  367
+* New Authentication Manager System
  368
+    - Simpler Basic HTTP System
  369
+    - Supports all build-in urllib2 Auths
  370
+    - Allows for custom Auth Handlers
  371
+
  372
+
  373
+0.2.4 (2011-02-19)
  374
+++++++++++++++++++
  375
+
  376
+* Python 2.5 Support
  377
+* PyPy-c v1.4 Support
  378
+* Auto-Authentication tests
  379
+* Improved Request object constructor
  380
+
  381
+0.2.3 (2011-02-15)
  382
+++++++++++++++++++
  383
+
  384
+* New HTTPHandling Methods
  385
+    - Reponse.__nonzero__ (false if bad HTTP Status)
  386
+    - Response.ok (True if expected HTTP Status)
  387
+    - Response.error (Logged HTTPError if bad HTTP Status)
  388
+    - Reponse.raise_for_status() (Raises stored HTTPError)
  389
+
  390
+
  391
+0.2.2 (2011-02-14)
  392
+++++++++++++++++++
  393
+
  394
+* Still handles request in the event of an HTTPError. (Issue #2)
  395
+* Eventlet and Gevent Monkeypatch support.
  396
+* Cookie Support (Issue #1)
  397
+
  398
+
  399
+0.2.1 (2011-02-14)
  400
+++++++++++++++++++
  401
+
  402
+* Added file attribute to POST and PUT requests for multipart-encode file uploads.
  403
+* Added Request.url attribute for context and redirects
  404
+
  405
+
  406
+0.2.0 (2011-02-14)
  407
+++++++++++++++++++
  408
+
  409
+* Birth!
  410
+
  411
+
  412
+0.0.1 (2011-02-13)
  413
+++++++++++++++++++
  414
+
  415
+* Frustration
  416
+* Conception
  417
+
13  lib/python/vendor/requests-0.10.8/LICENSE
... ...
@@ -0,0 +1,13 @@
  1
+Copyright (c) 2012 Kenneth Reitz.
  2
+
  3
+Permission to use, copy, modify, and/or distribute this software for any
  4
+purpose with or without fee is hereby granted, provided that the above
  5
+copyright notice and this permission notice appear in all copies.
  6
+
  7
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  8
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  9
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  10
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  11
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  12
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  13
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1  lib/python/vendor/requests-0.10.8/MANIFEST.in
... ...
@@ -0,0 +1 @@
  1
+include README.rst LICENSE NOTICE HISTORY.rst test_requests.py
25  lib/python/vendor/requests-0.10.8/NOTICE
... ...
@@ -0,0 +1,25 @@
  1
+Request includes some vendorized python libraries to ease installation.
  2
+
  3
+Urllib3 License
  4
+===============
  5
+
  6
+This is the MIT license: http://www.opensource.org/licenses/mit-license.php
  7
+
  8
+Copyright 2008-2011 Andrey Petrov and contributors (see CONTRIBUTORS.txt),
  9
+Modifications copyright 2022 Kenneth Reitz.
  10
+
  11
+Permission is hereby granted, free of charge, to any person obtaining a copy of this
  12
+software and associated documentation files (the "Software"), to deal in the Software
  13
+without restriction, including without limitation the rights to use, copy, modify, merge,
  14
+publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
  15
+to whom the Software is furnished to do so, subject to the following conditions:
  16
+
  17
+The above copyright notice and this permission notice shall be included in all copies or
  18
+substantial portions of the Software.
  19
+
  20
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
  21
+INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
  22
+PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
  23
+FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  24
+OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  25
+DEALINGS IN THE SOFTWARE.
515  lib/python/vendor/requests-0.10.8/PKG-INFO
... ...
@@ -0,0 +1,515 @@
  1
+Metadata-Version: 1.0
  2
+Name: requests
  3
+Version: 0.10.8
  4
+Summary: Python HTTP for Humans.
  5
+Home-page: http://python-requests.org
  6
+Author: Kenneth Reitz
  7
+Author-email: me@kennethreitz.com
  8
+License: ISC
  9
+Description: Requests: HTTP for Humans
  10
+        =========================
  11
+        
  12
+        .. image:: https://secure.travis-ci.org/kennethreitz/requests.png?branch=develop
  13
+        
  14
+        Requests is an ISC Licensed HTTP library, written in Python, for human
  15
+        beings.
  16
+        
  17
+        Most existing Python modules for sending HTTP requests are extremely
  18
+        verbose and cumbersome. Python's builtin urllib2 module provides most of
  19
+        the HTTP capabilities you should need, but the api is thoroughly broken.
  20
+        It requires an enormous amount of work (even method overrides) to
  21
+        perform the simplest of tasks.
  22
+        
  23
+        Things shouldn't be this way. Not in Python.
  24
+        
  25
+        ::
  26
+        
  27
+            >>> r = requests.get('https://api.github.com', auth=('user', 'pass'))
  28
+            >>> r.status_code
  29
+            204
  30
+            >>> r.headers['content-type']
  31
+            'application/json'
  32
+            >>> r.text
  33
+            ...
  34
+        
  35
+        See `the same code, without Requests <https://gist.github.com/973705>`_.
  36
+        
  37
+        Requests allow you to send  **HEAD**, **GET**, **POST**, **PUT**,
  38
+        **PATCH**, and **DELETE** HTTP requests. You can add headers, form data,
  39
+        multipart files, and parameters with simple Python dictionaries, and access the
  40
+        response data in the same way. It's powered by httplib and `urllib3
  41
+        <https://github.com/shazow/urllib3>`_, but it does all the hard work and crazy
  42
+        hacks for you.
  43
+        
  44
+        
  45
+        Features
  46
+        --------
  47
+        
  48
+        - International Domains and URLs
  49
+        - Keep-Alive & Connection Pooling
  50
+        - Sessions with Cookie Persistence
  51
+        - Browser-style SSL Verification
  52
+        - Basic/Digest Authentication
  53
+        - Elegant Key/Value Cookies
  54
+        - Automatic Decompression
  55
+        - Unicode Response Bodies
  56
+        - Multipart File Uploads
  57
+        - Connection Timeouts
  58
+        
  59
+        
  60
+        Installation
  61
+        ------------
  62
+        
  63
+        To install requests, simply: ::
  64
+        
  65
+            $ pip install requests
  66
+        
  67
+        Or, if you absolutely must: ::
  68
+        
  69
+            $ easy_install requests
  70
+        
  71
+        But, you really shouldn't do that.
  72
+        
  73
+        
  74
+        
  75
+        Contribute
  76
+        ----------
  77
+        
  78
+        #. Check for open issues or open a fresh issue to start a discussion around a feature idea or a bug. There is a Contributor Friendly tag for issues that should be ideal for people who are not very familiar with the codebase yet.
  79
+        #. Fork `the repository`_ on Github to start making your changes to the **develop** branch (or branch off of it).
  80
+        #. Write a test which shows that the bug was fixed or that the feature works as expected.
  81
+        #. Send a pull request and bug the maintainer until it gets merged and published. :) Make sure to add yourself to AUTHORS_.
  82
+        
  83
+        .. _`the repository`: http://github.com/kennethreitz/requests
  84
+        .. _AUTHORS: http://github.com/kennethreitz/requests/blob/master/AUTHORS
  85
+        
  86
+        
  87
+        History
  88
+        -------
  89
+        
  90
+        0.10.8 (2012-03-09)
  91
+        +++++++++++++++++++
  92
+        
  93
+        * Generate chunked ValueError fix
  94
+        * Proxy configuration by environment variables
  95
+        * Simplification of iter_lines.
  96
+        * New `trust_env` configuration for disabling system/environment hints.
  97
+        * Suppress cookie errors.
  98
+        
  99
+        0.10.7 (2012-03-07)
  100
+        +++++++++++++++++++
  101
+        
  102
+        * `encode_uri` = False
  103
+        
  104
+        0.10.6 (2012-02-25)
  105
+        +++++++++++++++++++
  106
+        
  107
+        * Allow '=' in cookies.
  108
+        
  109
+        0.10.5 (2012-02-25)
  110
+        +++++++++++++++++++
  111
+        
  112
+        * Response body with 0 content-length fix.
  113
+        * New async.imap.
  114
+        * Don't fail on netrc.
  115
+        
  116
+        
  117
+        0.10.4 (2012-02-20)
  118
+        +++++++++++++++++++
  119
+        
  120
+        * Honor netrc.
  121
+        
  122
+        0.10.3 (2012-02-20)
  123
+        +++++++++++++++++++
  124
+        
  125
+        * HEAD requests don't follow redirects anymore.
  126
+        * raise_for_status() doesn't raise for 3xx anymore.
  127
+        * Make Session objects picklable.
  128
+        * ValueError for invalid schema URLs.
  129
+        
  130
+        0.10.2 (2012-01-15)
  131
+        +++++++++++++++++++
  132
+        
  133
+        * Vastly improved URL quoting.
  134
+        * Additional allowed cookie key values.
  135
+        * Attempted fix for "Too many open files" Error
  136
+        * Replace unicode errors on first pass, no need for second pass.
  137
+        * Append '/' to bare-domain urls before query insertion.
  138
+        * Exceptions now inherit from RuntimeError.
  139
+        * Binary uploads + auth fix.
  140
+        * Bugfixes.
  141
+        
  142
+        
  143
+        0.10.1 (2012-01-23)
  144
+        +++++++++++++++++++
  145
+        
  146
+        * PYTHON 3 SUPPORT!
  147
+        * Dropped 2.5 Support. (*Backwards Incompatible*)
  148
+        
  149
+        0.10.0 (2012-01-21)
  150
+        +++++++++++++++++++
  151
+        
  152
+        * ``Response.content`` is now bytes-only. (*Backwards Incompatible*)
  153
+        * New ``Response.text`` is unicode-only.
  154
+        * If no ``Response.encoding`` is specified and ``chardet`` is available, ``Respoonse.text`` will guess an encoding.
  155
+        * Default to ISO-8859-1 (Western) encoding for "text" subtypes.
  156
+        * Removal of `decode_unicode`. (*Backwards Incompatible*)
  157
+        * New multiple-hooks system.
  158
+        * New ``Response.register_hook`` for registering hooks within the pipeline.
  159
+        * ``Response.url`` is now Unicode.
  160
+        
  161
+        0.9.3 (2012-01-18)
  162
+        ++++++++++++++++++
  163
+        
  164
+        * SSL verify=False bugfix (apparent on windows machines).
  165
+        
  166
+        0.9.2 (2012-01-18)
  167
+        ++++++++++++++++++
  168
+        
  169
+        * Asynchronous async.send method.
  170
+        * Support for proper chunk streams with boundaries.
  171
+        * session argument for Session classes.
  172
+        * Print entire hook tracebacks, not just exception instance.
  173
+        * Fix response.iter_lines from pending next line.
  174
+        * Fix but in HTTP-digest auth w/ URI having query strings.
  175
+        * Fix in Event Hooks section.
  176
+        * Urllib3 update.
  177
+        
  178
+        
  179
+        0.9.1 (2012-01-06)
  180
+        ++++++++++++++++++
  181
+        
  182
+        * danger_mode for automatic Response.raise_for_status()
  183
+        * Response.iter_lines refactor
  184
+        
  185
+        0.9.0 (2011-12-28)
  186
+        ++++++++++++++++++
  187
+        
  188
+        * verify ssl is default.
  189
+        
  190
+        
  191
+        0.8.9 (2011-12-28)
  192
+        ++++++++++++++++++
  193
+        
  194
+        * Packaging fix.
  195
+        
  196
+        
  197
+        0.8.8 (2011-12-28)
  198
+        ++++++++++++++++++
  199
+        
  200
+        * SSL CERT VERIFICATION!
  201
+        * Release of Cerifi: Mozilla's cert list.
  202
+        * New 'verify' argument for SSL requests.
  203
+        * Urllib3 update.
  204
+        
  205
+        0.8.7 (2011-12-24)
  206
+        ++++++++++++++++++
  207
+        
  208
+        * iter_lines last-line truncation fix
  209
+        * Force safe_mode for async requests
  210
+        * Handle safe_mode exceptions more consistently
  211
+        * Fix iteration on null responses in safe_mode
  212
+        
  213
+        0.8.6 (2011-12-18)
  214
+        ++++++++++++++++++
  215
+        
  216
+        * Socket timeout fixes.
  217
+        * Proxy Authorization support.
  218
+        
  219
+        0.8.5 (2011-12-14)
  220
+        ++++++++++++++++++
  221
+        
  222
+        * Response.iter_lines!
  223
+        
  224
+        0.8.4 (2011-12-11)
  225
+        ++++++++++++++++++
  226
+        
  227
+        * Prefetch bugfix.
  228
+        * Added license to installed version.
  229
+        
  230
+        0.8.3 (2011-11-27)
  231
+        ++++++++++++++++++
  232
+        
  233
+        * Converted auth system to use simpler callable objects.
  234
+        * New session parameter to API methods.
  235
+        * Display full URL while logging.
  236
+        
  237
+        0.8.2 (2011-11-19)
  238
+        ++++++++++++++++++
  239
+        
  240
+        * New Unicode decoding system, based on over-ridable `Response.encoding`.
  241
+        * Proper URL slash-quote handling.
  242
+        * Cookies with ``[``, ``]``, and ``_`` allowed.
  243
+        
  244
+        0.8.1 (2011-11-15)
  245
+        ++++++++++++++++++
  246
+        
  247
+        * URL Request path fix
  248
+        * Proxy fix.
  249
+        * Timeouts fix.
  250
+        
  251
+        0.8.0 (2011-11-13)
  252
+        ++++++++++++++++++
  253
+        
  254
+        * Keep-alive support!
  255
+        * Complete removal of Urllib2
  256
+        * Complete removal of Poster
  257
+        * Complete removal of CookieJars
  258
+        * New ConnectionError raising
  259
+        * Safe_mode for error catching
  260
+        * prefetch parameter for request methods
  261
+        * OPTION method
  262
+        * Async pool size throttling
  263
+        * File uploads send real names
  264
+        * Vendored in urllib3
  265
+        
  266
+        0.7.6 (2011-11-07)
  267
+        ++++++++++++++++++
  268
+        
  269
+        * Digest authentication bugfix (attach query data to path)
  270
+        
  271
+        0.7.5 (2011-11-04)
  272
+        ++++++++++++++++++
  273
+        
  274
+        * Response.content = None if there was an invalid repsonse.
  275
+        * Redirection auth handling.
  276
+        
  277
+        0.7.4 (2011-10-26)
  278
+        ++++++++++++++++++
  279
+        
  280
+        * Session Hooks fix.
  281
+        
  282
+        0.7.3 (2011-10-23)
  283
+        ++++++++++++++++++
  284
+        
  285
+        * Digest Auth fix.
  286
+        
  287
+        
  288
+        0.7.2 (2011-10-23)
  289
+        ++++++++++++++++++
  290
+        
  291
+        * PATCH Fix.
  292
+        
  293
+        
  294
+        0.7.1 (2011-10-23)
  295
+        ++++++++++++++++++
  296
+        
  297
+        * Move away from urllib2 authentication handling.
  298
+        * Fully Remove AuthManager, AuthObject, &c.
  299
+        * New tuple-based auth system with handler callbacks.
  300
+        
  301
+        
  302
+        0.7.0 (2011-10-22)
  303
+        ++++++++++++++++++
  304
+        
  305
+        * Sessions are now the primary interface.
  306
+        * Deprecated InvalidMethodException.
  307
+        * PATCH fix.
  308
+        * New config system (no more global settings).
  309
+        
  310
+        
  311
+        0.6.6 (2011-10-19)
  312
+        ++++++++++++++++++
  313
+        
  314
+        * Session parameter bugfix (params merging).
  315
+        
  316
+        
  317
+        0.6.5 (2011-10-18)
  318
+        ++++++++++++++++++
  319
+        
  320
+        * Offline (fast) test suite.
  321
+        * Session dictionary argument merging.
  322
+        
  323
+        
  324
+        0.6.4 (2011-10-13)
  325
+        ++++++++++++++++++
  326
+        
  327
+        * Automatic decoding of unicode, based on HTTP Headers.
  328
+        * New ``decode_unicode`` setting.
  329
+        * Removal of ``r.read/close`` methods.
  330
+        * New ``r.faw`` interface for advanced response usage.*
  331
+        * Automatic expansion of parameterized headers.
  332
+        
  333
+        
  334
+        0.6.3 (2011-10-13)
  335
+        ++++++++++++++++++
  336
+        
  337
+        * Beautiful ``requests.async`` module, for making async requests w/ gevent.
  338
+        
  339
+        
  340
+        0.6.2 (2011-10-09)
  341
+        ++++++++++++++++++
  342
+        
  343
+        * GET/HEAD obeys allow_redirects=False.
  344
+        
  345
+        
  346
+        0.6.1 (2011-08-20)
  347
+        ++++++++++++++++++
  348
+        
  349
+        * Enhanced status codes experience ``\o/``
  350
+        * Set a maximum number of redirects (``settings.max_redirects``)
  351
+        * Full Unicode URL support
  352
+        * Support for protocol-less redirects.
  353
+        * Allow for arbitrary request types.
  354
+        * Bugfixes
  355
+        
  356
+        
  357
+        0.6.0 (2011-08-17)
  358
+        ++++++++++++++++++
  359
+        
  360
+        * New callback hook system
  361
+        * New persistient sessions object and context manager
  362
+        * Transparent Dict-cookie handling
  363
+        * Status code reference object
  364
+        * Removed Response.cached
  365
+        * Added Response.request
  366
+        * All args are kwargs
  367
+        * Relative redirect support
  368
+        * HTTPError handling improvements
  369
+        * Improved https testing
  370
+        * Bugfixes
  371
+        
  372
+        
  373
+        0.5.1 (2011-07-23)
  374
+        ++++++++++++++++++
  375
+        
  376
+        * International Domain Name Support!
  377
+        * Access headers without fetching entire body (``read()``)
  378
+        * Use lists as dicts for parameters
  379
+        * Add Forced Basic Authentication
  380
+        * Forced Basic is default authentication type
  381
+        * ``python-requests.org`` default User-Agent header
  382
+        * CaseInsensitiveDict lower-case caching
  383
+        * Response.history bugfix
  384
+        
  385
+        
  386
+        0.5.0 (2011-06-21)
  387
+        ++++++++++++++++++
  388
+        
  389
+        * PATCH Support
  390
+        * Support for Proxies
  391
+        * HTTPBin Test Suite
  392
+        * Redirect Fixes
  393
+        * settings.verbose stream writing
  394
+        * Querystrings for all methods
  395
+        * URLErrors (Connection Refused, Timeout, Invalid URLs) are treated as explicity raised
  396
+          ``r.requests.get('hwe://blah'); r.raise_for_status()``
  397
+        
  398
+        
  399
+        0.4.1 (2011-05-22)
  400
+        ++++++++++++++++++
  401
+        
  402
+        * Improved Redirection Handling
  403
+        * New 'allow_redirects' param for following non-GET/HEAD Redirects
  404
+        * Settings module refactoring
  405
+        
  406
+        
  407
+        0.4.0 (2011-05-15)
  408
+        ++++++++++++++++++
  409
+        
  410
+        * Response.history: list of redirected responses
  411
+        * Case-Insensitive Header Dictionaries!
  412
+        * Unicode URLs
  413
+        
  414
+        
  415
+        0.3.4 (2011-05-14)
  416
+        ++++++++++++++++++
  417
+        
  418
+        * Urllib2 HTTPAuthentication Recursion fix (Basic/Digest)
  419
+        * Internal Refactor
  420
+        * Bytes data upload Bugfix
  421
+        
  422
+        
  423
+        
  424
+        0.3.3 (2011-05-12)
  425
+        ++++++++++++++++++
  426
+        
  427
+        * Request timeouts
  428
+        * Unicode url-encoded data
  429
+        * Settings context manager and module
  430
+        
  431
+        
  432
+        0.3.2 (2011-04-15)
  433
+        ++++++++++++++++++
  434
+        
  435
+        * Automatic Decompression of GZip Encoded Content
  436
+        * AutoAuth Support for Tupled HTTP Auth
  437
+        
  438
+        
  439
+        0.3.1 (2011-04-01)
  440
+        ++++++++++++++++++
  441
+        
  442
+        * Cookie Changes
  443
+        * Response.read()
  444
+        * Poster fix
  445
+        
  446
+        
  447
+        0.3.0 (2011-02-25)
  448
+        ++++++++++++++++++
  449
+        
  450
+        * Automatic Authentication API Change
  451
+        * Smarter Query URL Parameterization
  452
+        * Allow file uploads and POST data together
  453
+        * New Authentication Manager System
  454
+            - Simpler Basic HTTP System
  455
+            - Supports all build-in urllib2 Auths
  456
+            - Allows for custom Auth Handlers
  457
+        
  458
+        
  459
+        0.2.4 (2011-02-19)
  460
+        ++++++++++++++++++
  461
+        
  462
+        * Python 2.5 Support
  463
+        * PyPy-c v1.4 Support
  464
+        * Auto-Authentication tests
  465
+        * Improved Request object constructor
  466
+        
  467
+        0.2.3 (2011-02-15)
  468
+        ++++++++++++++++++
  469
+        
  470
+        * New HTTPHandling Methods
  471
+            - Reponse.__nonzero__ (false if bad HTTP Status)