cli2telegram 2.0.1__tar.gz → 2.0.2__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.
@@ -1,32 +1,27 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: cli2telegram
3
- Version: 2.0.1
3
+ Version: 2.0.2
4
4
  Summary: Small utility to send Telegram messages from the CLI.
5
- Home-page: https://github.com/markusressel/cli2telegram
6
5
  License: AGPL-3.0-or-later
6
+ License-File: LICENSE
7
7
  Keywords: cli,telegram,notification
8
8
  Author: Markus Ressel
9
9
  Author-email: mail@markusressel.de
10
- Requires-Python: >=3.7,<4.0
10
+ Requires-Python: >=3.12,<4.0
11
11
  Classifier: Development Status :: 5 - Production/Stable
12
12
  Classifier: License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)
13
13
  Classifier: Programming Language :: Python :: 3
14
- Classifier: Programming Language :: Python :: 3.7
15
- Classifier: Programming Language :: Python :: 3.8
16
- Classifier: Programming Language :: Python :: 3.9
17
- Classifier: Programming Language :: Python :: 3.10
18
- Classifier: Programming Language :: Python :: 3.11
19
- Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Classifier: Programming Language :: Python :: 3.13
16
+ Classifier: Programming Language :: Python :: 3.14
17
+ Classifier: Programming Language :: Python :: 3.15
20
18
  Classifier: Programming Language :: Python :: 3 :: Only
21
- Classifier: Programming Language :: Python :: 3.10
22
- Classifier: Programming Language :: Python :: 3.7
23
- Classifier: Programming Language :: Python :: 3.8
24
- Classifier: Programming Language :: Python :: 3.9
25
19
  Requires-Dist: aiofiles
26
20
  Requires-Dist: click
27
21
  Requires-Dist: container-app-conf
28
22
  Requires-Dist: emoji
29
23
  Requires-Dist: python-telegram-bot
24
+ Project-URL: Homepage, https://github.com/markusressel/cli2telegram
30
25
  Project-URL: Repository, https://github.com/markusressel/cli2telegram
31
26
  Description-Content-Type: text/markdown
32
27
 
@@ -35,8 +35,6 @@ CONFIG = Config(validate=False)
35
35
 
36
36
  CONTEXT_SETTINGS = dict(help_option_names=['-h', '--help'])
37
37
 
38
- loop = asyncio.get_event_loop()
39
-
40
38
 
41
39
  @click.command(context_settings=CONTEXT_SETTINGS)
42
40
  @click.option('-b', '--bot-token', 'bot_token', default=None, type=str, help='Telegram Bot Token')
@@ -92,11 +90,7 @@ def cli(bot_token: str or None, chat_id: str or None, code_block: bool, lines: T
92
90
 
93
91
  app = Application.builder().token(CONFIG.TELEGRAM_BOT_TOKEN.value).build()
94
92
 
95
- tasks = asyncio.gather(
96
- _send_messages(app, messages),
97
- )
98
-
99
- loop.run_until_complete(tasks)
93
+ asyncio.run(_send_messages(app, messages))
100
94
 
101
95
 
102
96
  def prepare_messages(text: str, code_block: bool) -> List[str]:
@@ -54,13 +54,13 @@ class Daemon:
54
54
  signal(SIGINT, self.signal_handler) # ctrl+c
55
55
  signal(SIGTERM, self.signal_handler) # systemctl stop
56
56
 
57
- loop = asyncio.get_event_loop()
58
- tasks = asyncio.gather(
57
+ asyncio.run(self._run_workers())
58
+
59
+ async def _run_workers(self):
60
+ await asyncio.gather(
59
61
  self.send_message_worker(),
60
62
  self.read_pipe_loop(),
61
63
  )
62
- loop.run_until_complete(tasks)
63
- loop.close()
64
64
 
65
65
  async def read_pipe_loop(self):
66
66
  LOGGER.info(f"Daemon is listening for input on {self.pipe_file_path}...")
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "cli2telegram"
3
- version = "2.0.1"
3
+ version = "2.0.2"
4
4
  description = "Small utility to send Telegram messages from the CLI."
5
5
 
6
6
  license = "AGPL-3.0-or-later"
@@ -20,10 +20,9 @@ classifiers = [
20
20
  "License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)",
21
21
  "Programming Language :: Python :: 3 :: Only",
22
22
  "Programming Language :: Python :: 3",
23
- 'Programming Language :: Python :: 3.7',
24
- 'Programming Language :: Python :: 3.8',
25
- 'Programming Language :: Python :: 3.9',
26
- "Programming Language :: Python :: 3.10",
23
+ "Programming Language :: Python :: 3.12",
24
+ "Programming Language :: Python :: 3.13",
25
+ "Programming Language :: Python :: 3.14",
27
26
  "Development Status :: 5 - Production/Stable"
28
27
  ]
29
28
 
@@ -32,7 +31,7 @@ requires = ["poetry-core>=1.0.0"]
32
31
  build-backend = "poetry.core.masonry.api"
33
32
 
34
33
  [tool.poetry.dependencies]
35
- python = "^3.7" # Compatible python versions must be declared here
34
+ python = "^3.12" # Compatible python versions must be declared here
36
35
 
37
36
  container-app-conf = "*"
38
37
  click = "*"
File without changes
File without changes