webchanges 3.31.1__tar.gz → 3.31.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. {webchanges-3.31.1/webchanges.egg-info → webchanges-3.31.3}/PKG-INFO +17 -19
  2. {webchanges-3.31.1 → webchanges-3.31.3}/README.rst +4 -5
  3. {webchanges-3.31.1 → webchanges-3.31.3}/pyproject.toml +12 -13
  4. {webchanges-3.31.1 → webchanges-3.31.3}/webchanges/__init__.py +1 -1
  5. {webchanges-3.31.1 → webchanges-3.31.3}/webchanges/jobs.py +13 -11
  6. {webchanges-3.31.1 → webchanges-3.31.3}/webchanges/reporters.py +4 -4
  7. {webchanges-3.31.1 → webchanges-3.31.3}/webchanges/storage.py +1 -5
  8. {webchanges-3.31.1 → webchanges-3.31.3/webchanges.egg-info}/PKG-INFO +17 -19
  9. {webchanges-3.31.1 → webchanges-3.31.3}/LICENSE +0 -0
  10. {webchanges-3.31.1 → webchanges-3.31.3}/MANIFEST.in +0 -0
  11. {webchanges-3.31.1 → webchanges-3.31.3}/requirements.txt +0 -0
  12. {webchanges-3.31.1 → webchanges-3.31.3}/setup.cfg +0 -0
  13. {webchanges-3.31.1 → webchanges-3.31.3}/webchanges/__main__.py +0 -0
  14. {webchanges-3.31.1 → webchanges-3.31.3}/webchanges/_vendored/__init__.py +0 -0
  15. {webchanges-3.31.1 → webchanges-3.31.3}/webchanges/_vendored/headers.py +0 -0
  16. {webchanges-3.31.1 → webchanges-3.31.3}/webchanges/_vendored/packaging_version.py +0 -0
  17. {webchanges-3.31.1 → webchanges-3.31.3}/webchanges/cli.py +0 -0
  18. {webchanges-3.31.1 → webchanges-3.31.3}/webchanges/command.py +0 -0
  19. {webchanges-3.31.1 → webchanges-3.31.3}/webchanges/config.py +0 -0
  20. {webchanges-3.31.1 → webchanges-3.31.3}/webchanges/differs.py +0 -0
  21. {webchanges-3.31.1 → webchanges-3.31.3}/webchanges/filters.py +0 -0
  22. {webchanges-3.31.1 → webchanges-3.31.3}/webchanges/handler.py +0 -0
  23. {webchanges-3.31.1 → webchanges-3.31.3}/webchanges/mailer.py +0 -0
  24. {webchanges-3.31.1 → webchanges-3.31.3}/webchanges/main.py +0 -0
  25. {webchanges-3.31.1 → webchanges-3.31.3}/webchanges/py.typed +0 -0
  26. {webchanges-3.31.1 → webchanges-3.31.3}/webchanges/storage_minidb.py +0 -0
  27. {webchanges-3.31.1 → webchanges-3.31.3}/webchanges/util.py +0 -0
  28. {webchanges-3.31.1 → webchanges-3.31.3}/webchanges/worker.py +0 -0
  29. {webchanges-3.31.1 → webchanges-3.31.3}/webchanges.egg-info/SOURCES.txt +0 -0
  30. {webchanges-3.31.1 → webchanges-3.31.3}/webchanges.egg-info/dependency_links.txt +0 -0
  31. {webchanges-3.31.1 → webchanges-3.31.3}/webchanges.egg-info/entry_points.txt +0 -0
  32. {webchanges-3.31.1 → webchanges-3.31.3}/webchanges.egg-info/requires.txt +0 -0
  33. {webchanges-3.31.1 → webchanges-3.31.3}/webchanges.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: webchanges
3
- Version: 3.31.1
3
+ Version: 3.31.3
4
4
  Summary: Web Changes Delivered. AI-Summarized. Totally Anonymous.
5
5
  Author-email: Mike Borsetti <mike+webchanges@borsetti.com>
6
6
  Maintainer-email: Mike Borsetti <mike+webchanges@borsetti.com>
@@ -76,15 +76,15 @@ Project-URL: Changelog, https://webchanges.readthedocs.io/en/stable/changelog.ht
76
76
  Project-URL: Issues, https://github.com/mborsetti/webchanges/issues
77
77
  Project-URL: CI, https://github.com/mborsetti/webchanges/actions
78
78
  Keywords: webmonitoring,monitoring
79
- Classifier: Environment :: Console
80
- Classifier: Topic :: Internet
81
- Classifier: Topic :: Internet :: WWW/HTTP
82
- Classifier: Topic :: Internet :: WWW/HTTP :: Indexing/Search
83
- Classifier: Topic :: System :: Monitoring
84
- Classifier: Topic :: Utilities
85
79
  Classifier: Development Status :: 5 - Production/Stable
86
- Classifier: License :: OSI Approved :: MIT License
80
+ Classifier: Environment :: Console
81
+ Classifier: Intended Audience :: Developers
82
+ Classifier: Intended Audience :: End Users/Desktop
83
+ Classifier: Intended Audience :: System Administrators
87
84
  Classifier: License :: OSI Approved :: BSD License
85
+ Classifier: License :: OSI Approved :: MIT License
86
+ Classifier: Natural Language :: English
87
+ Classifier: Operating System :: OS Independent
88
88
  Classifier: Programming Language :: Python
89
89
  Classifier: Programming Language :: Python :: 3
90
90
  Classifier: Programming Language :: Python :: 3 :: Only
@@ -93,12 +93,11 @@ Classifier: Programming Language :: Python :: 3.11
93
93
  Classifier: Programming Language :: Python :: 3.12
94
94
  Classifier: Programming Language :: Python :: 3.13
95
95
  Classifier: Programming Language :: Python :: Implementation :: CPython
96
- Classifier: Operating System :: OS Independent
97
- Classifier: Environment :: Console
98
- Classifier: Intended Audience :: End Users/Desktop
99
- Classifier: Intended Audience :: System Administrators
100
- Classifier: Intended Audience :: Developers
101
- Classifier: Natural Language :: English
96
+ Classifier: Topic :: Internet
97
+ Classifier: Topic :: Internet :: WWW/HTTP
98
+ Classifier: Topic :: Internet :: WWW/HTTP :: Indexing/Search
99
+ Classifier: Topic :: System :: Monitoring
100
+ Classifier: Topic :: Utilities
102
101
  Classifier: Typing :: Typed
103
102
  Requires-Python: >=3.10
104
103
  Description-Content-Type: text/x-rst
@@ -178,7 +177,7 @@ webchanges |downloads|
178
177
 
179
178
  **webchanges** *anonymously* checks web content (including images) and commands for changes, delivering instant
180
179
  notifications and AI-powered summaries to your favorite `platform
181
- <https://webchanges.readthedocs.io/en/stable/introduction.html#reporters-list>`__.
180
+ <https://webchanges.readthedocs.io/en/stable/introduction.html#reporters>`__.
182
181
 
183
182
 
184
183
  Requirements
@@ -293,14 +292,13 @@ licensed under a `BSD 3-Clause License
293
292
  <https://raw.githubusercontent.com/thp/urlwatch/346b25914b0418342ffe2fb0529bed702fddc01f/COPYING>`__).
294
293
 
295
294
 
296
- Compatibility **urlwatch**
297
- ===========================
295
+ Compatibility with **urlwatch**
296
+ ===============================
298
297
 
299
298
  This project is based on code from `urlwatch 2.21
300
299
  <https://github.com/thp/urlwatch/tree/346b25914b0418342ffe2fb0529bed702fddc01f>`__ dated 30 July 2020.
301
-
302
300
  For upgrading from **urlwatch** to **webchanges** (using the same job and
303
- configuration files), see `here <https://webchanges.readthedocs.io/en/stable/upgrading.html>`__).
301
+ configuration files), see `here <https://webchanges.readthedocs.io/en/stable/upgrading.html>`__.
304
302
 
305
303
 
306
304
  .. |support| image:: https://img.shields.io/pypi/pyversions/webchanges.svg
@@ -11,7 +11,7 @@ webchanges |downloads|
11
11
 
12
12
  **webchanges** *anonymously* checks web content (including images) and commands for changes, delivering instant
13
13
  notifications and AI-powered summaries to your favorite `platform
14
- <https://webchanges.readthedocs.io/en/stable/introduction.html#reporters-list>`__.
14
+ <https://webchanges.readthedocs.io/en/stable/introduction.html#reporters>`__.
15
15
 
16
16
 
17
17
  Requirements
@@ -126,14 +126,13 @@ licensed under a `BSD 3-Clause License
126
126
  <https://raw.githubusercontent.com/thp/urlwatch/346b25914b0418342ffe2fb0529bed702fddc01f/COPYING>`__).
127
127
 
128
128
 
129
- Compatibility **urlwatch**
130
- ===========================
129
+ Compatibility with **urlwatch**
130
+ ===============================
131
131
 
132
132
  This project is based on code from `urlwatch 2.21
133
133
  <https://github.com/thp/urlwatch/tree/346b25914b0418342ffe2fb0529bed702fddc01f>`__ dated 30 July 2020.
134
-
135
134
  For upgrading from **urlwatch** to **webchanges** (using the same job and
136
- configuration files), see `here <https://webchanges.readthedocs.io/en/stable/upgrading.html>`__).
135
+ configuration files), see `here <https://webchanges.readthedocs.io/en/stable/upgrading.html>`__.
137
136
 
138
137
 
139
138
  .. |support| image:: https://img.shields.io/pypi/pyversions/webchanges.svg
@@ -26,15 +26,15 @@ maintainers = [
26
26
  ]
27
27
  keywords = ['webmonitoring', 'monitoring']
28
28
  classifiers = [
29
- 'Environment :: Console',
30
- 'Topic :: Internet',
31
- 'Topic :: Internet :: WWW/HTTP',
32
- 'Topic :: Internet :: WWW/HTTP :: Indexing/Search',
33
- 'Topic :: System :: Monitoring',
34
- 'Topic :: Utilities',
35
29
  'Development Status :: 5 - Production/Stable',
36
- 'License :: OSI Approved :: MIT License',
30
+ 'Environment :: Console',
31
+ 'Intended Audience :: Developers',
32
+ 'Intended Audience :: End Users/Desktop',
33
+ 'Intended Audience :: System Administrators',
37
34
  'License :: OSI Approved :: BSD License',
35
+ 'License :: OSI Approved :: MIT License',
36
+ 'Natural Language :: English',
37
+ 'Operating System :: OS Independent',
38
38
  'Programming Language :: Python',
39
39
  'Programming Language :: Python :: 3',
40
40
  'Programming Language :: Python :: 3 :: Only',
@@ -43,12 +43,11 @@ classifiers = [
43
43
  'Programming Language :: Python :: 3.12',
44
44
  'Programming Language :: Python :: 3.13',
45
45
  'Programming Language :: Python :: Implementation :: CPython',
46
- 'Operating System :: OS Independent',
47
- 'Environment :: Console',
48
- 'Intended Audience :: End Users/Desktop',
49
- 'Intended Audience :: System Administrators',
50
- 'Intended Audience :: Developers',
51
- 'Natural Language :: English',
46
+ 'Topic :: Internet',
47
+ 'Topic :: Internet :: WWW/HTTP',
48
+ 'Topic :: Internet :: WWW/HTTP :: Indexing/Search',
49
+ 'Topic :: System :: Monitoring',
50
+ 'Topic :: Utilities',
52
51
  'Typing :: Typed',
53
52
  ]
54
53
 
@@ -22,7 +22,7 @@ __project_name__ = str(__package__)
22
22
  # * MINOR version when you add functionality in a backwards compatible manner, and
23
23
  # * MICRO or PATCH version when you make backwards compatible bug fixes. We no longer use '0'
24
24
  # If unsure on increments, use pkg_resources.parse_version to parse
25
- __version__ = '3.31.1'
25
+ __version__ = '3.31.3'
26
26
  __description__ = (
27
27
  'Check web (or command output) for changes since last run and notify.\n\nAnonymously alerts you of web changes.'
28
28
  )
@@ -62,7 +62,6 @@ else:
62
62
 
63
63
  try:
64
64
  import requests
65
- import requests.adapters
66
65
  import urllib3
67
66
  import urllib3.exceptions
68
67
  except ImportError as e: # pragma: no cover
@@ -71,6 +70,15 @@ except ImportError as e: # pragma: no cover
71
70
 
72
71
  logger = logging.getLogger(__name__)
73
72
 
73
+
74
+ # Custom YAML representer function for httpx.Headers
75
+ def represent_headers(dumper: yaml.SafeDumper, data: Headers) -> yaml.MappingNode:
76
+ return dumper.represent_dict(dict(data))
77
+
78
+
79
+ # Add the custom representer to the SafeDumper
80
+ yaml.SafeDumper.add_representer(Headers, represent_headers)
81
+
74
82
  # reduce logging from httpx's sub-modules
75
83
  if httpx is not None and logger.getEffectiveLevel() == logging.DEBUG:
76
84
  logging.getLogger('hpack').setLevel(logging.INFO)
@@ -1556,6 +1564,7 @@ class BrowserJob(UrlJobBase):
1556
1564
  try:
1557
1565
  response = page.goto(
1558
1566
  self.initialization_url,
1567
+ wait_until=self.wait_until,
1559
1568
  )
1560
1569
  except PlaywrightError as e:
1561
1570
  logger.info(f'Job {self.index_number}: Website initialization page returned error {e}')
@@ -2016,16 +2025,8 @@ class ShellJob(Job):
2016
2025
  """
2017
2026
  needs_bytes = FilterBase.filter_chain_needs_bytes(self.filters)
2018
2027
  try:
2019
- return (
2020
- subprocess.run( # noqa: S602 `shell=True`, security issue
2021
- self.command,
2022
- capture_output=True,
2023
- shell=True,
2024
- check=True,
2025
- text=(not needs_bytes),
2026
- ).stdout,
2027
- '',
2028
- 'application/octet-stream' if needs_bytes else 'text/plain',
2028
+ response = subprocess.run( # noqa: S602 `shell=True`, security issue
2029
+ self.command, capture_output=True, shell=True, check=True, text=(not needs_bytes)
2029
2030
  )
2030
2031
  except subprocess.CalledProcessError as e:
2031
2032
  logger.info(f'Job {self.index_number}: Command: {e.cmd} ')
@@ -2033,6 +2034,7 @@ class ShellJob(Job):
2033
2034
  logger.info(f'Job {self.index_number}: stderr : {e.stderr}')
2034
2035
  logger.info(f'Job {self.index_number}: stdout : {e.stdout}')
2035
2036
  raise
2037
+ return (response.stdout, '', 'application/octet-stream' if needs_bytes else 'text/plain')
2036
2038
 
2037
2039
  def format_error(self, exception: Exception, tb: str) -> str:
2038
2040
  """Format the error of the job if one is encountered.
@@ -977,10 +977,12 @@ class EMailReporter(TextReporter):
977
977
  filtered_job_states = list(self.report.get_filtered_job_states(self.job_states))
978
978
  subject = self.subject_with_args(filtered_job_states)
979
979
 
980
+ utf_8 = True
980
981
  if self.config['method'] == 'smtp':
981
982
  smtp_config = self.config['smtp']
982
983
  smtp_user = smtp_config['user'] or self.config['from']
983
984
  use_auth = smtp_config['auth']
985
+ utf_8 = smtp_config['utf-8']
984
986
  mailer: Mailer = SMTPMailer(
985
987
  smtp_user,
986
988
  smtp_config['host'],
@@ -999,11 +1001,9 @@ class EMailReporter(TextReporter):
999
1001
  self.report, self.config, self.job_states, self.duration, self.jobs_files, self.differ_defaults
1000
1002
  )
1001
1003
  body_html = '\n'.join(html_reporter.submit())
1002
- msg = mailer.msg(
1003
- self.config['from'], self.config['to'], subject, body_text, body_html, utf_8=smtp_config['utf-8']
1004
- )
1004
+ msg = mailer.msg(self.config['from'], self.config['to'], subject, body_text, body_html, utf_8=utf_8)
1005
1005
  else:
1006
- msg = mailer.msg(self.config['from'], self.config['to'], subject, body_text, utf_8=smtp_config['utf-8'])
1006
+ msg = mailer.msg(self.config['from'], self.config['to'], subject, body_text, utf_8=utf_8)
1007
1007
 
1008
1008
  mailer.send(msg)
1009
1009
 
@@ -19,6 +19,7 @@ from collections import defaultdict
19
19
  from dataclasses import dataclass
20
20
  from datetime import datetime, timezone
21
21
  from pathlib import Path
22
+ from types import NoneType
22
23
  from typing import Any, Iterable, Iterator, Literal, TextIO, TypedDict
23
24
 
24
25
  import msgpack
@@ -37,11 +38,6 @@ try:
37
38
  except ImportError: # pragma: no cover
38
39
  from webchanges._vendored.headers import Headers # type: ignore[assignment]
39
40
 
40
- try:
41
- from types import NoneType
42
- except ImportError: # pragma: no cover # Python 3.9
43
- NoneType = type(None) # type: ignore[misc]
44
-
45
41
  try:
46
42
  import redis
47
43
  except ImportError as e: # pragma: no cover
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: webchanges
3
- Version: 3.31.1
3
+ Version: 3.31.3
4
4
  Summary: Web Changes Delivered. AI-Summarized. Totally Anonymous.
5
5
  Author-email: Mike Borsetti <mike+webchanges@borsetti.com>
6
6
  Maintainer-email: Mike Borsetti <mike+webchanges@borsetti.com>
@@ -76,15 +76,15 @@ Project-URL: Changelog, https://webchanges.readthedocs.io/en/stable/changelog.ht
76
76
  Project-URL: Issues, https://github.com/mborsetti/webchanges/issues
77
77
  Project-URL: CI, https://github.com/mborsetti/webchanges/actions
78
78
  Keywords: webmonitoring,monitoring
79
- Classifier: Environment :: Console
80
- Classifier: Topic :: Internet
81
- Classifier: Topic :: Internet :: WWW/HTTP
82
- Classifier: Topic :: Internet :: WWW/HTTP :: Indexing/Search
83
- Classifier: Topic :: System :: Monitoring
84
- Classifier: Topic :: Utilities
85
79
  Classifier: Development Status :: 5 - Production/Stable
86
- Classifier: License :: OSI Approved :: MIT License
80
+ Classifier: Environment :: Console
81
+ Classifier: Intended Audience :: Developers
82
+ Classifier: Intended Audience :: End Users/Desktop
83
+ Classifier: Intended Audience :: System Administrators
87
84
  Classifier: License :: OSI Approved :: BSD License
85
+ Classifier: License :: OSI Approved :: MIT License
86
+ Classifier: Natural Language :: English
87
+ Classifier: Operating System :: OS Independent
88
88
  Classifier: Programming Language :: Python
89
89
  Classifier: Programming Language :: Python :: 3
90
90
  Classifier: Programming Language :: Python :: 3 :: Only
@@ -93,12 +93,11 @@ Classifier: Programming Language :: Python :: 3.11
93
93
  Classifier: Programming Language :: Python :: 3.12
94
94
  Classifier: Programming Language :: Python :: 3.13
95
95
  Classifier: Programming Language :: Python :: Implementation :: CPython
96
- Classifier: Operating System :: OS Independent
97
- Classifier: Environment :: Console
98
- Classifier: Intended Audience :: End Users/Desktop
99
- Classifier: Intended Audience :: System Administrators
100
- Classifier: Intended Audience :: Developers
101
- Classifier: Natural Language :: English
96
+ Classifier: Topic :: Internet
97
+ Classifier: Topic :: Internet :: WWW/HTTP
98
+ Classifier: Topic :: Internet :: WWW/HTTP :: Indexing/Search
99
+ Classifier: Topic :: System :: Monitoring
100
+ Classifier: Topic :: Utilities
102
101
  Classifier: Typing :: Typed
103
102
  Requires-Python: >=3.10
104
103
  Description-Content-Type: text/x-rst
@@ -178,7 +177,7 @@ webchanges |downloads|
178
177
 
179
178
  **webchanges** *anonymously* checks web content (including images) and commands for changes, delivering instant
180
179
  notifications and AI-powered summaries to your favorite `platform
181
- <https://webchanges.readthedocs.io/en/stable/introduction.html#reporters-list>`__.
180
+ <https://webchanges.readthedocs.io/en/stable/introduction.html#reporters>`__.
182
181
 
183
182
 
184
183
  Requirements
@@ -293,14 +292,13 @@ licensed under a `BSD 3-Clause License
293
292
  <https://raw.githubusercontent.com/thp/urlwatch/346b25914b0418342ffe2fb0529bed702fddc01f/COPYING>`__).
294
293
 
295
294
 
296
- Compatibility **urlwatch**
297
- ===========================
295
+ Compatibility with **urlwatch**
296
+ ===============================
298
297
 
299
298
  This project is based on code from `urlwatch 2.21
300
299
  <https://github.com/thp/urlwatch/tree/346b25914b0418342ffe2fb0529bed702fddc01f>`__ dated 30 July 2020.
301
-
302
300
  For upgrading from **urlwatch** to **webchanges** (using the same job and
303
- configuration files), see `here <https://webchanges.readthedocs.io/en/stable/upgrading.html>`__).
301
+ configuration files), see `here <https://webchanges.readthedocs.io/en/stable/upgrading.html>`__.
304
302
 
305
303
 
306
304
  .. |support| image:: https://img.shields.io/pypi/pyversions/webchanges.svg
File without changes
File without changes
File without changes