Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
662 commits
Select commit Hold shift + click to select a range
050a730
Update Pyrogram to v2.0.21
delivrance May 14, 2022
d984ae2
Add missing parameter to send_reaction (#993)
leonardotty May 14, 2022
15bfaed
Update Pyrogram to v2.0.22
delivrance May 14, 2022
ff90baf
Fix get_messages and usages
delivrance May 14, 2022
427738d
Update Pyrogram to v2.0.23
delivrance May 14, 2022
5681cce
Add back the ability to pass iterators to some methods
delivrance May 15, 2022
f628375
Add sequential parameter to compose()
delivrance May 15, 2022
644dd55
Update Pyrogram to v2.0.24
delivrance May 15, 2022
6974d97
Fix type hint of User.status (#998)
MrMissx May 25, 2022
f7c6788
Update Pyrogram to v2.0.25
delivrance May 25, 2022
c5958fc
Fix offset_date not being an integer timestamp
delivrance May 26, 2022
ba3104f
Update Pyrogram to v2.0.26
delivrance May 26, 2022
edf5e98
Update FAQ
delivrance Jun 6, 2022
a1bdcd6
Fix type of "has_protected_content" (#994)
prashantsengar Jun 6, 2022
37e0015
Update Pyrogram to v2.0.27
delivrance Jun 6, 2022
7f9e841
Update API schema to Layer 143
delivrance Jun 14, 2022
b59dcd1
Do not trigger a reconnection when skipping invalid packets
delivrance Jun 20, 2022
d61a2ce
Remove syncer.py
delivrance Jun 20, 2022
b35810d
Update compose example
delivrance Jun 20, 2022
0a50520
Improve idle() implementation
delivrance Jun 20, 2022
6a766fa
Update README.md
delivrance Jun 20, 2022
d71db29
Store the "me" user object
delivrance Jun 20, 2022
caa26b2
Improve upload file size checks
delivrance Jun 20, 2022
34ffc49
Fix example typo (#1020)
licproF Jun 20, 2022
b904a4f
Fix FAQ example (#1007)
MrBotDeveloper Jun 20, 2022
eb4ff14
Fix delete_profile_photos example (#990)
SmartManoj Jun 20, 2022
4b10ec8
Pickle datetime objects into timestamps (#1016)
delivrance Jun 20, 2022
81baf85
Update Pyrogram to v2.0.28
delivrance Jun 20, 2022
212ea57
Fix tests
delivrance Jun 20, 2022
78e1d29
Update Pyrogram to v2.0.29
delivrance Jun 20, 2022
0e0642e
Add [403 PREMIUM_ACCOUNT_REQUIRED] error
delivrance Jun 21, 2022
3aaf357
Update Pyrogram to v2.0.30
delivrance Jun 21, 2022
4398cbb
Improve edit_inline_media (#1036)
DavideGalilei Jul 14, 2022
11d6a4a
Update Pyrogram to v2.0.31
delivrance Jul 14, 2022
70e73d3
Add ENTITY_BOUNDS_INVALID error description
delivrance Jul 14, 2022
d1e8b3b
Update Pyrogram to v2.0.32
delivrance Jul 14, 2022
298d361
Store "me" user object before starting dispatcher (#1042)
Mahesh0253 Jul 16, 2022
d9c8e04
Update Pyrogram to v2.0.33
delivrance Jul 16, 2022
ed74895
Filter out empty entities internally (#1041)
Harsh-br0 Jul 22, 2022
6f7ec0d
Update Pyrogram to v2.0.34
delivrance Jul 22, 2022
6736602
Handle socket.connect() blocking-ness
delivrance Jul 23, 2022
de31277
Update Pyrogram to v2.0.35
delivrance Jul 23, 2022
0505ff0
Add some sticker-related errors (#1055)
AsmSafone Aug 11, 2022
8da0851
Add support for BytesIO in InputMedia objects (#1047)
69888 Aug 11, 2022
bc9161c
Update API schema to Layer 144 (#1050)
null-nick Aug 11, 2022
e192350
Fixed edit_inline_media once again (#1052)
DavideGalilei Aug 11, 2022
c26c100
Update Pyrogram to v2.0.36
delivrance Aug 11, 2022
cd69fb6
Add support for CUSTOM_EMOJI message entity type
delivrance Aug 12, 2022
8c39932
Add new method get_custom_emoji_stickers
delivrance Aug 12, 2022
78fe290
Update Pyrogram to v2.0.37
delivrance Aug 12, 2022
9aefff9
Fix join applications for public chats
delivrance Aug 12, 2022
6c34c83
Update Pyrogram to v2.0.38
delivrance Aug 12, 2022
6b7e5dc
Fix sending custom emoji
delivrance Aug 14, 2022
95de5f7
Fix determining video sticker resolution. Add sticker duration to Sti…
L3Nya Aug 14, 2022
2e46514
Refactor Sticker parsing
delivrance Aug 14, 2022
e94d3c1
Merge branch 'sticker-attributes'
delivrance Aug 14, 2022
bb450d1
Update Pyrogram to v2.0.39
delivrance Aug 14, 2022
803f8f0
Fix Sticker parsing
delivrance Aug 14, 2022
2242adb
Update Pyrogram to v2.0.40
delivrance Aug 14, 2022
f5bcce7
Add support for custom emoji in HTML
delivrance Aug 16, 2022
ac09411
Update Pyrogram to v2.0.41
delivrance Aug 16, 2022
cb5431d
Fix get_custom_emoji_stickers parameter type in docs (#1066)
omg-xtao Aug 17, 2022
371700d
Update FAQ
delivrance Aug 28, 2022
95aae43
Fix serialization of empty optional lists
delivrance Aug 28, 2022
f6e0e58
Update Pyrogram to v2.0.42
delivrance Aug 28, 2022
ed008dd
Fix message entity parsing and serialization
delivrance Aug 28, 2022
3bd0820
Update Pyrogram to v2.0.43
delivrance Aug 28, 2022
7055ee6
Update get_peer_by_username query
delivrance Sep 1, 2022
94c0031
Update Pyrogram to v2.0.44
delivrance Sep 1, 2022
88af58f
Fix nonce checks
delivrance Sep 2, 2022
14c5303
Update Pyrogram to v2.0.45
delivrance Sep 2, 2022
761e473
More nonce check fixes
delivrance Sep 2, 2022
3632400
Update Pyrogram to v2.0.46
delivrance Sep 2, 2022
2cd0f38
Update API schema to Layer 145
delivrance Sep 3, 2022
7a53c3d
Add support for emoji status
delivrance Sep 3, 2022
1fb04b7
Update EmojiStatus
delivrance Sep 3, 2022
fe7fcf3
Update reaction.py
delivrance Sep 3, 2022
9eb7589
Add chat_reactions.py
delivrance Sep 3, 2022
6496a87
Add message_reactions.py
delivrance Sep 3, 2022
06c62c5
Add MessageReactions and ChatReactions to the docs
delivrance Sep 3, 2022
f731985
Update Pyrogram to v2.0.47
delivrance Sep 3, 2022
04b343f
Add get_default_emoji_statuses method
delivrance Sep 3, 2022
5d11c03
Add set_emoji_status method
delivrance Sep 3, 2022
210f538
Update Pyrogram to v2.0.48
delivrance Sep 3, 2022
1db03c4
Fix for older Python versions
delivrance Sep 3, 2022
1a10750
Update Pyrogram to v2.0.49
delivrance Sep 3, 2022
e0fdcc7
Fix send_reaction
delivrance Sep 5, 2022
8490cfa
Update Pyrogram to v2.0.50
delivrance Sep 5, 2022
f9aacd8
Update poll parsing
delivrance Sep 6, 2022
7558e04
Update Pyrogram to v2.0.51
delivrance Sep 6, 2022
6dced52
Update example
delivrance Sep 15, 2022
8fd79c9
Update API schema to Layer 146
delivrance Sep 15, 2022
9f94aee
Update Pyrogram to v2.0.52
delivrance Sep 15, 2022
53584bc
Add chosen_order to Reaction
delivrance Sep 18, 2022
81895d7
Fix Chat.available_reactions type hint
delivrance Sep 18, 2022
468ebf5
Add tempfile deletion in case of asyncio task cancellation. (#1080)
el-garro Sep 18, 2022
3940ca9
Revamp handling of partial downloads
delivrance Sep 18, 2022
2d547cc
Update Pyrogram to v2.0.53
delivrance Sep 18, 2022
71f263b
Re-raise asyncio.CancelledError to avoid continuations
delivrance Sep 18, 2022
a2fe5b3
Update Pyrogram to v2.0.54
delivrance Sep 18, 2022
4edaa21
Don't create download dirs for in-memory downloads
delivrance Sep 20, 2022
862285e
Update Pyrogram to v2.0.55
delivrance Sep 20, 2022
2870ae8
Move get_me() call into start()
delivrance Sep 22, 2022
f407f88
Update Pyrogram to v2.0.56
delivrance Sep 22, 2022
ec476aa
Call get_me() before initializing the client
delivrance Sep 23, 2022
0e68bf3
Update Pyrogram to v2.0.57
delivrance Sep 23, 2022
8077eb4
Update docs
delivrance Oct 6, 2022
bb44f36
Add usable-by labels for methods
delivrance Oct 14, 2022
bf52ec1
Update usable-by labels
delivrance Oct 15, 2022
9ade92c
Add languages to "pre" tags (HTML and Markdown) #1118
Princic-1837592 Oct 15, 2022
b660115
Update Pyrogram to v2.0.58
delivrance Oct 15, 2022
3eda82d
Update html.py
delivrance Oct 16, 2022
ef92389
Update Pyrogram to v2.0.59
delivrance Oct 16, 2022
a374e01
Update API schema to Layer 148
null-nick Nov 13, 2022
035bbbb
Update python.yml
delivrance Nov 13, 2022
b423730
Fix on_disconnect decorator not working (#1134)
01101sam Nov 13, 2022
c989639
Add Message.forwards field (#1103)
IhorBoichuk Nov 13, 2022
1b02a6a
Add __all__ for better enums suggestions (#1126)
AlbertEinsteinTG Nov 13, 2022
b848e05
Fix copy_message return type hint (#1128)
kvrvgv Nov 13, 2022
31b3218
Use getattr to get outgoing attribute in filters.me (#1137)
ALiwoto Nov 13, 2022
0e64ebc
Fix typo (#1029)
DeekshithSH Nov 13, 2022
23d9532
Update Pyrogram to v2.0.60
delivrance Nov 13, 2022
1699ef0
Disable parse mode when copying messages
delivrance Nov 15, 2022
e3e9731
Update Pyrogram to v2.0.61
delivrance Nov 15, 2022
2aae101
Add tag command to Makefile
delivrance Nov 18, 2022
9b6cb07
Update Pyrogram to v2.0.62
delivrance Nov 18, 2022
b81c379
Update API schema to Layer 149
delivrance Nov 25, 2022
70b6738
Update Pyrogram to v2.0.63
delivrance Nov 25, 2022
1d7852a
Update API schema to Layer 150
delivrance Dec 6, 2022
fb85a14
Update Pyrogram to v2.0.64
delivrance Dec 6, 2022
d734fbb
Fix User.emoji_status type hint
delivrance Dec 6, 2022
3cf1ac7
Update the order in which media messages are parsed
delivrance Dec 6, 2022
ad77345
Update Pyrogram to v2.0.65
delivrance Dec 6, 2022
2ed0003
Update the HTML logic to output well-formed elements (#1155)
Princic-1837592 Dec 6, 2022
38e9745
Update Pyrogram to v2.0.66
delivrance Dec 6, 2022
db6bc2d
Add tests for HTML.unparse
delivrance Dec 6, 2022
fd2819c
Update Pyrogram to v2.0.67
delivrance Dec 6, 2022
669b399
Escape text inside entity when building unparsed text (#1156)
Princic-1837592 Dec 6, 2022
7090dcb
Add more tests for HTML.unparse
delivrance Dec 6, 2022
86515bb
Update Pyrogram to v2.0.68
delivrance Dec 6, 2022
217bcb1
Fix HTML unparsing when there's no entities
delivrance Dec 6, 2022
73554b9
Update Pyrogram to v2.0.69
delivrance Dec 6, 2022
a76269d
Handle all given updates, avoid short circuit (#1162)
kai3341 Dec 12, 2022
aeea07f
Update Pyrogram to v2.0.70
delivrance Dec 12, 2022
a9e7d15
Add a watchdog for incoming updates
delivrance Dec 23, 2022
ccb58f5
Update Pyrogram to v2.0.71
delivrance Dec 23, 2022
81573bc
Remove threading.Lock usages
delivrance Dec 23, 2022
8afd459
Update Pyrogram to v2.0.72
delivrance Dec 23, 2022
c4a47b9
Add support for Fragment SMS codes (#1170)
omg-xtao Dec 23, 2022
265f5fc
Add VOICE_MESSAGES_FORBIDDEN (#1151)
KyMaP13 Dec 23, 2022
f350691
Update Pyrogram to v2.0.73
delivrance Dec 23, 2022
84d60b5
Switch to non-blocking sockets & use a send queue
delivrance Dec 24, 2022
f30510a
Update Pyrogram to v2.0.74
delivrance Dec 24, 2022
1cb1715
Keep a timeout while connecting and set non-blocking afterwards
delivrance Dec 24, 2022
91160bf
Update Pyrogram to v2.0.75
delivrance Dec 24, 2022
deb560a
Remove unused variables
delivrance Dec 24, 2022
f12005b
Use Python's standard sockets in case of no proxy
delivrance Dec 24, 2022
13e8c41
Update Pyrogram to v2.0.76
delivrance Dec 24, 2022
c7d3629
Add back a reference to the loop
delivrance Dec 24, 2022
b3825c2
Update Pyrogram to v2.0.77
delivrance Dec 24, 2022
dbf2e47
Fix usages of removed attributes
delivrance Dec 25, 2022
87ae79e
Remove special cases for older Python versions
delivrance Dec 25, 2022
4c32a15
Remove unneeded threading.Lock
delivrance Dec 25, 2022
13094f1
Update Pyrogram to v2.0.78
delivrance Dec 25, 2022
ae028ab
Switch back to local system time synchronization
delivrance Dec 25, 2022
b23e344
Add messages for mismatched checks
delivrance Dec 25, 2022
ce8c242
Revert to triggering a reconnection when skipping invalid packets
delivrance Dec 25, 2022
3d5e9d8
Update Pyrogram to v2.0.79
delivrance Dec 25, 2022
9eaaf10
Update requirements.txt
delivrance Dec 26, 2022
7e5d593
Keep lang_code lowercase
delivrance Dec 26, 2022
9ee1807
Don't raise write() and close() exceptions
delivrance Dec 26, 2022
6aae3a9
Always use non-blocking sockets
delivrance Dec 26, 2022
dd4e41f
Make the use of proxies an optional dependency
delivrance Dec 26, 2022
7182a7c
Update connection.py
delivrance Dec 26, 2022
d298c62
Update session.py
delivrance Dec 26, 2022
01cd8bb
Optimize log calls
delivrance Dec 26, 2022
6b54467
Update Pyrogram to v2.0.80
delivrance Dec 26, 2022
ab45707
Update requirements.txt
delivrance Dec 26, 2022
8b87c6a
Update tcp.py
delivrance Dec 26, 2022
916be08
Update Pyrogram to v2.0.81
delivrance Dec 26, 2022
235dde2
Update exception message
delivrance Dec 26, 2022
a81b8a2
Update Pyrogram to v2.0.82
delivrance Dec 26, 2022
bff583e
Revert some of the latest changes
delivrance Dec 26, 2022
03d60cd
Update Pyrogram to v2.0.83
delivrance Dec 26, 2022
9bf742a
Introduce back some previously reverted changes
delivrance Dec 27, 2022
dc3b8a5
Tweak file upload settings
delivrance Dec 27, 2022
52effe1
Update Pyrogram to v2.0.84
delivrance Dec 27, 2022
cf06939
Workaround proxy sockets not timing out properly
delivrance Dec 27, 2022
1fa6f3b
Update Pyrogram to v2.0.85
delivrance Dec 27, 2022
2dca5ae
Handle proxy socket connections using thread executors
delivrance Dec 27, 2022
5ca422b
Create a future result before sending its request
delivrance Dec 27, 2022
1daa05a
Raise and handle send errors in order to immediately act upon
delivrance Dec 27, 2022
82c81c1
Update Pyrogram to v2.0.86
delivrance Dec 27, 2022
d890e53
Clear stored_msg_ids on session stop
delivrance Dec 28, 2022
7ee47b2
Update Pyrogram to v2.0.87
delivrance Dec 28, 2022
cf1e31c
Apply security checks to each message in the container
delivrance Dec 29, 2022
fbf722d
Update Pyrogram to v2.0.88
delivrance Dec 29, 2022
e0dda5a
Update API schema to Layer 151 (#1182)
null-nick Dec 30, 2022
ef29b3c
Add the field has_media_spoiler to the class Message
delivrance Dec 30, 2022
c707a4b
Add the parameter has_spoiler to relevant send_* media methods
delivrance Dec 30, 2022
06996d2
Add media_spoiler filter
delivrance Dec 30, 2022
a116ea4
Add the field has_spoiler to relevant InputMedia* classes
delivrance Dec 30, 2022
50d87bf
Add the field is_persistent to the class ReplyKeyboardMarkup
delivrance Dec 30, 2022
e8bd639
Add media spoiler support for other relevant methods
delivrance Dec 30, 2022
5d3abd3
Update Pyrogram to v2.0.89
delivrance Dec 30, 2022
1e6209d
Add support for email sign in codes
delivrance Dec 30, 2022
3b0dee7
Update Pyrogram to v2.0.90
delivrance Dec 30, 2022
2de8f19
Fix resolving peers for users with multiple usernames
delivrance Dec 30, 2022
fbd62f9
Update Pyrogram to v2.0.91
delivrance Dec 30, 2022
a09c5a3
Set has_media_spoiler only in case of Photo, Video or Animation media
delivrance Dec 30, 2022
526aaa0
Update Pyrogram to v2.0.92
delivrance Dec 30, 2022
6752af8
Add error messages for transport errors
delivrance Dec 31, 2022
b19764d
Update Pyrogram to v2.0.93
delivrance Dec 31, 2022
8441ce2
Limit the amount of concurrent transmissions
delivrance Jan 8, 2023
aa2f189
Update Pyrogram to v2.0.94
delivrance Jan 8, 2023
388c534
Add BOT_ONESIDE_NOT_AVAIL to known errors (#1073)
null-nick Jan 8, 2023
2401853
Add INVITE_REQUEST_SENT to known errors
delivrance Jan 8, 2023
f9a9673
Update Pyrogram to v2.0.95
delivrance Jan 8, 2023
043734f
Add BUTTON_USER_PRIVACY_RESTRICTED to the list of known errors (#1193)
Mahesh0253 Jan 9, 2023
d53e1c2
Lower the logging level of some log calls
delivrance Jan 9, 2023
a58e198
Sort the lists of known errors
delivrance Jan 9, 2023
2a7110e
Update Pyrogram to v2.0.96
delivrance Jan 9, 2023
82b8c77
Allow to specify a limit to concurrent transmissions
delivrance Jan 12, 2023
283246a
Change connection mode
delivrance Jan 12, 2023
245b7e6
Tweak Session timeouts
delivrance Jan 12, 2023
cfbc848
Update Pyrogram to v2.0.97
delivrance Jan 12, 2023
22e2b7f
Update bug_report.yml
delivrance Feb 10, 2023
5c5dce6
Update API schema to Layer 152 (#1207)
null-nick Feb 10, 2023
53cb3f2
Update Pyrogram to v2.0.98
delivrance Feb 10, 2023
f040aef
Update bug_report.yml
delivrance Feb 11, 2023
2e82fce
Add missing has_spoiler parameter to reply_{animation,photo,video}
jinspalakkattu Feb 11, 2023
96ffc7e
Update Pyrogram to v2.0.99
delivrance Feb 11, 2023
787eabd
Update send_inline_bot_result return type hint
delivrance Feb 26, 2023
d6476ce
Update Pyrogram to v2.0.100
delivrance Feb 26, 2023
a3a4a02
Update chat username parsing in case of multiple usernames
delivrance Mar 11, 2023
fb3f9ac
Update Pyrogram to v2.0.101
delivrance Mar 11, 2023
0a90d54
Separate cases between Channel and ChannelForbidden
delivrance Mar 12, 2023
abed55a
Update Pyrogram to v2.0.102
delivrance Mar 12, 2023
8cff559
Update API schema to Layer 155
delivrance Apr 3, 2023
68c7bd6
Update Pyrogram to v2.0.103
delivrance Apr 3, 2023
bb678a4
Update API schema to Layer 158
delivrance Apr 21, 2023
cea21ad
Update Pyrogram to v2.0.104
delivrance Apr 21, 2023
e24d5b1
Add RSA public keys & IP addresses for some CDN DCs
delivrance Apr 30, 2023
d9d6852
Update Pyrogram to v2.0.105
delivrance Apr 30, 2023
2ff67c7
Move the CDN DC IPv6 to the correct mapping
delivrance Apr 30, 2023
efac171
Update Pyrogram to v2.0.106
delivrance Apr 30, 2023
f67ce78
Update Makefile
delivrance Dec 23, 2024
dc7379f
Update MANIFEST.in
delivrance Dec 23, 2024
f5788f3
Update .github templates
delivrance Dec 23, 2024
30de1e2
Update README.md
delivrance Dec 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
76 changes: 0 additions & 76 deletions .github/CODE_OF_CONDUCT.md

This file was deleted.

1 change: 0 additions & 1 deletion .github/CONTRIBUTING.md

This file was deleted.

2 changes: 0 additions & 2 deletions .github/FUNDING.yml

This file was deleted.

20 changes: 0 additions & 20 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

52 changes: 52 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Bug report
description: Report issues affecting the framework or the documentation
body:
- type: checkboxes
attributes:
label: Checklist
description: Invalid, incomplete or inadequate issue reports may not be taken into consideration
options:
- label: I am sure the error is coming from Pyrogram's code and not elsewhere
required: true
- label: I have searched in the issue tracker for similar bug reports, including closed ones
required: true
- label: I ran `pip3 install -U https://github.com/pyrogram/pyrogram/archive/master.zip` and reproduced the issue using the latest development version
required: true

- type: textarea
attributes:
label: Description
description: Provide a clear and concise description of the issue
placeholder: Description...
validations:
required: true

- type: textarea
attributes:
label: Steps to reproduce
description: Explain precisely how to reproduce the issue
placeholder: |
1.
2.
3.
validations:
required: true

- type: textarea
attributes:
label: Code example
description: Provide a [minimal, complete, consistently reproducible](https://stackoverflow.com/help/minimal-reproducible-example) and properly formatted example involving normal usages (if applicable)
placeholder: |
from pyrogram import Client
...
render: python

- type: textarea
attributes:
label: Logs
description: Provide the complete traceback (if applicable)
placeholder: |
Traceback (most recent call last):
File "main.py", line 1, in <module>
...
render: shell
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: Ask Pyrogram related questions
url: https://stackoverflow.com/questions/tagged/pyrogram
about: This place is only for reporting issues about Pyrogram. You can ask questions on StackOverflow.
- name: Join the Telegram channel
url: https://t.me/pyrogram
about: Join the official channel and stay tuned for news, updates and announcements.
14 changes: 0 additions & 14 deletions .github/ISSUE_TEMPLATE/feature_request.md

This file was deleted.

20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Feature request
description: Suggest ideas, new features or enhancements
labels: [enhancement]
body:
- type: checkboxes
attributes:
label: Checklist
options:
- label: I believe the idea is awesome and would benefit the framework
required: true
- label: I have searched in the issue tracker for similar requests, including closed ones
required: true

- type: textarea
attributes:
label: Description
description: Provide a detailed description of the request
placeholder: Description...
validations:
required: true
15 changes: 0 additions & 15 deletions .github/ISSUE_TEMPLATE/question.md

This file was deleted.

11 changes: 6 additions & 5 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
name: Pyrogram

on: [ push ]
on: [push, pull_request]

jobs:
build:

runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
python-version: [ 3.6, 3.7, 3.8, 3.9 ]
os: [ubuntu-latest, macos-latest]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
Expand All @@ -26,7 +26,8 @@ jobs:

- name: Generate API
run: |
python setup.py generate --api
make venv
make api

- name: Run tests
run: |
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# Development
docs
*.session
config.ini
main.py
unknown_errors.txt
.DS_Store

# Pyrogram generated code
pyrogram/errors/exceptions/
Expand Down
9 changes: 6 additions & 3 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
## Include
# Include files
include README.md COPYING COPYING.lesser NOTICE requirements.txt
recursive-include compiler *.py *.tl *.tsv *.txt
recursive-include tests *.py

## Exclude
# Exclude files
exclude pyrogram/raw/all.py

# Prune directories
prune pyrogram/errors/exceptions
prune pyrogram/raw/functions
prune pyrogram/raw/types
prune pyrogram/raw/base
exclude pyrogram/raw/all.py
42 changes: 42 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
VENV := venv
PYTHON := $(VENV)/bin/python
HOST = $(shell ifconfig | grep "inet " | tail -1 | cut -d\ -f2)
TAG = v$(shell grep -E '__version__ = ".*"' pyrogram/__init__.py | cut -d\" -f2)

RM := rm -rf

.PHONY: venv clean-build clean-api clean api build tag dtag

venv:
$(RM) $(VENV)
python3 -m venv $(VENV)
$(PYTHON) -m pip install -U pip wheel setuptools
$(PYTHON) -m pip install -U -r requirements.txt -r dev-requirements.txt
@echo "Created venv with $$($(PYTHON) --version)"

clean-build:
$(RM) *.egg-info build dist

clean-api:
$(RM) pyrogram/errors/exceptions pyrogram/raw/all.py pyrogram/raw/base pyrogram/raw/functions pyrogram/raw/types

clean:
make clean-build
make clean-api

api:
cd compiler/api && ../../$(PYTHON) compiler.py
cd compiler/errors && ../../$(PYTHON) compiler.py

build:
make clean
$(PYTHON) setup.py sdist
$(PYTHON) setup.py bdist_wheel

tag:
git tag $(TAG)
git push origin $(TAG)

dtag:
git tag -d $(TAG)
git push origin -d $(TAG)
2 changes: 1 addition & 1 deletion NOTICE
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Pyrogram - Telegram MTProto API Client Library for Python
Copyright (C) 2017-2021 Dan <https://github.com/delivrance>
Copyright (C) 2017-present Dan <https://github.com/delivrance>

This file is part of Pyrogram.

Expand Down
Loading