Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/maze-runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.5', '3.6', '3.7', '3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
python-version: ['3.5', '3.6', '3.7', '3.8', '3.9', '3.10', '3.11', '3.12', '3.13', '3.14']

steps:
- uses: actions/checkout@v4
Expand Down
11 changes: 1 addition & 10 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,9 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13', '3.14']
os: ['ubuntu-latest']
include:
# Python 3.5 and 3.6 tests skipped pending PLAT-14414
# - python-version: '3.5'
# os: 'ubuntu-22.04'
# pip-trusted-host: 'pypi.python.org pypi.org files.pythonhosted.org'
# - python-version: '3.6'
# os: 'ubuntu-22.04'
- python-version: '3.7'
os: 'ubuntu-22.04'

Expand All @@ -28,8 +22,6 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
env:
PIP_TRUSTED_HOST: ${{ matrix.pip-trusted-host }}

- name: Install dependencies
run: |
Expand All @@ -44,7 +36,6 @@ jobs:
- name: Upload code coverage data
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_FLAG_NAME: ${{ matrix.test-name }}
COVERALLS_PARALLEL: true
run: |
coverage combine
Expand Down
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,9 @@ my_env
venv
.idea
*.iml

#venv
bin
include
lib
pyvenv.cfg
11 changes: 9 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
Changelog
=========

## v4.8.0 (2024-07-08)
## v4.8.1 (2026-01-23)

### Changes

* Amend secondary instance URL to bugsnag.smartbear.com
[#400](https://github.com/bugsnag/bugsnag-python/pull/400)

## v4.8.0 (2025-07-08)

### Enhancements

* Remove deprecated `datetime.utcnow()` method call from utils class
[#394](https://github.com/bugsnag/bugsnag-python/pull/394).
* Set default endpoints based on API key
[#399](https://github.com/bugsnag/bugsnag-php/pull/399)
[#399](https://github.com/bugsnag/bugsnag-python/pull/399)

## v4.7.1 (2024-05-22)

Expand Down
16 changes: 8 additions & 8 deletions bugsnag/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
from bugsnag.delivery import (create_default_delivery,
DEFAULT_ENDPOINT,
DEFAULT_SESSIONS_ENDPOINT,
HUB_ENDPOINT,
HUB_SESSIONS_ENDPOINT)
SECONDARY_ENDPOINT,
SECONDARY_SESSIONS_ENDPOINT)
from bugsnag.uwsgi import warn_if_running_uwsgi_without_threads
from bugsnag.error import Error

Expand All @@ -58,9 +58,9 @@
_sentinel = object()


def _is_hub_api_key(api_key: str) -> bool:
hub_prefix = "00000"
return api_key is not None and api_key.startswith(hub_prefix)
def _is_secondary_api_key(api_key: str) -> bool:
secondary_prefix = "00000"
return api_key is not None and api_key.startswith(secondary_prefix)


class Configuration:
Expand Down Expand Up @@ -599,9 +599,9 @@ def _initialize_endpoints(self, endpoint, session_endpoint, api_key):
self.endpoint is None and
self.session_endpoint is None
):
if _is_hub_api_key(api_key):
self.endpoint = HUB_ENDPOINT
self.session_endpoint = HUB_SESSIONS_ENDPOINT
if _is_secondary_api_key(api_key):
self.endpoint = SECONDARY_ENDPOINT
self.session_endpoint = SECONDARY_SESSIONS_ENDPOINT
else:
self.endpoint = DEFAULT_ENDPOINT
self.session_endpoint = DEFAULT_SESSIONS_ENDPOINT
Expand Down
8 changes: 4 additions & 4 deletions bugsnag/delivery.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@

DEFAULT_ENDPOINT = 'https://notify.bugsnag.com'
DEFAULT_SESSIONS_ENDPOINT = 'https://sessions.bugsnag.com'
HUB_ENDPOINT = 'https://notify.insighthub.smartbear.com'
HUB_SESSIONS_ENDPOINT = 'https://sessions.insighthub.smartbear.com'
SECONDARY_ENDPOINT = 'https://notify.bugsnag.smartbear.com'
SECONDARY_SESSIONS_ENDPOINT = 'https://sessions.bugsnag.smartbear.com'

__all__ = ('default_headers', 'Delivery')

Expand Down Expand Up @@ -86,8 +86,8 @@ def deliver_sessions(self, config, payload: Any, options=None):
"""
if ((config.endpoint != DEFAULT_ENDPOINT and
config.session_endpoint == DEFAULT_SESSIONS_ENDPOINT) or
(config.endpoint != HUB_ENDPOINT and
config.session_endpoint == HUB_SESSIONS_ENDPOINT)):
(config.endpoint != SECONDARY_ENDPOINT and
config.session_endpoint == SECONDARY_SESSIONS_ENDPOINT)):
if not self.sent_session_warning:
warnings.warn('The session endpoint has not been configured. '
'No sessions will be sent to Bugsnag.')
Expand Down
6 changes: 3 additions & 3 deletions features/aws-lambda/handled.feature
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# 3.9 is currently the minimum python version with a lambda runtime
# 3.14 is not supported by the AWS `sam` CLI at the moment
@not-python-3.5 @not-python-3.6 @not-python-3.7 @not-python-3.8 @not-python-3.14
Feature: Handled exceptions in AWS Lambda

# 3.9 is currently the minimum python version with a lambda runtime
@not-python-3.5 @not-python-3.6 @not-python-3.7 @not-python-3.8
Scenario: Handled exceptions are delivered in an AWS Lambda app
Given I run the lambda handler "handled" with the "event.json" event
When I wait to receive an error
Expand All @@ -22,7 +23,6 @@ Scenario: Handled exceptions are delivered in an AWS Lambda app
And the session payload has a valid sessions array
And the sessionCount "sessionsStarted" equals 1

@not-python-3.5 @not-python-3.6 @not-python-3.7 @not-python-3.8
Scenario: Handled exceptions are delivered in an AWS Lambda app when auto_notify is False
Given I run the lambda handler "handled_no_auto_notify" with the "event.json" event
When I wait to receive an error
Expand Down
3 changes: 1 addition & 2 deletions features/aws-lambda/sessions.feature
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@not-python-3.5 @not-python-3.6 @not-python-3.7 @not-python-3.8 @not-python-3.14
Feature: Sessions in AWS Lambda

@not-python-3.5 @not-python-3.6 @not-python-3.7 @not-python-3.8
Scenario: Manually started sessions are delivered in an AWS Lambda app when auto_capture_sessions is True
Given I run the lambda handler "manual_session" with the "event.json" event
When I wait to receive a session
Expand All @@ -9,7 +9,6 @@ Scenario: Manually started sessions are delivered in an AWS Lambda app when auto
And the sessionCount "sessionsStarted" equals 2
And I should receive no errors

@not-python-3.5 @not-python-3.6 @not-python-3.7 @not-python-3.8
Scenario: Manually started sessions are delivered in an AWS Lambda app when auto_capture_sessions is False
Given I run the lambda handler "manual_session_no_auto_capture_sessions" with the "event.json" event
When I wait to receive a session
Expand Down
3 changes: 1 addition & 2 deletions features/aws-lambda/unhandled.feature
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@not-python-3.5 @not-python-3.6 @not-python-3.7 @not-python-3.8 @not-python-3.14
Feature: Unhandled exceptions in AWS Lambda

@not-python-3.5 @not-python-3.6 @not-python-3.7 @not-python-3.8
Scenario: Unhandled exceptions are delivered in an AWS Lambda app
Given I run the lambda handler "unhandled" with the "event.json" event
When I wait to receive an error
Expand All @@ -21,7 +21,6 @@ Scenario: Unhandled exceptions are delivered in an AWS Lambda app
And the session payload has a valid sessions array
And the sessionCount "sessionsStarted" equals 1

@not-python-3.5 @not-python-3.6 @not-python-3.7 @not-python-3.8
Scenario: Unhandled exceptions are not delivered in an AWS Lambda app when auto_detect_errors is False
Given I run the lambda handler "unhandled_no_auto_notify" with the "event.json" event
When I wait to receive a session
Expand Down
12 changes: 6 additions & 6 deletions features/celery.feature
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Scenario Outline: Handled exceptions are delivered in Celery <celery-version>
And the event "severityReason.type" equals "handledException"
And the event "device.runtimeVersions.celery" matches "<celery-version>\.\d+\.\d+"

@not-python-3.11 @not-python-3.12 @not-python-3.13
@not-python-3.11 @not-python-3.12 @not-python-3.13 @not-python-3.14
Examples:
| celery-version |
| 4 |
Expand Down Expand Up @@ -40,7 +40,7 @@ Scenario Outline: Unhandled exceptions are delivered in Celery <celery-version>
And the event "metaData.extra_data.args" string is empty
And the event "metaData.extra_data.kwargs" string is empty

@not-python-3.11 @not-python-3.12 @not-python-3.13
@not-python-3.11 @not-python-3.12 @not-python-3.13 @not-python-3.14
Examples:
| celery-version |
| 4 |
Expand Down Expand Up @@ -72,7 +72,7 @@ Scenario Outline: Task arguments are added to metadata in Celery <celery-version
And the event "metaData.extra_data.kwargs.a" equals "100"
And the event "metaData.extra_data.kwargs.b" equals "200"

@not-python-3.11 @not-python-3.12 @not-python-3.13
@not-python-3.11 @not-python-3.12 @not-python-3.13 @not-python-3.14
Examples:
| celery-version |
| 4 |
Expand Down Expand Up @@ -101,7 +101,7 @@ Scenario Outline: Errors in shared tasks are reported in Celery <celery-version>
And the event "metaData.extra_data.args.1" equals "0"
And the event "metaData.extra_data.kwargs" string is empty

@not-python-3.11 @not-python-3.12 @not-python-3.13
@not-python-3.11 @not-python-3.12 @not-python-3.13 @not-python-3.14
Examples:
| celery-version |
| 4 |
Expand All @@ -116,7 +116,7 @@ Scenario Outline: Successful tasks do not report errors in Celery <celery-versio
When I execute the command "python bugsnag_celery_test_app/queue_task.py add 1 2 3 4 5 6 7 a=8 b=9" in the service "celery-<celery-version>"
Then I should receive no errors

@not-python-3.11 @not-python-3.12 @not-python-3.13
@not-python-3.11 @not-python-3.12 @not-python-3.13 @not-python-3.14
Examples:
| celery-version |
| 4 |
Expand All @@ -131,7 +131,7 @@ Scenario Outline: Successful shared tasks do not report errors in Celery <celery
When I execute the command "python bugsnag_celery_test_app/queue_task.py divide 10 2" in the service "celery-<celery-version>"
Then I should receive no errors

@not-python-3.11 @not-python-3.12 @not-python-3.13
@not-python-3.11 @not-python-3.12 @not-python-3.13 @not-python-3.14
Examples:
| celery-version |
| 4 |
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

setup(
name='bugsnag',
version='4.8.0',
version='4.8.1',
description='Automatic error monitoring for django, flask, etc.',
long_description=__doc__,
author='Simon Maynard',
Expand Down
2 changes: 0 additions & 2 deletions tests/fixtures/django1/.gitignore

This file was deleted.

10 changes: 0 additions & 10 deletions tests/fixtures/django1/manage.py

This file was deleted.

13 changes: 0 additions & 13 deletions tests/fixtures/django1/notes/urls.py

This file was deleted.

102 changes: 0 additions & 102 deletions tests/fixtures/django1/todo/settings.py

This file was deleted.

1 change: 1 addition & 0 deletions tests/fixtures/django5/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.sqlite3
Loading
Loading