Skip to content

Commit cc97dde

Browse files
committed
Merge branch 'master' into add-sender-level-custom-data
2 parents 000ab12 + f3dd23d commit cc97dde

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+1510
-2187
lines changed

.flake8

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[flake8]
2+
# E501: Ignore line length warning
3+
# W503 line break before binary operator
4+
ignore = E501, W503

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
name: Bug report
3+
about: Bug report
4+
title: "<Area of the SDK>: <Short Description of issue>"
5+
labels: needs triage
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
Links to related tickets or other context are welcome here.
24+
25+
**Screenshots**
26+
If applicable, add screenshots to help explain your problem.
27+
28+
**Environment (please complete the following information):**
29+
- OS: [e.g. Linux/Windows/macOS etc]
30+
- SDK version: [e.g. 10.5.2]
31+
- Python version: [e.g. 3.0.0]
32+
33+
**Logs**
34+
If applicable, include relevant logs or error messages here (please use code blocks to format properly).
35+
36+
**Possible Solution**
37+
If you have suggestions for how the issue might be resolved or investigated, please describe them here.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
name: Feature request
3+
about: A new feature for this SDK
4+
title: "<Area of the SDK>: <Short Description of new feature>"
5+
labels: needs triage
6+
assignees: ''
7+
8+
---
9+
10+
**Please describe your new feature request**
11+
A clear and concise description of what the problem is. Example: I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
Links to related tickets or other information are welcome here.
17+
18+
**Describe alternatives you've considered**
19+
A clear and concise description of any alternative solutions or features you've considered.
20+
21+
**Additional context**
22+
Add any other context or screenshots about the feature request here.

.github/dependabot.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
version: 2
2+
updates:
3+
# Python dependencies updates config
4+
- package-ecosystem: "setuptools"
5+
directory: "/"
6+
schedule:
7+
interval: "monthly"
8+
commit-message:
9+
prefix: "chore"
10+
include: "scope"
11+
12+
# Github Actions dependencies updates config
13+
- package-ecosystem: "github-actions"
14+
directory: "/"
15+
schedule:
16+
interval: "monthly"
17+
commit-message:
18+
prefix: "chore"
19+
include: "scope"

.github/workflows/pr.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: "Pull-Request Check"
2+
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
- edited
8+
- synchronize
9+
10+
jobs:
11+
main:
12+
name: Validate PR title
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: amannn/action-semantic-pull-request@v5
16+
id: lint_pr_title
17+
env:
18+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19+
20+
- uses: marocchino/sticky-pull-request-comment@v2
21+
# When the previous steps fails, the workflow would stop. By adding this
22+
# condition you can continue the execution with the populated error message.
23+
if: always() && (steps.lint_pr_title.outputs.error_message != null)
24+
with:
25+
header: pr-title-lint-error
26+
message: |
27+
We require pull request titles to follow the [Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/) and it looks like your proposed title needs to be adjusted.
28+
Details:
29+
```
30+
${{ steps.lint_pr_title.outputs.error_message }}
31+
```
32+
# Delete a previous comment when the issue has been resolved
33+
- if: ${{ steps.lint_pr_title.outputs.error_message == null }}
34+
uses: marocchino/sticky-pull-request-comment@v2
35+
with:
36+
header: pr-title-lint-error
37+
delete: true

.github/workflows/python-checks.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Python Checks
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
8+
jobs:
9+
test:
10+
name: Format, lint & tests
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14.0-alpha.7"]
15+
16+
steps:
17+
- uses: actions/checkout@v3
18+
19+
- name: Set up Python ${{ matrix.python-version }}
20+
uses: actions/setup-python@v4
21+
with:
22+
python-version: ${{ matrix.python-version }}
23+
check-latest: true
24+
25+
- name: Install dependencies
26+
run: |
27+
python -m pip install --upgrade pip
28+
pip install black flake8 coverage .[dev]
29+
30+
- name: Check formatting with black
31+
run: |
32+
black --check python3/
33+
34+
- name: Lint with flake8
35+
run: |
36+
flake8 python3/
37+
38+
- name: Run tests with coverage
39+
env:
40+
RAYGUN_API_KEY: ${{ secrets.RAYGUN_API_KEY }}
41+
run: |
42+
coverage run --source=python3 -m unittest discover python3/tests
43+
coverage report -m

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,6 @@ nosetests.xml
4646

4747
# IntelliJ
4848
.idea
49+
50+
# Python local env
51+
.venv

.travis.yml

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,22 @@
1-
sudo: false
2-
31
language: python
42

53
cache: pip
64

7-
python: ["2.7", "3.2", "3.3", "3.4", "3.5", "3.6", "pypy"]
8-
9-
# Workaround to install Python 3.7
10-
# https://github.com/travis-ci/travis-ci/issues/9815
11-
matrix:
12-
include:
13-
- python: 3.7
14-
dist: xenial
15-
sudo: true
5+
python:
6+
- "3.6"
7+
- "3.7"
8+
- "3.8"
9+
- "3.9"
10+
- "3.10"
11+
- "3.11"
12+
- "3.12"
13+
- "pypy3"
1614

1715
install:
18-
- pip install .[dev]
16+
- python -m pip install coverage .[dev]
1917

2018
script:
21-
# Django 1.8 requires Python 2.7+
22-
- if [[ $TRAVIS_PYTHON_VERSION != 2.6 && $TRAVIS_PYTHON_VERSION == 2* ]]; then coverage run -m unittest2 discover python2; fi
23-
# Coverage/Coveralls has dropped support for Python 3.2
24-
- if [[ $TRAVIS_PYTHON_VERSION != 3.2 && $TRAVIS_PYTHON_VERSION == 3* ]]; then coverage run -m unittest discover python3; fi
25-
- if [[ $TRAVIS_PYTHON_VERSION == 'pypy' ]]; then coverage run -m unittest2 discover python2; fi
26-
# - if [[ $TRAVIS_PYTHON_VERSION == 'pypy3' ]]; then coverage run -m unittest discover python3; fi
19+
- if [[ $TRAVIS_PYTHON_VERSION == 3* || $TRAVIS_PYTHON_VERSION == 'pypy3' ]]; then coverage run --source=python3 -m unittest discover python3/tests; fi
2720

2821
after_success:
2922
coveralls

CHANGELOG.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,35 @@
1+
## 5.0.0 (13/02/24):
2+
Breaking changes:
3+
- Support for Python 2.7 has been dropped
4+
5+
Bug Fixes:
6+
- Removes largest local/global variables in crash payload to ensure payload size limit is not breached (optional)
7+
- We now provide `enforce_payload_size_limit` and `log_payload_size_limit_breaches` as configuration options, both enabled by default
8+
- These control whether the provider will attempt to remove variables if there is an oversized payload and log which variables were removed
9+
10+
## 4.4.0 (11/08/2023):
11+
Features:
12+
- Added `RaygunHandler.from_sender()` factory to construct a `RaygunHandler` instance using an existing `RaygunSender`. This allows for additional configuration of the sender.
13+
- Added a `config` parameter the to Flask and WSGI middleware provider constructors. This also allows for additional configuration of the sender.
14+
- The `RaygunHandler` now adds tags corresponding to the logging level, which now defaults to `logging.ERROR`.
15+
- Errors/exceptions sent via the `RaygunHandler` now have their message overriden by the logged message.
16+
Bug fixes:
17+
- The `RaygunHandler` now attempts to capture `exc_info` from the `record`. This can be obtained if `logger.exception()` is used or if `exc_info=True` is set in the logger call.
18+
- If `exc_info` cannot be obtained by the `RaygunHandler`, it no longer attempts to construct a `RaygunErrorMessage` with `None` values. Instead, it generates a fallback error message using information gathered from the `record`. This is essentially an error with a single stack frame representing the call to the logger.
19+
Quality of life updates:
20+
- Updated `CONTRIBUTING.MD`.
21+
- Got unit tests running again (`django` upgrade).
22+
- Updated `python3/samples/sample.py` and `python3/samples/sampleWithLogging.py`.
23+
- Cleaned up `python3/raygun4py/cli.py`.
24+
125
## 4.3.0 (06/06/2019):
226
Features:
327
- Added a new config option, `transmit_environment_variables`, to control sending any environment variables at all
428
- Added support to `filter_keys` config option for ignoring keys with a simple wildcard approach. See README for more information
529

630
## 4.2.3 (28/03/2019):
731
Bugfixes
8-
- Add request rawData to the build_wsgi_compliant_request utilities to fix a bug where rawData is set manually then overwritten by an empty object.
32+
- Add request `rawData` to the `build_wsgi_compliant_request` utilities to fix a bug where `rawData` is set manually then overwritten by an empty object.
933

1034
## 4.2.2 (23/01/2019):
1135
Bugfixes

CONTRIBUTING.MD

Lines changed: 28 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,32 @@
1-
# Getting Started with Local Development
2-
The following will show you how to get started with local development
1+
## Getting Started with Local Development
2+
Before starting, you'll need to ensure you have the appropriate version of Python installed.
33

4-
## Python 2
5-
1. `cd <project folder> && virtualenv -p <PATH TO PYTHON2> venv2`
6-
1. activate the virtual env
7-
1. `pip install .[dev]`
8-
1. Run tests
9-
```
10-
python -m unittest2 discover python2
11-
```
4+
---
125

13-
## Python 3
14-
1. `cd <project folder> && virtualenv -p <PATH TO PYTHON3> venv3`
15-
1. activate the virtual env
16-
1. `pip install .[dev]`
17-
1. Run tests
6+
# Python 2
7+
1. Install the virtual environment manager: `python2 -m pip install virtualenv`
8+
2. Navigate to the project directory: `cd <project folder>`
9+
3. Create a new virtual environment using Python 2: `python2 -m virtualenv venv2`
10+
4. Activate the virtual environment. On Windows, use `venv2\Scripts\activate`. On Unix or MacOS, use `source venv2/bin/activate`.
11+
5. Install the development dependencies and prepare local package: `python2 -m pip install -e .[dev]`
12+
6. Run tests with the command:
13+
```bash
14+
python2 -m unittest discover python2/tests
1815
```
19-
python -m unittest discover python3
16+
- Remember to deactivate the virtual environment when you're done: `deactivate`
17+
18+
---
19+
20+
# Python 3
21+
1. Install the virtual environment manager: `python3 -m pip install virtualenv`
22+
2. Navigate to the project directory: `cd <project folder>`
23+
3. Create a new virtual environment using Python 3: `python3 -m virtualenv venv3`
24+
4. Activate the virtual environment. On Windows, use `venv3\Scripts\activate`. On Unix or MacOS, use `source venv3/bin/activate`.
25+
5. Install the development dependencies and prepare local package: `python3 -m pip install -e .[dev]`
26+
6. Run tests with the command:
27+
```bash
28+
python3 -m unittest discover python3/tests
2029
```
30+
- Remember to deactivate the virtual environment when you're done: `deactivate`
31+
32+
---

MANIFEST.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
include README.rst
22
include setup.py
3-
recursive-include python2 *.py
43
recursive-include python3 *.py

0 commit comments

Comments
 (0)