Merge pull request #213 from python-telegram-bot/prep34

Prepare Release of v3.4
This commit is contained in:
Leandro Toledo 2016-03-21 23:15:38 -03:00
commit 4f26bdd18f
9 changed files with 44 additions and 11 deletions

View file

@ -1,3 +1,13 @@
**2016-03-22**
*Released 3.4*
- Move ``Updater``, ``Dispatcher`` and ``JobQueue`` to new ``telegram.ext`` submodule (thanks to @rahiel)
- Add ``disable_notification`` parameter (thanks to @aidarbiktimirov)
- Fix bug where commands sent by Telegram Web would not be recognized (thanks to @shelomentsevd)
- Add option to skip old updates on bot startup
- Send files from ``BufferedReader``
**2016-02-28**
*Released 3.3*

View file

@ -58,9 +58,9 @@ author = u'Leandro Toledo'
# built documents.
#
# The short X.Y version.
version = '3.3'
version = '3.4'
# The full version, including alpha/beta/rc tags.
release = '3.3.0'
release = '3.4.0'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.

View file

@ -26,7 +26,7 @@ def requirements():
setup(
name='python-telegram-bot',
version='3.3',
version='3.4',
author='Leandro Toledo',
author_email='devs@python-telegram-bot.org',
license='LGPLv3',

View file

@ -52,7 +52,9 @@ from .bot import Bot
def Updater(*args, **kwargs):
"""Load the updater module on invocation and return an Updater instance."""
"""
Load the updater module on invocation and return an Updater instance.
"""
import warnings
warnings.warn("telegram.Updater is being deprecated, please use "
"telegram.ext.Updater from now on.")
@ -60,8 +62,30 @@ def Updater(*args, **kwargs):
return Up(*args, **kwargs)
def Dispatcher(*args, **kwargs):
"""
Load the dispatcher module on invocation and return an Dispatcher instance.
"""
import warnings
warnings.warn("telegram.Dispatcher is being deprecated, please use "
"telegram.ext.Dispatcher from now on.")
from .ext.dispatcher import Dispatcher as Dis
return Dis(*args, **kwargs)
def JobQueue(*args, **kwargs):
"""
Load the jobqueue module on invocation and return a JobQueue instance.
"""
import warnings
warnings.warn("telegram.JobQueue is being deprecated, please use "
"telegram.ext.JobQueue from now on.")
from .ext.jobqueue import JobQueue as JobQ
return JobQ(*args, **kwargs)
__author__ = 'devs@python-telegram-bot.org'
__version__ = '3.3'
__version__ = '3.4'
__all__ = ('Audio', 'Bot', 'Chat', 'Emoji', 'TelegramError', 'InputFile',
'Contact', 'ForceReply', 'ReplyKeyboardHide', 'ReplyKeyboardMarkup',
'UserProfilePhotos', 'ChatAction', 'Location', 'Video', 'Document',

View file

@ -21,8 +21,6 @@
from .dispatcher import Dispatcher
from .jobqueue import JobQueue
from .updatequeue import UpdateQueue
from .updater import Updater
__all__ = ('Dispatcher', 'JobQueue', 'UpdateQueue', 'Updater')
__all__ = ('Dispatcher', 'JobQueue', 'Updater')

View file

@ -27,7 +27,7 @@ from re import match, split
from time import sleep
from telegram import (TelegramError, Update, NullHandler)
from telegram.ext.updatequeue import Empty
from telegram.utils.updatequeue import Empty
logging.getLogger(__name__).addHandler(NullHandler())

View file

@ -29,8 +29,9 @@ from time import sleep
import subprocess
from signal import signal, SIGINT, SIGTERM, SIGABRT
from telegram import Bot, TelegramError, NullHandler
from telegram.ext import dispatcher, Dispatcher, JobQueue, UpdateQueue
from telegram.ext import dispatcher, Dispatcher, JobQueue
from telegram.error import Unauthorized, InvalidToken
from telegram.utils.updatequeue import UpdateQueue
from telegram.utils.webhookhandler import (WebhookServer, WebhookHandler)
logging.getLogger(__name__).addHandler(NullHandler())

View file

@ -48,7 +48,7 @@ except ImportError:
sys.path.append('.')
from telegram import Update, Message, TelegramError, User, Chat, Bot
from telegram.ext.updater import Updater
from telegram.ext import Updater
from telegram.ext.dispatcher import run_async
from telegram.error import Unauthorized, InvalidToken
from tests.base import BaseTest