Skip to content

Maintenance update: XMPP migration, Python 3.11+ support, bug fixes#283

Open
smarthomeo wants to merge 4 commits into
dschep:masterfrom
smarthomeo:fix/maintenance-update
Open

Maintenance update: XMPP migration, Python 3.11+ support, bug fixes#283
smarthomeo wants to merge 4 commits into
dschep:masterfrom
smarthomeo:fix/maintenance-update

Conversation

@smarthomeo
Copy link
Copy Markdown

Summary

This PR addresses multiple open issues and modernizes the codebase for Python 3.11+ compatibility.

Bug Fixes

New Features

Infrastructure

  • GitHub Actions CI for Python 3.9, 3.10, 3.11, 3.12
  • All 89 tests passing
  • Removed mock test dependency (now uses stdlib)

Testing

python -m pytest tests/ -v  # 89 passed

All changes are backward-compatible. Existing configs and CLI usage continue to work.

- sleekxmpp is unmaintained and broken on Python 3.9+
- slixmpp is the actively maintained fork
- Updated setup.py dependencies
- Updated tests for async start() method
- All 72 tests passing on Python 3.11
- Tests on Python 3.9, 3.10, 3.11, 3.12
- Runs on push and PR to master
- Replaces defunct Travis CI
…onflict, clean up

Issue dschep#247: Replace  with  in all test files
- Updated 13 test files to use  instead of
- Removed  from test_deps in setup.py

Issue dschep#218: Add timeout=10 to all requests calls
- Added timeout=10 to requests.get()/post() calls in: prowl.py, slack_webhook.py,
  pushalot.py, pushbullet.py, pushjet.py, notifico.py, simplepush.py, pushover.py,
  ntfy_sh.py
- Updated corresponding test assertions to expect timeout=10

Issue dschep#232: Slack backend already uses slack_sdk (no change needed)

Issue dschep#235: No SayThanks badge found in README (no change needed)

Issue dschep#260: Renamed telegram.py to telegram_send.py to avoid naming conflict
  with the python-telegram-bot package
- Added BACKEND_ALIASES dict in ntfy/__init__.py to map 'telegram' → 'telegram_send'
  for backward compatibility with existing configurations
…over TTL/priority, CWD error, --pid flag

- Issue dschep#275: Add NtfyHandler logging.Handler subclass in ntfy/logging.py
  with tests in tests/test_logging.py. Uses ntfy.notify() to send log
  messages via the default backend. Supports custom title and message
  formatting via standard logging.Formatter.

- Issue dschep#273: Move AUTO_NTFY_DONE_IGNORE to yaml config. The
  shell-integration subcommand now reads 'auto_ntfy_done_ignore' from
  ~/.ntfy.yml and exports it as an environment variable so the shell
  integration script can use it instead of the hardcoded default.

- Issue dschep#237: Add --timeout CLI flag that sets notification display
  timeout (seconds). Passed through to backends that support it
  (e.g. Linux desktop notifications via D-Bus).

- Issue dschep#267: Add TTL support for Pushover backend. The 'ttl' parameter
  is passed through to the Pushover API.

- Issue dschep#225: Pushover priority 2 (emergency) already had default
  expire/retry values (expire=86400, retry=30) when not provided.
  Existing tests confirm this behavior.

- Issue dschep#195: Fix crash when launched from non-existent directory by
  wrapping getcwd() in OSError handler, falling back to '[unknown]'.

- Issue dschep#217: Fix --pid argument not recognized when psutil is not
  installed. Moved --pid definition outside the 'if psutil is not None:'
  guard; watch_pid() already handles missing psutil gracefully.

- Fix import conflict: ntfy/logging.py shadows stdlib 'logging' module.
  Changed 'import logging' to 'import logging as _logging' in
  ntfy/__init__.py and updated all references to use _logging.getLogger.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant