Skip to content

Commit 016ac0b

Browse files
chore: Release 6.0.0 (#121)
1 parent ee33543 commit 016ac0b

File tree

6 files changed

+124
-36
lines changed

6 files changed

+124
-36
lines changed

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
## 6.0.0 (23/05/25):
2+
3+
Breaking changes:
4+
- Filter keys support wildcard matching. See README for details.
5+
6+
Features:
7+
- Added `set_customdata` to `RaygunSender`.
8+
9+
Bug Fixes:
10+
- Ensure `on_grouping_key` always provides a `RaygunMessage` object to the callback.
11+
12+
Internal changes:
13+
- Fix static analysis errors and code formatting.
14+
- GitHub CI setup.
15+
116
## 5.0.0 (13/02/24):
217
Breaking changes:
318
- Support for Python 2.7 has been dropped

CONTRIBUTING.MD

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,9 @@
11
## Getting Started with Local Development
2-
Before starting, you'll need to ensure you have the appropriate version of Python installed.
3-
4-
---
52

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
15-
```
16-
- Remember to deactivate the virtual environment when you're done: `deactivate`
3+
Before starting, you'll need to ensure you have the appropriate version of Python installed.
174

18-
---
5+
### Python 3
196

20-
# Python 3
217
1. Install the virtual environment manager: `python3 -m pip install virtualenv`
228
2. Navigate to the project directory: `cd <project folder>`
239
3. Create a new virtual environment using Python 3: `python3 -m virtualenv venv3`
@@ -29,4 +15,3 @@ python3 -m unittest discover python3/tests
2915
```
3016
- Remember to deactivate the virtual environment when you're done: `deactivate`
3117

32-
---

README.rst

Lines changed: 31 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ raygun4py
88
:target: https://coveralls.io/r/MindscapeHQ/raygun4py?branch=master
99

1010

11-
Official Raygun provider for **Python 2.7**, **Python 3.1+** and **PyPy**
11+
Official Raygun provider for **Python** and **PyPy**
1212

1313
**Python 2.7** is supported in versions <= 4.4.0
1414

@@ -293,14 +293,14 @@ Supports `*` at a position to indicate if you want to filter keys that start, en
293293
+--------------------+---------------+----------------------+
294294
| Filter | Wildcard | Matches |
295295
+====================+===============+======================+
296-
| Start | 'foo*' | foobar, fooqux, foo |
297-
+====================+===============+======================+
298-
| End | '*foo' | barfoo, quxfoo, foo |
299-
+====================+===============+======================+
300-
| Contain | '*foo*' | foobar, tfooqux, foo |
301-
+====================+===============+======================+
302-
| Exact | 'foo' | foo |
303-
+====================+===============+======================+
296+
| Start | `foo*` | foobar, fooqux, foo |
297+
+--------------------+---------------+----------------------+
298+
| End | `*foo` | barfoo, quxfoo, foo |
299+
+--------------------+---------------+----------------------+
300+
| Contain | `*foo*` | foobar, tfooqux, foo |
301+
+--------------------+---------------+----------------------+
302+
| Exact | `foo` | foo |
303+
+--------------------+---------------+----------------------+
304304

305305
+------------------+---------------+--------------------+
306306
| Function | Arguments | Type |
@@ -318,6 +318,21 @@ Provide a list of exception types to ignore here. Any exceptions that are passed
318318

319319
You can mutate the candidate payload by passing in a function that accepts one parameter using this function. This allows you to completely customize what data is sent, immediately before it happens.
320320

321+
.. code:: python
322+
323+
def before_send_mutate_payload(message):
324+
message["newKey"] = "newValue"
325+
return message
326+
327+
def before_send_cancel_send(message):
328+
return None
329+
330+
# Mutate the payload
331+
client.on_before_send(before_send_mutate_payload)
332+
333+
# Cancel the send
334+
client.on_before_send(before_send_cancel_send)
335+
321336
+------------------+---------------+--------------------+
322337
| Function | Arguments | Type |
323338
+==================+===============+====================+
@@ -326,6 +341,13 @@ You can mutate the candidate payload by passing in a function that accepts one p
326341

327342
Pass a callback function to this method to configure custom grouping logic. The callback should take one parameter, an instance of RaygunMessage, and return a string between 1 and 100 characters in length (see 'Custom Grouping Logic' below for more details).
328343

344+
.. code:: python
345+
346+
def group_by_message(message):
347+
return message.get_error().message[:100]
348+
349+
client.on_grouping_key(group_by_message)
350+
329351
+----------------+---------------+--------------------+
330352
| Function | Arguments | Type |
331353
+================+===============+====================+

RELEASING.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# Releasing Raygun4Py
2+
3+
Raygun for Python is published on PyPi as [`raygun4py`](https://pypi.org/project/raygun4py/).
4+
5+
## Semantic versioning
6+
7+
This package follows semantic versioning,
8+
9+
Given a version number MAJOR.MINOR.PATCH (x.y.z), increment the:
10+
11+
- MAJOR version when you make incompatible changes
12+
- MINOR version when you add functionality in a backward compatible manner
13+
- PATCH version when you make backward compatible bug fixes
14+
15+
To learn more about semantic versioning check: https://semver.org/
16+
17+
## Preparing for release
18+
19+
### Release branch
20+
21+
Create a new branch named `release/x.y.z`
22+
where `x.y.z` is the Major, Minor and Patch release numbers.
23+
24+
### Update version
25+
26+
Update the `version` in the `python3/raygun4py/version.py` file.
27+
28+
### Update CHANGELOG.md
29+
30+
Add a new entry in the `CHANGELOG.md` file.
31+
32+
Obtain a list of changes using the following git command:
33+
34+
```
35+
git log --pretty=format:"- %s (%as)"
36+
```
37+
38+
### Commit and open a PR
39+
40+
Commit all the changes into a commit with the message `chore: Release x.y.z` where `x.y.z` is the Major, Minor and Patch release numbers.
41+
42+
Then push the branch and open a new PR, ask the team to review it.
43+
44+
## Publishing
45+
46+
### PR approval
47+
48+
Once the PR has been approved, you can publish the provider.
49+
50+
### Publish to PyPi
51+
52+
1. Activate the local environment created in the `CONTRIBUTING.md` guideline.
53+
2. Install release tools: `python3 -m pip install setuptools twine`.
54+
3. Run `python setup.py sdist`.
55+
4. Check that the file `dist/raygun4py-x.y.z.tar.gz` has been created.
56+
5. Run `twine check dist/raygun4py-x.y.z.tar.gz` and fix any warnings. Repeat the `sdist` command if necessary.
57+
5. Run `twine upload dist/raygun4py-x.x.x.tar.gz` to upload the package.
58+
6. Provide the API token when asked.
59+
7. Now the package is available for customers.
60+
61+
### Merge PR to master
62+
63+
With the PR approved and the package published, squash and merge the PR into `master`.
64+
65+
### Tag and create Github Release
66+
67+
Go to https://github.com/MindscapeHQ/raygun4py/releases and create a new Release.
68+
69+
GitHub will create a tag for you, you don't need to create the tag manually.
70+
71+
You can also generate the release notes automatically.

python3/raygun4py/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
# 1) we don't load dependencies by storing it in __init__.py
33
# 2) we can import it in setup.py for the same reason
44
# 3) we can import it into your module module
5-
__version__ = "5.0.0"
5+
__version__ = "6.0.0"

setup.py

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
1-
import sys
2-
31
from setuptools import setup
42

53
packages = ["raygun4py", "raygun4py.middleware"]
64

7-
base_dir = "python2"
8-
if sys.version_info[0] == 3:
9-
base_dir = "python3"
5+
base_dir = "python3"
106

117
exec(open("%s/raygun4py/version.py" % base_dir).read())
128
requirements = ["jsonpickle >= 4.0.4", "blinker >= 1.3.0", "requests >= 2.9.1"]
@@ -29,8 +25,9 @@
2925
url="https://raygun.com",
3026
author="Raygun",
3127
author_email="[email protected]",
32-
description="Official Raygun provider for Python 2.7 and Python 3+",
28+
description="Official Raygun provider for Python",
3329
long_description=open("README.rst").read(),
30+
long_description_content_type="text/x-rst",
3431
install_requires=requirements,
3532
extras_require={"dev": dev_requirements},
3633
entry_points={"console_scripts": ["raygun4py = raygun4py.cli:main"]},
@@ -39,13 +36,11 @@
3936
"Intended Audience :: Developers",
4037
"License :: OSI Approved :: MIT License",
4138
"Programming Language :: Python",
42-
"Programming Language :: Python :: 3.6",
43-
"Programming Language :: Python :: 3.7",
44-
"Programming Language :: Python :: 3.8",
4539
"Programming Language :: Python :: 3.9",
4640
"Programming Language :: Python :: 3.10",
4741
"Programming Language :: Python :: 3.11",
4842
"Programming Language :: Python :: 3.12",
43+
"Programming Language :: Python :: 3.13",
4944
"Topic :: Communications",
5045
],
5146
)

0 commit comments

Comments
 (0)