patchpyro 2.0.2__tar.gz → 2.0.5__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,7 +1,7 @@
1
1
  patchpyro - A monkeypatcher add-on for Pyrogram
2
- Copyright (C) 2020 Cezar H. <https://github.com/usernein>
2
+ Copyright (C) 2026 Aditya Prasad S <https://github.com/adityaprasad502>
3
3
 
4
- This file is part of patchpyro.
4
+ This file is part of patchpyro and was forked from usernein/pyromod.
5
5
 
6
6
  patchpyro is free software: you can redistribute it and/or modify
7
7
  it under the terms of the GNU General Public License as published by
@@ -1,9 +1,10 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: patchpyro
3
- Version: 2.0.2
4
- Summary: A modified pyromod by www.da.gd/aditya
3
+ Version: 2.0.5
4
+ Summary: A modified pyromod by a.devh.in
5
5
  Home-page: https://github.com/adityaprasad502/patchpyro
6
6
  Author: Cezar H. & adityaprasad502
7
+ Author-email: plutoniumx502@gmail.com
7
8
  License: LGPLv3+
8
9
  Classifier: Programming Language :: Python :: 3
9
10
  Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)
@@ -13,6 +14,18 @@ Description-Content-Type: text/markdown
13
14
  License-File: COPYING
14
15
  License-File: COPYING.lesser
15
16
  License-File: NOTICE
17
+ Requires-Dist: kurigram>=2.0.69
18
+ Dynamic: author
19
+ Dynamic: author-email
20
+ Dynamic: classifier
21
+ Dynamic: description
22
+ Dynamic: description-content-type
23
+ Dynamic: home-page
24
+ Dynamic: license
25
+ Dynamic: license-file
26
+ Dynamic: requires-dist
27
+ Dynamic: requires-python
28
+ Dynamic: summary
16
29
 
17
30
  # PatchPyro
18
31
  ### This is a fork of pyromod (renamed as patchpyro) for personal usecases.
@@ -21,7 +34,7 @@ License-File: NOTICE
21
34
 
22
35
  # Requirements:
23
36
  ~~~python
24
- pyrogram>=2.0.69
37
+ kurigram>=2.0.69
25
38
  python>=3.9
26
39
  ~~~
27
40
 
@@ -39,6 +52,8 @@ Example:
39
52
  from patchpyro import listen # or import patchpyro.listen
40
53
  from pyrogram import Client
41
54
 
55
+ patchpyro.thank() # use this if ur linters/ide is removing patchpyro as unused import.
56
+
42
57
  mybot = Client("mysession")
43
58
  ```
44
59
 
@@ -85,7 +100,7 @@ Just import it, it will automatically do the monkeypatch and you'll get these ne
85
100
  ### For .ask():
86
101
  ```python
87
102
  ...
88
- answer = await client.ask(chat_id, '*Send me your name:*', parse_mode='Markdown')
103
+ answer = await client.ask(chat_id, '*Send me your name:*', parse_mode=enums.ParseMode.MARKDOWN)
89
104
  await client.send_message(chat_id, f'Your name is: {answer.text}')
90
105
  ...
91
106
  ```
@@ -5,7 +5,7 @@
5
5
 
6
6
  # Requirements:
7
7
  ~~~python
8
- pyrogram>=2.0.69
8
+ kurigram>=2.0.69
9
9
  python>=3.9
10
10
  ~~~
11
11
 
@@ -23,6 +23,8 @@ Example:
23
23
  from patchpyro import listen # or import patchpyro.listen
24
24
  from pyrogram import Client
25
25
 
26
+ patchpyro.thank() # use this if ur linters/ide is removing patchpyro as unused import.
27
+
26
28
  mybot = Client("mysession")
27
29
  ```
28
30
 
@@ -69,7 +71,7 @@ Just import it, it will automatically do the monkeypatch and you'll get these ne
69
71
  ### For .ask():
70
72
  ```python
71
73
  ...
72
- answer = await client.ask(chat_id, '*Send me your name:*', parse_mode='Markdown')
74
+ answer = await client.ask(chat_id, '*Send me your name:*', parse_mode=enums.ParseMode.MARKDOWN)
73
75
  await client.send_message(chat_id, f'Your name is: {answer.text}')
74
76
  ...
75
77
  ```
@@ -0,0 +1,28 @@
1
+ """
2
+ patchpyro - A monkeypatcher add-on for Pyrogram
3
+ Copyright (C) 2026 Aditya Prasad S <https://github.com/adityaprasad502>
4
+
5
+ This file is part of patchpyro and was forked from usernein/pyromod.
6
+
7
+ patchpyro is free software: you can redistribute it and/or modify
8
+ it under the terms of the GNU General Public License as published by
9
+ the Free Software Foundation, either version 3 of the License, or
10
+ (at your option) any later version.
11
+
12
+ patchpyro is distributed in the hope that it will be useful,
13
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ GNU General Public License for more details.
16
+
17
+ You should have received a copy of the GNU General Public License
18
+ along with patchpyro. If not, see <https://www.gnu.org/licenses/>.
19
+ """
20
+
21
+
22
+ __version__ = "2.0.5"
23
+ # change in setup.py aswell
24
+
25
+ def thank():
26
+ "A dummy function to prevent patchpyro from being removed by formatters and linters. It does nothing, just prints a message to the console to indicate that patchpyro is not an unused import."
27
+ # print("Thank you for using patchpyro! If you see this message. author: a.devh.in, version: " + __version__)
28
+ print("PatchPyro " + __version__ + " is imported! Thank you for using it! Author: a.devh.in")
@@ -1,8 +1,8 @@
1
1
  """
2
2
  patchpyro - A monkeypatcher add-on for Pyrogram
3
- Copyright (C) 2020 Cezar H. <https://github.com/usernein>
3
+ Copyright (C) 2026 Aditya Prasad S <https://github.com/adityaprasad502>
4
4
 
5
- This file is part of patchpyro.
5
+ This file is part of patchpyro and was forked from usernein/pyromod.
6
6
 
7
7
  patchpyro is free software: you can redistribute it and/or modify
8
8
  it under the terms of the GNU General Public License as published by
@@ -1,20 +1,25 @@
1
1
  """
2
2
  patchpyro - A monkeypatcher add-on for Pyrogram
3
- Copyright (C) 2020 Cezar H. <https://github.com/usernein>
4
- This file is part of patchpyro.
3
+ Copyright (C) 2026 Aditya Prasad S <https://github.com/adityaprasad502>
4
+
5
+ This file is part of patchpyro and was forked from usernein/pyromod.
6
+
5
7
  patchpyro is free software: you can redistribute it and/or modify
6
8
  it under the terms of the GNU General Public License as published by
7
9
  the Free Software Foundation, either version 3 of the License, or
8
10
  (at your option) any later version.
11
+
9
12
  patchpyro is distributed in the hope that it will be useful,
10
13
  but WITHOUT ANY WARRANTY; without even the implied warranty of
11
14
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
15
  GNU General Public License for more details.
16
+
13
17
  You should have received a copy of the GNU General Public License
14
18
  along with patchpyro. If not, see <https://www.gnu.org/licenses/>.
15
19
  """
16
20
 
17
- import asyncio, functools
21
+ import asyncio
22
+ import functools
18
23
  from contextlib import suppress
19
24
 
20
25
  import pyrogram
@@ -69,7 +74,10 @@ class Client:
69
74
  @patchable
70
75
  def clear_listener(self, chat_id, future):
71
76
  with suppress(KeyError):
72
- if future == self.listening[chat_id]["future"]:
77
+ if (
78
+ chat_id in self.listening
79
+ and future == self.listening[chat_id]["future"]
80
+ ):
73
81
  self.listening.pop(chat_id, None)
74
82
 
75
83
  @patchable
@@ -1,8 +1,8 @@
1
1
  """
2
2
  patchpyro - A monkeypatcher add-on for Pyrogram
3
- Copyright (C) 2020 Cezar H. <https://github.com/usernein>
3
+ Copyright (C) 2026 Aditya Prasad S <https://github.com/adityaprasad502>
4
4
 
5
- This file is part of patchpyro.
5
+ This file is part of patchpyro and was forked from usernein/pyromod.
6
6
 
7
7
  patchpyro is free software: you can redistribute it and/or modify
8
8
  it under the terms of the GNU General Public License as published by
@@ -1,8 +1,8 @@
1
1
  """
2
2
  patchpyro - A monkeypatcher add-on for Pyrogram
3
- Copyright (C) 2020 Cezar H. <https://github.com/usernein>
3
+ Copyright (C) 2026 Aditya Prasad S <https://github.com/adityaprasad502>
4
4
 
5
- This file is part of patchpyro.
5
+ This file is part of patchpyro and was forked from usernein/pyromod.
6
6
 
7
7
  patchpyro is free software: you can redistribute it and/or modify
8
8
  it under the terms of the GNU General Public License as published by
@@ -1,9 +1,10 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: patchpyro
3
- Version: 2.0.2
4
- Summary: A modified pyromod by www.da.gd/aditya
3
+ Version: 2.0.5
4
+ Summary: A modified pyromod by a.devh.in
5
5
  Home-page: https://github.com/adityaprasad502/patchpyro
6
6
  Author: Cezar H. & adityaprasad502
7
+ Author-email: plutoniumx502@gmail.com
7
8
  License: LGPLv3+
8
9
  Classifier: Programming Language :: Python :: 3
9
10
  Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)
@@ -13,6 +14,18 @@ Description-Content-Type: text/markdown
13
14
  License-File: COPYING
14
15
  License-File: COPYING.lesser
15
16
  License-File: NOTICE
17
+ Requires-Dist: kurigram>=2.0.69
18
+ Dynamic: author
19
+ Dynamic: author-email
20
+ Dynamic: classifier
21
+ Dynamic: description
22
+ Dynamic: description-content-type
23
+ Dynamic: home-page
24
+ Dynamic: license
25
+ Dynamic: license-file
26
+ Dynamic: requires-dist
27
+ Dynamic: requires-python
28
+ Dynamic: summary
16
29
 
17
30
  # PatchPyro
18
31
  ### This is a fork of pyromod (renamed as patchpyro) for personal usecases.
@@ -21,7 +34,7 @@ License-File: NOTICE
21
34
 
22
35
  # Requirements:
23
36
  ~~~python
24
- pyrogram>=2.0.69
37
+ kurigram>=2.0.69
25
38
  python>=3.9
26
39
  ~~~
27
40
 
@@ -39,6 +52,8 @@ Example:
39
52
  from patchpyro import listen # or import patchpyro.listen
40
53
  from pyrogram import Client
41
54
 
55
+ patchpyro.thank() # use this if ur linters/ide is removing patchpyro as unused import.
56
+
42
57
  mybot = Client("mysession")
43
58
  ```
44
59
 
@@ -85,7 +100,7 @@ Just import it, it will automatically do the monkeypatch and you'll get these ne
85
100
  ### For .ask():
86
101
  ```python
87
102
  ...
88
- answer = await client.ask(chat_id, '*Send me your name:*', parse_mode='Markdown')
103
+ answer = await client.ask(chat_id, '*Send me your name:*', parse_mode=enums.ParseMode.MARKDOWN)
89
104
  await client.send_message(chat_id, f'Your name is: {answer.text}')
90
105
  ...
91
106
  ```
@@ -0,0 +1 @@
1
+ kurigram>=2.0.69
@@ -1,11 +1,11 @@
1
1
  import re
2
+
2
3
  import setuptools
3
4
 
4
5
  with open("README.md", "r") as fp:
5
6
  long_description = fp.read()
6
7
 
7
- with open("requirements.txt") as fp:
8
- requirements = [line.strip() for line in fp]
8
+ requirements = ["kurigram>=2.0.69"]
9
9
 
10
10
  # pyright: reportOptionalSubscript=false
11
11
  with open(r"patchpyro\__init__.py") as fp:
@@ -17,8 +17,9 @@ setuptools.setup(
17
17
  name="patchpyro",
18
18
  version=version,
19
19
  author="Cezar H. & adityaprasad502",
20
+ author_email="plutoniumx502@gmail.com",
20
21
  license="LGPLv3+",
21
- description="A modified pyromod by www.da.gd/aditya",
22
+ description="A modified pyromod by a.devh.in",
22
23
  long_description=long_description,
23
24
  long_description_content_type="text/markdown",
24
25
  url="https://github.com/adityaprasad502/patchpyro",
@@ -29,5 +30,7 @@ setuptools.setup(
29
30
  "Operating System :: OS Independent",
30
31
  ],
31
32
  python_requires=">=3.9",
32
- install_requires=requirements,
33
+ install_requires=[
34
+ "kurigram>=2.0.69",
35
+ ],
33
36
  )
@@ -1,23 +0,0 @@
1
- """
2
- patchpyro - A monkeypatched add-on for Pyrogram
3
- Copyright (C) 2020 Cezar H. <https://github.com/usernein>
4
-
5
- This file is part of patchpyro.
6
-
7
- patchpyro is free software: you can redistribute it and/or modify
8
- it under the terms of the GNU General Public License as published by
9
- the Free Software Foundation, either version 3 of the License, or
10
- (at your option) any later version.
11
-
12
- patchpyro is distributed in the hope that it will be useful,
13
- but WITHOUT ANY WARRANTY; without even the implied warranty of
14
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
- GNU General Public License for more details.
16
-
17
- You should have received a copy of the GNU General Public License
18
- along with patchpyro. If not, see <https://www.gnu.org/licenses/>.
19
- """
20
-
21
-
22
- __version__ = "2.0.2"
23
- # change in setup.py aswell
@@ -1 +0,0 @@
1
- pyrogram>=2.0.69
File without changes
File without changes
File without changes