Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
b4f6581
Added publish on PyPi (#27)
null-nick Sep 10, 2024
b6f49d0
updated `README`
null-nick Sep 13, 2024
a0bb0b5
fixes thanks to https://github.com/KurimuzonAkuma/pyrogram/
null-nick Sep 13, 2024
6c7e2d4
Added support for `config.ini`
null-nick Sep 13, 2024
e99e998
Add error handling for missing config file in `load_config`
null-nick Sep 13, 2024
0f2e78a
improve `config.ini` implementation
null-nick Sep 13, 2024
ab7f20c
fixed pypi publish
null-nick Sep 13, 2024
a0d6b65
Version Bump
null-nick Sep 13, 2024
96c8c11
fixed `reaction count None` (#25)
null-nick Sep 15, 2024
ce77f8a
updated `readme.md`
null-nick Sep 15, 2024
a222890
fix: private filter support in CallbackQuery (thanks to: https://gith…
null-nick Sep 15, 2024
e11b78b
Ignore PersistentTimestamp errors
KurimuzonAkuma Aug 28, 2024
7a4e2cf
Extract recovering gaps into a separate method
KurimuzonAkuma Aug 28, 2024
dc71b22
Fix save_file in case client.me is None
KurimuzonAkuma Aug 27, 2024
82d9fd0
Fix (iabw) parsing reactions
SpEcHiDe Aug 16, 2024
9002006
Version Bump
null-nick Sep 15, 2024
f04b254
merge
null-nick Sep 15, 2024
583ce6d
save_files fixes
null-nick Sep 15, 2024
d642f3e
Version Bump
null-nick Sep 15, 2024
8ed2848
attempt to fix: `OSError: unable to perform operation on <TCPTranspor…
null-nick Sep 16, 2024
0340cc7
Update API scheme to layer 188.
null-nick Sep 19, 2024
8d3190f
Automate error scrapping
SpEcHiDe Apr 2, 2024
2253d14
Update unknown_errors (#28)
github-actions[bot] Sep 19, 2024
13e4f16
update `scrape-errors.yml`
null-nick Sep 19, 2024
af42303
Update API scheme to layer 189.
null-nick Sep 28, 2024
ebef855
Update API scheme to layer 190.
null-nick Oct 6, 2024
43af913
Add alternative_videos to Message
SpEcHiDe Oct 5, 2024
6263e4c
Update API scheme to layer 192.
null-nick Oct 29, 2024
4c3c9c9
Update API scheme to layer 193.
null-nick Nov 14, 2024
5e6baf0
refactor(session): replace recursion with loop and add backoff
null-nick Nov 20, 2024
583be25
`Version Bump`
null-nick Nov 21, 2024
b490498
Update API scheme to layer 194.
null-nick Nov 23, 2024
86c66e5
Version Bump
null-nick Nov 23, 2024
893cbe2
Update API scheme to layer 195.
null-nick Nov 29, 2024
a04d1b8
Update API scheme to layer 195. (v2)
null-nick Nov 29, 2024
b158b28
Update API scheme to layer 195. (v3)
null-nick Dec 5, 2024
dd4cf8c
Update API scheme to layer 196.
null-nick Jan 2, 2025
e3f8158
fixed wrong url in the documentation
null-nick Jan 17, 2025
473b9c1
updated some links
null-nick Jan 17, 2025
f342047
url fix
null-nick Jan 21, 2025
4e50aea
Update API scheme to layer 199.
null-nick Feb 12, 2025
e0b0055
Revert "Update API scheme to layer 199."
null-nick Feb 18, 2025
2182c73
Reapply "Update API scheme to layer 199."
null-nick Feb 21, 2025
a1c5ac0
fixed `AttributeError: module 'pyrogram.raw.types' has no attribute '…
null-nick Feb 21, 2025
4db579e
Fix parsing reactions
null-nick Feb 21, 2025
9571fbb
Update API scheme to layer 200.
null-nick Mar 7, 2025
da0a6d6
Automated update of unknown_errors
github-actions[bot] Mar 11, 2025
8960716
improved `scrape errors` script
null-nick Mar 11, 2025
319f5f7
Automated update of unknown_errors
github-actions[bot] Mar 11, 2025
a620f05
improved workflow for scrape errors
null-nick Mar 11, 2025
21f2a3b
Update API scheme on layer 201.
null-nick Apr 11, 2025
d248104
Update API scheme on layer 202.
null-nick May 1, 2025
14e2f57
Update API scheme on layer 203.
null-nick May 13, 2025
1aba00a
Fixed type hinting on `raw methods`
null-nick May 13, 2025
bc48e25
Version Bump
null-nick May 13, 2025
2d351d0
fix image on `readme`
null-nick May 13, 2025
963db5e
Version Bump
null-nick May 13, 2025
a768130
fixed docs generation
null-nick May 13, 2025
f03b9bc
Update API scheme to layer 208.
null-nick Jul 6, 2025
c6faa69
Update API scheme to layer 214.
null-nick Aug 31, 2025
5c8be0f
Automated update of unknown_errors
github-actions[bot] Oct 8, 2025
6c63811
Add Python 3.13 support
null-nick Oct 11, 2025
3ffb9a5
Update API scheme to layer 216.
null-nick Oct 11, 2025
3b70fb4
Added `use_experimental_download_boost`
null-nick Oct 11, 2025
e638c2a
Version Bump
null-nick Oct 11, 2025
95dd028
fixed raw base docs
null-nick Oct 11, 2025
641b1be
fixed CodeQL analysis
null-nick Oct 11, 2025
c6081a8
fixed notice `Workflow does not contain permissions` reported by code…
null-nick Oct 11, 2025
45c01b7
migrated to `pyproject.toml`
null-nick Oct 11, 2025
8401c20
fix docs generation + fixed raw docs description generation
null-nick Oct 11, 2025
fd289cc
removed useless dependencies from `pyproject.toml` + reworked `python…
null-nick Oct 11, 2025
eb97aa9
Version Bump
null-nick Oct 11, 2025
16d0127
fixed image on readme
null-nick Oct 11, 2025
e576618
Version Bump
null-nick Oct 11, 2025
05606cd
fixes
null-nick Oct 11, 2025
8762f4c
Version Bump
null-nick Oct 11, 2025
2958090
fixes
null-nick Oct 11, 2025
1935f8d
Version Bump
null-nick Oct 11, 2025
4203db1
Drop Python 3.8 support and update project metadata
null-nick Oct 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ body:
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
- label: I ran `pip3 install -U https://github.com/pyrogrammod/pyrogrammod/archive/master.zip` and reproduced the issue using the latest development version
required: true

- type: textarea
Expand Down
8 changes: 0 additions & 8 deletions .github/ISSUE_TEMPLATE/config.yml

This file was deleted.

73 changes: 27 additions & 46 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,71 +1,52 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [ main ]
branches: [ "main" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ main ]
branches: [ "main" ]
schedule:
- cron: '38 8 * * 5'
- cron: '26 2 * * 6'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
name: Analyze (${{ matrix.language }})
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
permissions:
security-events: write
packages: read
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: ['python' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
include:
- language: actions
build-mode: none
- language: python
build-mode: none

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2

# Command-line programs to run using the OS shell.
# https://git.io/JvXDl

# If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release
build-mode: ${{ matrix.build-mode }}
- if: matrix.build-mode == 'manual'
shell: bash
run: |
echo 'If you are using a "manual" build mode for one or more of the' \
'languages you are analyzing, replace this with the commands to build' \
'your code, for example:'
echo ' make bootstrap'
echo ' make release'
exit 1

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
51 changes: 51 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# This is the workflow to make and push wheels to PyPi

name: Build Wheels
on:
workflow_dispatch:
inputs:
publish:
description: 'Publish to PyPi'
required: false
default: false
type: boolean

jobs:
build:
runs-on: ubuntu-latest
permissions:
id-token: write

steps:
- name: Check out the repo
uses: actions/checkout@v4

- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: 3.12

- name: Install dependencies
run: python3.12 -m pip install --upgrade pip setuptools wheel

- name: Create wheels directory
run: mkdir -p wheels

- name: Build wheel
run: python3.12 -m pip wheel . --no-deps --wheel-dir wheels

- name: List wheel contents
run: ls -l wheels

- uses: actions/upload-artifact@v4
with:
name: program-mod-wheel
path: ./wheels/pyrogrammod*.whl
if-no-files-found: error

- name: Publish a Python distribution to PyPI
if: github.event.inputs.publish == 'true'
uses: pypa/gh-action-pypi-publish@release/v1
with:
skip-existing: true
packages-dir: wheels/
27 changes: 17 additions & 10 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,41 @@
name: Pyrogram - Mod

on: [push, pull_request]
permissions:
contents: read

on:
push:
pull_request:

jobs:
build:

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

steps:
- uses: actions/checkout@v3
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "pip"

- name: Install dependencies
- name: Upgrade pip and install dependencies
run: |
python -m pip install --upgrade pip
pip install tox
pip install --upgrade tox wheel setuptools

- name: Generate API
run: |
make venv
make api

- name: Run tests
run: |
tox
- name: Run tests with tox
env:
PYTHONWARNINGS: "ignore"
run: tox
53 changes: 53 additions & 0 deletions .github/workflows/scrape-errors.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Scrape Errors

on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *' # Run daily at midnight UTC

jobs:
scrape_and_commit:
name: Scrape and Update Error Lists
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 1

- name: Set up Python 3.9
uses: actions/setup-python@v3
with:
python-version: '3.9'

- name: Install Python dependencies and run scripts
run: |
set -e # Exit immediately if a command exits with a non-zero status
echo "-------------------- Installing dependencies --------------------"
cd compiler/errors/
python -m pip install --upgrade pip setuptools wheel
python -m pip install requests==2.28.1
echo "-------------------- Running scrape script --------------------"
python sort.py scrape
echo "-------------------- Running sort script --------------------"
python sort.py sort

- name: Check for changes and commit
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "GitHub Actions Bot"

if ! git diff --quiet; then # Check if there are any changes
echo "Changes detected in error files."
git add .
git commit -m "Automated update of unknown_errors"
echo "Committing and pushing changes..."
git push origin main
else
echo "No changes detected in error files. Skipping commit and push."
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -129,3 +129,4 @@ venv.bak/
.mypy_cache/
docs_build.sh
.buildinfo
json_docs.py
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: 2
build:
os: ubuntu-22.04
tools:
python: "3.11"
python: "3.13"
jobs:
post_install:
- pip install .[docs]
Expand Down
28 changes: 19 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
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)
ifeq ($(OS),Windows_NT)
PYTHON := $(VENV)/Scripts/python.exe
endif

HOST := $(shell ifconfig | grep "inet " | tail -1 | cut -d\ -f2 2>/dev/null || echo "127.0.0.1")
TAG := v$(shell grep -E '__version__ = ".*"' pyrogram/__init__.py | cut -d\" -f2)

RM := rm -rf

.PHONY: venv clean-build clean-api clean api build docs clean-docs
NUM_CORES := $(shell $(PYTHON) -c "import os; print(os.cpu_count())")

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

venv:
$(RM) $(VENV)
Expand All @@ -20,9 +26,14 @@ clean-build:
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
clean-pyc:
find . -name "*.pyc" -exec $(RM) {} + || true
find . -name "__pycache__" -exec $(RM) {} + || true

clean-ds_store:
find . -name ".DS_Store" -exec $(RM) {} \;

clean: clean-build clean-api clean-pyc clean-ds_store clean-docs

clean-docs:
$(RM) docs/build
Expand All @@ -35,8 +46,7 @@ api:
docs:
make clean-docs
cd compiler/docs && ../../$(PYTHON) compiler.py
$(VENV)/bin/sphinx-build \
-b html "docs/source" "docs/build/html" -j6
$(PYTHON) -m sphinx -b html "docs/source" "docs/build/html" -j$(NUM_CORES)

build:
make clean
Expand All @@ -49,4 +59,4 @@ tag:

dtag:
git tag -d $(TAG)
git push origin -d $(TAG)
git push origin -d $(TAG)
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
<img src="https://pyrogrammod.readthedocs.io/en/latest/_static/pyrogram.png" alt="Pyrogram" width="128">
</a>
<br>
<b>Telegram MTProto API Framework for Python</b> (Fork of <a href="github.com/pyrogram/pyrogram">Pyrogram</a>)
<b>Telegram MTProto API Framework for Python</b> (Fork of <a href="https://github.com/pyrogram/pyrogram">Pyrogram</a>)
<br>
<a href="https://pyrogrammod.readthedocs.io/">
<a href="https://pyrogrammod.readthedocs.io/en/latest/">
Homepage
</a>
<a href="https://pyrogrammod.readthedocs.io/">
<a href="https://pyrogrammod.readthedocs.io/en/latest/">
Documentation
</a>
Expand All @@ -18,7 +18,7 @@
</a>
</p>

## Pyrogram
# PyrogramMod <br>[![PyPI](https://img.shields.io/pypi/v/pyrogrammod.svg?logo=python&logoColor=%23959DA5&label=pypi&labelColor=%23282f37)](https://pypi.org/project/pyrogrammod/) [![Downloads](https://pepy.tech/badge/pyrogrammod)](https://pepy.tech/project/pyrogrammod)

> Elegant, modern and asynchronous Telegram MTProto API framework in Python for users and bots

Expand Down Expand Up @@ -67,7 +67,7 @@ pip3 install https://github.com/PyrogramMod/PyrogramMod/archive/refs/heads/main.
### Resources

- The docs contain lots of resources to help you get started with Pyrogram: https://docs.pyrogram.org.
- Seeking extra help? Come join and ask our community: https://t.me/pyrogram.
- Seeking extra help? Come join and ask our community: https://t.me/pyrogrammodchat.
- For other kind of inquiries, you can send a [message](https://t.me/haskell) or an [e-mail](mailto:dan@pyrogram.org).

### Copyright & License
Expand All @@ -83,11 +83,11 @@ pip3 install https://github.com/PyrogramMod/PyrogramMod/archive/refs/heads/main.
- 📚 Docs: https://docs.pyrogram.org
------------------------------------------------------------
- 📕 Un-Official Repo: https://github.com/PyrogramMod/PyrogramMod/
- 🗞 News: https://t.me/PyroGramMod
- 🗞 News: https://t.me/PyroGramModNews
- 💭 Support Group: https://t.me/pyrogramodchat
- 📚 Docs: https://pyrogrammod.readthedocs.io/
- 📚 Docs: https://pyrogrammod.readthedocs.io/en/latest/
------------------------------------------------------------

- Check out the docs at https://docs.pyrogram.org to learn more about Pyrogram, get started right
away and discover more in-depth material for building your client applications.
- Join the official channel at https://t.me/pyrogram and stay tuned for news, updates and announcements.
- Join the official channel at https://t.me/PyroGramModNews and stay tuned for news, updates and announcements.
Loading