diff --git a/.craft.yml b/.craft.yml
new file mode 100644
index 000000000..c5193f01e
--- /dev/null
+++ b/.craft.yml
@@ -0,0 +1,9 @@
+---
+minVersion: '0.7.0'
+changelogPolicy: simple
+github:
+ owner: getsentry
+ repo: raven-python
+targets:
+ - name: pypi
+ - name: github
diff --git a/.github/release.yml b/.github/release.yml
deleted file mode 100644
index 9fe7023b6..000000000
--- a/.github/release.yml
+++ /dev/null
@@ -1,3 +0,0 @@
-targets:
- - github
- - pypi
diff --git a/.travis.yml b/.travis.yml
index ebcca66f3..4c6a6467a 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -10,14 +10,19 @@ matrix:
include:
- python: "3.7"
dist: xenial
- sudo: true
- name: Flake8
- python: "3.6"
+ dist: xenial
+ python: "3.7"
install:
- pip install tox
script: tox -e flake8
+ - name: Distribution packages
+ python: "3.6"
+ install: false
+ script: make travis-upload-dist
+
sudo: false
addons:
apt:
diff --git a/Makefile b/Makefile
index 5d40fed6b..186cc05da 100644
--- a/Makefile
+++ b/Makefile
@@ -20,11 +20,23 @@ setup-git:
git config branch.autosetuprebase always
cd .git/hooks && ln -sf ../../hooks/* ./
-publish:
+clean:
rm -rf dist build
+
+publish: clean
python setup.py sdist bdist_wheel upload
+dist: clean
+ python setup.py sdist bdist_wheel
+
+install-zeus-cli:
+ npm install -g @zeus-ci/cli
+
+travis-upload-dist: dist install-zeus-cli
+ zeus upload -t "application/zip+wheel" dist/* \
+ || [[ ! "$(TRAVIS_BRANCH)" =~ ^release/ ]]
+
update-ca:
curl -sSL https://mkcert.org/generate/ -o raven/data/cacert.pem
-.PHONY: bootstrap test lint coverage setup-git publish update-ca
+.PHONY: bootstrap test lint coverage setup-git publish update-ca dist clean install-zeus-cli travis-upload-dist
diff --git a/README.rst b/README.rst
index 143bc7988..817cdfd1d 100644
--- a/README.rst
+++ b/README.rst
@@ -6,6 +6,15 @@
+
+Deprecated for sentry-sdk package
+=================================
+
+**Raven is deprecated** in favor of `Sentry-Python `_.
+
+Feature development and most bugfixes happen exclusively there, as Raven is in maintenance mode.
+
+----
Raven - Sentry for Python
=========================
@@ -33,8 +42,6 @@ Raven - Sentry for Python
Raven is the official legacy Python client for `Sentry`_, officially supports
Python 2.6–2.7 & 3.3–3.7, and runs on PyPy and Google App Engine.
-**This SDK is being phased out for** `Sentry-Python `_.
-
It tracks errors and exceptions that happen during the
execution of your application and provides instant notification with detailed
information needed to prioritize, identify, reproduce and fix each issue.
diff --git a/raven/__init__.py b/raven/__init__.py
index 9a6206494..d6d9347c4 100644
--- a/raven/__init__.py
+++ b/raven/__init__.py
@@ -10,7 +10,7 @@
import os
import os.path
-__all__ = ('VERSION', 'Client', 'get_version')
+__all__ = ('VERSION', 'Client', 'get_version') # noqa
VERSION = '6.10.0'
diff --git a/raven/contrib/tornado/__init__.py b/raven/contrib/tornado/__init__.py
index 766b328d6..f4d6d5e5a 100644
--- a/raven/contrib/tornado/__init__.py
+++ b/raven/contrib/tornado/__init__.py
@@ -167,7 +167,7 @@ def get_sentry_user_info(self):
Data for sentry.interfaces.User
Default implementation only sends `is_authenticated` by checking if
- `tornado.web.RequestHandler.get_current_user` tests postitively for on
+ `tornado.web.RequestHandler.get_current_user` tests positively for on
Truth calue testing
"""
try:
diff --git a/raven/utils/json.py b/raven/utils/json.py
index ef8fe25d1..d1de66d6a 100644
--- a/raven/utils/json.py
+++ b/raven/utils/json.py
@@ -15,6 +15,7 @@
import json
from .basic import is_namedtuple
+from .compat import PY2
try:
@@ -56,11 +57,10 @@ def better_decoder(data):
def dumps(value, **kwargs):
- try:
- return json.dumps(value, cls=BetterJSONEncoder, **kwargs)
- except Exception:
+ if PY2:
kwargs['encoding'] = 'safe-utf-8'
- return json.dumps(value, cls=BetterJSONEncoder, **kwargs)
+
+ return json.dumps(value, cls=BetterJSONEncoder, **kwargs)
def loads(value, **kwargs):
diff --git a/raven/utils/ssl_match_hostname.py b/raven/utils/ssl_match_hostname.py
index 7e2764fe6..7aa8c6223 100644
--- a/raven/utils/ssl_match_hostname.py
+++ b/raven/utils/ssl_match_hostname.py
@@ -26,7 +26,7 @@ def _dnsname_match(dn, hostname, max_wildcards=1):
wildcards = leftmost.count('*')
if wildcards > max_wildcards:
# Issue #17980: avoid denials of service by refusing more
- # than one wildcard per fragment. A survery of established
+ # than one wildcard per fragment. A survey of established
# policy among SSL implementations showed it to be a
# reasonable choice.
raise CertificateError(
diff --git a/scripts/bump-version.sh b/scripts/bump-version.sh
new file mode 100755
index 000000000..5e6e19c3f
--- /dev/null
+++ b/scripts/bump-version.sh
@@ -0,0 +1,20 @@
+#!/bin/bash
+set -eux
+
+SCRIPT_DIR="$( dirname "$0" )"
+cd $SCRIPT_DIR/..
+
+OLD_VERSION="${1}"
+NEW_VERSION="${2}"
+
+echo "Current version: $OLD_VERSION"
+echo "Bumping version: $NEW_VERSION"
+
+function replace() {
+ ! grep "$2" $3
+ perl -i -pe "s/$1/$2/g" $3
+ grep "$2" $3 # verify that replacement was successful
+}
+
+replace "current_version = [0-9.]+" "current_version = $NEW_VERSION" ./.bumpversion.cfg
+replace "VERSION = '[0-9.]+'" "VERSION = '$NEW_VERSION'" ./raven/__init__.py
diff --git a/setup.py b/setup.py
index ef58946be..cbe5248b6 100755
--- a/setup.py
+++ b/setup.py
@@ -128,6 +128,7 @@ def run_tests(self):
zip_safe=False,
extras_require={
'flask': flask_requires,
+ 'sanic': sanic_requires,
'tests': tests_require,
':python_version<"3.2"': ['contextlib2'],
},
diff --git a/tests/contrib/flask/tests.py b/tests/contrib/flask/tests.py
index 593876c46..e7a46f2a6 100644
--- a/tests/contrib/flask/tests.py
+++ b/tests/contrib/flask/tests.py
@@ -148,10 +148,6 @@ def test_get(self):
self.assertEquals(http['data'], {})
self.assertTrue('headers' in http)
headers = http['headers']
- self.assertTrue('Content-Length' in headers, headers.keys())
- self.assertEquals(headers['Content-Length'], '0')
- self.assertTrue('Content-Type' in headers, headers.keys())
- self.assertEquals(headers['Content-Type'], '')
self.assertTrue('Host' in headers, headers.keys())
self.assertEquals(headers['Host'], 'localhost')
env = http['env']
diff --git a/tox.ini b/tox.ini
index 6bcee83de..1358c870a 100644
--- a/tox.ini
+++ b/tox.ini
@@ -10,7 +10,6 @@ envlist =
pypy
flake8
# contrib
- {py35,py36,py37}-django-dev
{py35,py36,py37}-django-{200}
{py27,py35}-django-111
{py27,py34,py35,py36}-django-{18,19,110}
@@ -37,7 +36,6 @@ deps =
django-110: Django>=1.10,<1.11
django-111: Django>=1.11,<1.12
django-200: Django>=2.0,<2.1
- django-dev: git+https://github.com/django/django.git#egg=Django
flask-10: Flask>=0.10,<0.11
flask-11: Flask>=0.11,<0.12
flask-12: Flask>=0.12,<0.13
@@ -80,11 +78,10 @@ commands:
[testenv:flake8]
-basepython = python3.6
+basepython = python3.7
skip_install = true
deps =
flake8
- flake8-docstrings>=0.2.7
flake8-import-order>=0.9
commands =
flake8 raven/ setup.py