Skip to content

Commit 4f26bdd

Browse files
committed
Merge pull request python-telegram-bot#213 from python-telegram-bot/prep34
Prepare Release of v3.4
2 parents 5e7f268 + 808945b commit 4f26bdd

File tree

9 files changed

+44
-11
lines changed

9 files changed

+44
-11
lines changed

CHANGES.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
**2016-03-22**
2+
3+
*Released 3.4*
4+
5+
- Move ``Updater``, ``Dispatcher`` and ``JobQueue`` to new ``telegram.ext`` submodule (thanks to @rahiel)
6+
- Add ``disable_notification`` parameter (thanks to @aidarbiktimirov)
7+
- Fix bug where commands sent by Telegram Web would not be recognized (thanks to @shelomentsevd)
8+
- Add option to skip old updates on bot startup
9+
- Send files from ``BufferedReader``
10+
111
**2016-02-28**
212

313
*Released 3.3*

docs/source/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@
5858
# built documents.
5959
#
6060
# The short X.Y version.
61-
version = '3.3'
61+
version = '3.4'
6262
# The full version, including alpha/beta/rc tags.
63-
release = '3.3.0'
63+
release = '3.4.0'
6464

6565
# The language for content autogenerated by Sphinx. Refer to documentation
6666
# for a list of supported languages.

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def requirements():
2626

2727
setup(
2828
name='python-telegram-bot',
29-
version='3.3',
29+
version='3.4',
3030
author='Leandro Toledo',
3131
author_email='devs@python-telegram-bot.org',
3232
license='LGPLv3',

telegram/__init__.py

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,16 +52,40 @@
5252

5353

5454
def Updater(*args, **kwargs):
55-
"""Load the updater module on invocation and return an Updater instance."""
55+
"""
56+
Load the updater module on invocation and return an Updater instance.
57+
"""
5658
import warnings
5759
warnings.warn("telegram.Updater is being deprecated, please use "
5860
"telegram.ext.Updater from now on.")
5961
from .ext.updater import Updater as Up
6062
return Up(*args, **kwargs)
6163

6264

65+
def Dispatcher(*args, **kwargs):
66+
"""
67+
Load the dispatcher module on invocation and return an Dispatcher instance.
68+
"""
69+
import warnings
70+
warnings.warn("telegram.Dispatcher is being deprecated, please use "
71+
"telegram.ext.Dispatcher from now on.")
72+
from .ext.dispatcher import Dispatcher as Dis
73+
return Dis(*args, **kwargs)
74+
75+
76+
def JobQueue(*args, **kwargs):
77+
"""
78+
Load the jobqueue module on invocation and return a JobQueue instance.
79+
"""
80+
import warnings
81+
warnings.warn("telegram.JobQueue is being deprecated, please use "
82+
"telegram.ext.JobQueue from now on.")
83+
from .ext.jobqueue import JobQueue as JobQ
84+
return JobQ(*args, **kwargs)
85+
86+
6387
__author__ = 'devs@python-telegram-bot.org'
64-
__version__ = '3.3'
88+
__version__ = '3.4'
6589
__all__ = ('Audio', 'Bot', 'Chat', 'Emoji', 'TelegramError', 'InputFile',
6690
'Contact', 'ForceReply', 'ReplyKeyboardHide', 'ReplyKeyboardMarkup',
6791
'UserProfilePhotos', 'ChatAction', 'Location', 'Video', 'Document',

telegram/ext/__init__.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@
2121

2222
from .dispatcher import Dispatcher
2323
from .jobqueue import JobQueue
24-
from .updatequeue import UpdateQueue
2524
from .updater import Updater
2625

27-
28-
__all__ = ('Dispatcher', 'JobQueue', 'UpdateQueue', 'Updater')
26+
__all__ = ('Dispatcher', 'JobQueue', 'Updater')

telegram/ext/dispatcher.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
from time import sleep
2828

2929
from telegram import (TelegramError, Update, NullHandler)
30-
from telegram.ext.updatequeue import Empty
30+
from telegram.utils.updatequeue import Empty
3131

3232
logging.getLogger(__name__).addHandler(NullHandler())
3333

telegram/ext/updater.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@
2929
import subprocess
3030
from signal import signal, SIGINT, SIGTERM, SIGABRT
3131
from telegram import Bot, TelegramError, NullHandler
32-
from telegram.ext import dispatcher, Dispatcher, JobQueue, UpdateQueue
32+
from telegram.ext import dispatcher, Dispatcher, JobQueue
3333
from telegram.error import Unauthorized, InvalidToken
34+
from telegram.utils.updatequeue import UpdateQueue
3435
from telegram.utils.webhookhandler import (WebhookServer, WebhookHandler)
3536

3637
logging.getLogger(__name__).addHandler(NullHandler())
File renamed without changes.

tests/test_updater.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
sys.path.append('.')
4949

5050
from telegram import Update, Message, TelegramError, User, Chat, Bot
51-
from telegram.ext.updater import Updater
51+
from telegram.ext import Updater
5252
from telegram.ext.dispatcher import run_async
5353
from telegram.error import Unauthorized, InvalidToken
5454
from tests.base import BaseTest

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy