Skip to content

Commit

Permalink
Upping version
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Lazar committed Dec 5, 2017
1 parent 5d8a128 commit ce90244
Show file tree
Hide file tree
Showing 7 changed files with 60 additions and 17 deletions.
6 changes: 3 additions & 3 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ Thanks to the following people for their contributions to this project.
* `Lorenz Leitner <https://github.com/LoLei>`_
* `Reshef Elisha <https://github.com/ReshefElisha>`_
* `Ryan Reno <https://github.com/rreno>`_
* `jupart <https://github.com/jupart>`_
* `afloofloo <https://github.com/afloofloo>`_
* `Charles Saracco <https://github.com/crsaracco>`_
* `cmccandless <https://github.com/cmccandless>`_
* `Corey McCandless <https://github.com/cmccandless>`_
* `Danilo G. Baio <https://github.com/dbaio>`_
* `Fabio Alessandro Locati <https://github.com/Fale>`_
* `Hans Roman <https://github.com/snahor>`_
* `Marc Abramowitz <https://github.com/msabramo>`_
* `Hans Roman <https://github.com/snahor>`_
24 changes: 24 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
--------------------
Expand Down
2 changes: 1 addition & 1 deletion rtv.1
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion rtv/__version__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

__version__ = '1.19.0'
__version__ = '1.20.0'
2 changes: 1 addition & 1 deletion rtv/packages/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import sys


__praw_hash__ = 'f3bb10e497e8266faf82892c082b8d32aed6239a'
__praw_hash__ = 'f0373b788356e212be184590741383cc4747a682'
__praw_bundled__ = True


Expand Down
10 changes: 7 additions & 3 deletions rtv/packages/praw/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2310,13 +2310,17 @@ def delete_multireddit(self, name, *args, **kwargs):
"""
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.
Expand Down
31 changes: 23 additions & 8 deletions rtv/packages/praw/objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -1660,6 +1660,13 @@ def clear_all_flair(self):
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('')
Expand Down Expand Up @@ -1694,6 +1701,15 @@ def from_api_response(cls, reddit_session, json_dict):
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:
Expand Down Expand Up @@ -1742,16 +1758,19 @@ def add_subreddit(self, subreddit, _delete=False, *args, **kwargs):
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.
Expand All @@ -1763,7 +1782,6 @@ def copy(self, to_name):
return self.reddit_session.copy_multireddit(self._author, self.name,
to_name)

@restrict_access(scope='subscribe')
def delete(self):
"""Delete this multireddit.
Expand All @@ -1774,7 +1792,6 @@ def delete(self):
"""
return self.reddit_session.delete_multireddit(self.name)

@restrict_access(scope='subscribe')
def edit(self, *args, **kwargs):
"""Edit this multireddit.
Expand All @@ -1786,12 +1803,10 @@ def edit(self, *args, **kwargs):
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.
Expand Down

0 comments on commit ce90244

Please sign in to comment.