Skip to content

Commit

Permalink
Merge pull request #213 from python-telegram-bot/prep34
Browse files Browse the repository at this point in the history
Prepare Release of v3.4
  • Loading branch information
leandrotoledo committed Mar 22, 2016
2 parents 5e7f268 + 808945b commit 4f26bdd
Show file tree
Hide file tree
Showing 9 changed files with 44 additions and 11 deletions.
10 changes: 10 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -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*
Expand Down
4 changes: 2 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@
# 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.
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
28 changes: 26 additions & 2 deletions telegram/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,40 @@


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.")
from .ext.updater import Updater as Up
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',
Expand Down
4 changes: 1 addition & 3 deletions telegram/ext/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
2 changes: 1 addition & 1 deletion telegram/ext/dispatcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
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())

Expand Down
3 changes: 2 additions & 1 deletion telegram/ext/updater.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@
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())
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion tests/test_updater.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
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
Expand Down

0 comments on commit 4f26bdd

Please sign in to comment.