Skip to content

Commit

Permalink
Merge pull request #526 from fedora-infra/1.1.2
Browse files Browse the repository at this point in the history
Bump the release for v1.1.2
  • Loading branch information
ralphbean authored May 27, 2020
2 parents 8afd7ba + bccfcc7 commit 10f1044
Show file tree
Hide file tree
Showing 11 changed files with 24 additions and 22 deletions.
2 changes: 0 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ matrix:
env: TOXENV=py27
- python: "2.7"
env: TOXENV=m2crypto
- python: "3.4"
env: TOXENV=py34
- python: "3.5"
env: TOXENV=py35
- python: "3.6"
Expand Down
4 changes: 0 additions & 4 deletions doc/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,6 @@ Message Encoding
:undoc-members:
:show-inheritance:

.. autofunction:: fedmsg.encoding.dumps

.. autofunction:: fedmsg.encoding.pretty_dumps

SQLAlchemy Encoding Utilities
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Expand Down
9 changes: 9 additions & 0 deletions doc/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@
Changelog
=========

v1.1.2
======

Bug fixes
---------

* Fix a DOS bug when consuming non-dict JSON messages
(`#514 <https://github.com/fedora-infra/fedmsg/pull/514>`_).

v1.1.1
======

Expand Down
2 changes: 1 addition & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
# The short X.Y version.
version = u'1.1'
# The full version, including alpha/beta/rc tags.
release = u'1.1.1'
release = u'1.1.2'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
4 changes: 2 additions & 2 deletions fedmsg/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -1323,8 +1323,8 @@ def load_config(extra_args=None,

if 'topic_prefix_re' not in config and 'topic_prefix' in config:
# Turn "org.fedoraproject" into "org\.fedoraproject\.[^\W\d_]+"
config['topic_prefix_re'] = config['topic_prefix'].replace('.', '\.')\
+ '\.[^\W\d_]+'
config['topic_prefix_re'] = config['topic_prefix'].replace('.', r'\.')\
+ r'\.[^\W\d_]+'

__cache = config
return config
Expand Down
4 changes: 2 additions & 2 deletions fedmsg/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -475,5 +475,5 @@ def _run_socket(self, sock, name, ep, watched_names=None):
raise ValidationError(msg)

def _close_subs(self, subs):
for subscriber in subs:
subscriber.close()
for subscriber in subs:
subscriber.close()
2 changes: 1 addition & 1 deletion fedmsg/crypto/x509_ng.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ def validate(message, ssldir=None, **config):
try:
ca_certificate, crl = utils.load_certificates(ca_location, crl_location)
_validate_signing_cert(ca_certificate, certificate, crl)
except (IOError, RequestException, X509StoreContextError) as e:
except (IOError, RequestException, X509StoreContextError):
# Maybe the CA/CRL is expired or just rotated, so invalidate the cache and try again
try:
ca_certificate, crl = utils.load_certificates(
Expand Down
2 changes: 1 addition & 1 deletion fedmsg/meta/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def __init__(self, internationalization_callable, **config):
# hardcode a topic_prefix, then the global one is taken from config.
if not self.topic_prefix_re:
self.topic_prefix_re = config['topic_prefix_re']
self.__prefix__ = re.compile('^%s\.(%s)(\.(.*))?$' % (
self.__prefix__ = re.compile(r'^%s\.(%s)(\.(.*))?$' % (
self.topic_prefix_re, self.__name__.lower()))

if self.conglomerators is None:
Expand Down
12 changes: 6 additions & 6 deletions fedmsg/tests/test_meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def setUp(self):
invalidate_cache=True,
)
self.config['topic_prefix'] = 'org.fedoraproject'
self.config['topic_prefix_re'] = '^org\.fedoraproject\.(dev|stg|prod)'
self.config['topic_prefix_re'] = r'^org\.fedoraproject\.(dev|stg|prod)'

@skip_if_fedmsg_meta_FI_is_present
def test_for_no_plugins(self):
Expand Down Expand Up @@ -108,7 +108,7 @@ def setUp(self):
invalidate_cache=True,
)
self.config['topic_prefix'] = 'org.fedoraproject'
self.config['topic_prefix_re'] = '^org\.fedoraproject\.(dev|stg|prod)'
self.config['topic_prefix_re'] = r'^org\.fedoraproject\.(dev|stg|prod)'

class MyGitProcessor(fedmsg.meta.base.BaseProcessor):
__name__ = 'git'
Expand Down Expand Up @@ -141,7 +141,7 @@ def test_processor_handle_empty_subtopic(self):
'topic': 'org.fedoraproject.dev.git',
}
result = self.proc.handle_msg(fake_message, **self.config)
assert result is "", "Proc said it couldn't handle the msg."
assert result == "", "Proc said it couldn't handle the msg."


class Base(unittest.TestCase):
Expand All @@ -167,7 +167,7 @@ def setUp(self):
invalidate_cache=True,
)
self.config['topic_prefix'] = 'org.fedoraproject'
self.config['topic_prefix_re'] = '^org\.fedoraproject\.(dev|stg|prod)'
self.config['topic_prefix_re'] = r'^org\.fedoraproject\.(dev|stg|prod)'
fedmsg.meta.make_processors(**self.config)

self.maxDiff = None
Expand Down Expand Up @@ -402,7 +402,7 @@ def setUp(self):
invalidate_cache=True,
)
self.config['topic_prefix'] = 'org.fedoraproject'
self.config['topic_prefix_re'] = '^org\.fedoraproject\.(dev|stg|prod)'
self.config['topic_prefix_re'] = r'^org\.fedoraproject\.(dev|stg|prod)'
fedmsg.meta.make_processors(**self.config)

# Delete the msg_ids field because it is bulky and I don't want to
Expand Down Expand Up @@ -443,7 +443,7 @@ def setUp(self):
invalidate_cache=True,
)
self.config['topic_prefix'] = 'org.fedoraproject'
self.config['topic_prefix_re'] = '^org\.fedoraproject\.(dev|stg|prod)'
self.config['topic_prefix_re'] = r'^org\.fedoraproject\.(dev|stg|prod)'

self.conglomerator = fedmsg.meta.base.BaseConglomerator

Expand Down
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@

setup(
name='fedmsg',
version='1.1.1',
version='1.1.2',
description="Fedora Messaging Client API",
long_description=long_description,
author='Ralph Bean',
Expand All @@ -120,7 +120,6 @@
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Topic :: System :: Networking',
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = lint,py27,py34,py35,py36,m2crypto,docs
envlist = lint,py27,py35,py36,m2crypto,docs

[testenv]
passenv = TRAVIS TRAVIS_* FEDMSG_NETWORK
Expand Down

0 comments on commit 10f1044

Please sign in to comment.