diff --git a/AUTHORS.rst b/AUTHORS.rst index b2cce2f..dc4c557 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -27,10 +27,10 @@ Thanks to the following people for their contributions to this project. * `Lorenz Leitner `_ * `Reshef Elisha `_ * `Ryan Reno `_ +* `jupart `_ * `afloofloo `_ * `Charles Saracco `_ -* `cmccandless `_ +* `Corey McCandless `_ * `Danilo G. Baio `_ * `Fabio Alessandro Locati `_ -* `Hans Roman `_ -* `Marc Abramowitz `_ \ No newline at end of file +* `Hans Roman `_ \ No newline at end of file diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 286284c..c4de868 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -2,6 +2,7 @@ RTV Changelog ============= +.. _1.20.0: http://github.com/michael-lazar/rtv/releases/tag/v1.20.0 .. _1.19.0: http://github.com/michael-lazar/rtv/releases/tag/v1.19.0 .. _1.18.0: http://github.com/michael-lazar/rtv/releases/tag/v1.18.0 .. _1.17.1: http://github.com/michael-lazar/rtv/releases/tag/v1.17.1 @@ -31,6 +32,29 @@ RTV Changelog .. _1.2.1: http://github.com/michael-lazar/rtv/releases/tag/v1.2.1 .. _1.2: http://github.com/michael-lazar/rtv/releases/tag/v1.2 +-------------------- +1.20.0_ (2017-12-05) +-------------------- + +Features + +* Text piped to the ``$PAGER`` will now wrap on word / sentence breaks. +* New MIME parsers have been added for liveleak.com and worldstarhiphop.com. + +Bugfixes + +* Fixed a regression where text from the web browser's stdout/stderr was + being sent to the terminal window. +* Fixed crashing on startup when the terminal doesn't support colors. +* Fixed broken text formatting when running inside of emacs ``term``. + +Codebase + +* Dropped support for python 3.3 because it's no longer supported upstream + by **pytest**. The application will still install through pip but will no + longer be tested. +* Added a text logo to the README. + -------------------- 1.19.0_ (2017-10-24) -------------------- diff --git a/rtv.1 b/rtv.1 index d12c145..3cd8a02 100644 --- a/rtv.1 +++ b/rtv.1 @@ -1,4 +1,4 @@ -.TH "RTV" "1" "October 24, 2017" "Version 1.19.0" "Usage and Commands" +.TH "RTV" "1" "December 05, 2017" "Version 1.20.0" "Usage and Commands" .SH NAME RTV - Reddit Terminal Viewer .SH SYNOPSIS diff --git a/rtv/__version__.py b/rtv/__version__.py index 9f0aedb..5e44d16 100644 --- a/rtv/__version__.py +++ b/rtv/__version__.py @@ -1,4 +1,4 @@ # -*- coding: utf-8 -*- from __future__ import unicode_literals -__version__ = '1.19.0' +__version__ = '1.20.0' diff --git a/rtv/packages/__init__.py b/rtv/packages/__init__.py index 4932326..91663bf 100644 --- a/rtv/packages/__init__.py +++ b/rtv/packages/__init__.py @@ -10,7 +10,7 @@ from __future__ import absolute_import import sys -__praw_hash__ = 'f3bb10e497e8266faf82892c082b8d32aed6239a' +__praw_hash__ = 'f0373b788356e212be184590741383cc4747a682' __praw_bundled__ = True diff --git a/rtv/packages/praw/__init__.py b/rtv/packages/praw/__init__.py index 0c12d9c..f2215fc 100644 --- a/rtv/packages/praw/__init__.py +++ b/rtv/packages/praw/__init__.py @@ -2310,13 +2310,17 @@ class MultiredditMixin(AuthenticatedReddit): """ url = self.config['multireddit_about'].format(user=self.user.name, multi=name) - self.http.headers['x-modhash'] = self.modhash + + # The modhash isn't necessary for OAuth requests + if not self._use_oauth: + self.http.headers['x-modhash'] = self.modhash + try: self.request(url, data={}, method='DELETE', *args, **kwargs) finally: - del self.http.headers['x-modhash'] + if not self._use_oauth: + del self.http.headers['x-modhash'] - @decorators.restrict_access(scope='subscribe') def edit_multireddit(self, *args, **kwargs): """Edit a multireddit, or create one if it doesn't already exist. diff --git a/rtv/packages/praw/objects.py b/rtv/packages/praw/objects.py index f308938..b5cd607 100644 --- a/rtv/packages/praw/objects.py +++ b/rtv/packages/praw/objects.py @@ -1660,6 +1660,13 @@ class Subreddit(Messageable, Refreshable): class Multireddit(Refreshable): """A class for users' Multireddits.""" + # 2017-11-13 + # Several of the @restrict_access decorators have been removed here, + # because they were duplicated in the corresponding reddit_session + # methods and raised assertion errors. The is the same category of + # bug as this issue: + # https://github.com/praw-dev/praw/issues/477 + # Generic listing selectors get_controversial = _get_sorter('controversial') get_hot = _get_sorter('') @@ -1694,6 +1701,15 @@ class Multireddit(Refreshable): def __init__(self, reddit_session, author=None, name=None, json_dict=None, fetch=False, **kwargs): """Construct an instance of the Multireddit object.""" + + # When get_my_multireddits is called, we extract the author + # and multireddit name from the path. A trailing forward + # slash was recently added to the path string in the API + # response, the needs to be removed to fix the code. + # path = "/user/redditor/m/multi/" + if json_dict and json_dict['path']: + json_dict['path'] = json_dict['path'].rstrip('/') + author = six.text_type(author) if author \ else json_dict['path'].split('/')[-3] if not name: @@ -1742,16 +1758,19 @@ class Multireddit(Refreshable): url = self.reddit_session.config['multireddit_add'].format( user=self._author, multi=self.name, subreddit=subreddit) method = 'DELETE' if _delete else 'PUT' - self.reddit_session.http.headers['x-modhash'] = \ - self.reddit_session.modhash + # The modhash isn't necessary for OAuth requests + if not self.reddit_session._use_oauth: + self.reddit_session.http.headers['x-modhash'] = \ + self.reddit_session.modhash data = {'model': dumps({'name': subreddit})} try: self.reddit_session.request(url, data=data, method=method, *args, **kwargs) finally: - del self.reddit_session.http.headers['x-modhash'] + # The modhash isn't necessary for OAuth requests + if not self.reddit_session._use_oauth: + del self.reddit_session.http.headers['x-modhash'] - @restrict_access(scope='subscribe') def copy(self, to_name): """Copy this multireddit. @@ -1763,7 +1782,6 @@ class Multireddit(Refreshable): return self.reddit_session.copy_multireddit(self._author, self.name, to_name) - @restrict_access(scope='subscribe') def delete(self): """Delete this multireddit. @@ -1774,7 +1792,6 @@ class Multireddit(Refreshable): """ return self.reddit_session.delete_multireddit(self.name) - @restrict_access(scope='subscribe') def edit(self, *args, **kwargs): """Edit this multireddit. @@ -1786,12 +1803,10 @@ class Multireddit(Refreshable): return self.reddit_session.edit_multireddit(name=self.name, *args, **kwargs) - @restrict_access(scope='subscribe') def remove_subreddit(self, subreddit, *args, **kwargs): """Remove a subreddit from the user's multireddit.""" return self.add_subreddit(subreddit, True, *args, **kwargs) - @restrict_access(scope='subscribe') def rename(self, new_name, *args, **kwargs): """Rename this multireddit.