[Python-modules-commits] [prawcore] 03/07: Import prawcore_0.13.0.orig.tar.gz

Josué Ortega josue at moszumanska.debian.org
Sun Jan 28 22:09:53 UTC 2018


This is an automated email from the git hooks/post-receive script.

josue pushed a commit to branch master
in repository prawcore.

commit 065ae9326a81adea6817a56c840de40b73d870ed
Author: Josue Ortega <josue at debian.org>
Date:   Sun Jan 28 15:59:31 2018 -0600

    Import prawcore_0.13.0.orig.tar.gz
---
 PKG-INFO                   | 2 +-
 prawcore.egg-info/PKG-INFO | 2 +-
 prawcore/const.py          | 2 +-
 prawcore/exceptions.py     | 4 ++++
 prawcore/sessions.py       | 4 +++-
 5 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/PKG-INFO b/PKG-INFO
index aa9255c..879a78e 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: prawcore
-Version: 0.12.0
+Version: 0.13.0
 Summary: Low-level communication layer for PRAW 4+.
 Home-page: https://github.com/praw-dev/prawcore
 Author: Bryce Boe
diff --git a/prawcore.egg-info/PKG-INFO b/prawcore.egg-info/PKG-INFO
index aa9255c..879a78e 100644
--- a/prawcore.egg-info/PKG-INFO
+++ b/prawcore.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: prawcore
-Version: 0.12.0
+Version: 0.13.0
 Summary: Low-level communication layer for PRAW 4+.
 Home-page: https://github.com/praw-dev/prawcore
 Author: Bryce Boe
diff --git a/prawcore/const.py b/prawcore/const.py
index 35cb6cb..ed082d4 100644
--- a/prawcore/const.py
+++ b/prawcore/const.py
@@ -1,7 +1,7 @@
 """Constants for the prawcore package."""
 import os
 
-__version__ = '0.12.0'
+__version__ = '0.13.0'
 
 ACCESS_TOKEN_PATH = '/api/v1/access_token'
 AUTHORIZATION_PATH = '/api/v1/authorize'
diff --git a/prawcore/exceptions.py b/prawcore/exceptions.py
index 735faa7..ce663db 100644
--- a/prawcore/exceptions.py
+++ b/prawcore/exceptions.py
@@ -93,6 +93,10 @@ class InvalidToken(ResponseException):
     """Indicate that the request used an invalid access token."""
 
 
+class UnavailableForLegalReasons(ResponseException):
+    """Indicate that the requested URL is unavilable due to legal reasons."""
+
+
 class NotFound(ResponseException):
     """Indicate that the requested URL was not found."""
 
diff --git a/prawcore/sessions.py b/prawcore/sessions.py
index 68d29e5..e14ddf0 100644
--- a/prawcore/sessions.py
+++ b/prawcore/sessions.py
@@ -12,7 +12,7 @@ from .auth import BaseAuthorizer
 from .rate_limit import RateLimiter
 from .exceptions import (BadJSON, BadRequest, Conflict, InvalidInvocation,
                          NotFound, Redirect, RequestException, ServerError,
-                         TooLarge)
+                         TooLarge, UnavailableForLegalReasons)
 from .util import authorization_error_class
 
 log = logging.getLogger(__package__)
@@ -36,6 +36,8 @@ class Session(object):
                          codes['request_entity_too_large']: TooLarge,
                          codes['service_unavailable']: ServerError,
                          codes['unauthorized']: authorization_error_class,
+                         codes['unavailable_for_legal_reasons']:
+                         UnavailableForLegalReasons,
                          # CloudFlare status (not named in requests)
                          520: ServerError,
                          522: ServerError}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/prawcore.git



More information about the Python-modules-commits mailing list