Jacob Bom
1b7f83625c
Update copyright notice to include 2017
...
Not strictly needed, but it helps show that the project is being actively
developed which I find important.
2017-05-15 00:36:49 +03:00
Dickson Tan
11a3de67ea
Remove deprecated code #408 part 1 ( #564 )
...
* Remove non-pep8 dispatcher methods
* callbackqueryhandler: Remove non-pep8 compliant methods
* commandhandler: Remove non-pep8 compliant methods
* handler: Remove non-pep8 compliant methods
* messagehandler: Remove non-pep8 compliant methods
* stringcommandhandler: Remove non-pep8 compliant methods
* stringregexhandler: Remove non-pep8 compliant methods
* test_updater: fix usage of deprecated methods
* dispatcher: fix accidental misalignment of comments by pre-commit hook
* Add myself to list of contributors
2017-04-25 10:39:02 +02:00
thodnev
fb378775a4
Changed promises to handle exceptions
2017-02-26 23:27:03 +02:00
Jannes Höke
aa3ca38837
Sphinx restructuring: Now builds PDF and better HTML docs ( #449 )
...
* update sphinx source files to properly build latexpdf and improve html build
* fix docstrings and sphinx sources to get rid of warnings
* add telegram.contrib.rst
2016-11-01 06:53:51 +01:00
Jannes Höke
10bdf8212c
Add pass_user_data and pass_chat_data to Handler ( #436 )
...
* initial commit for user_data
* add chat_data and use defaultdict
* fix chat_data copy-paste error
* add test for user_data and chat_data
* fix case where chat is None
* remove braces from import line
2016-10-25 19:28:34 +02:00
Michael Elovskikh
46657afa95
Start additional threads only when necessary ( #415 )
...
* Start all additional threads only when necessary.
* Deprecate prevent_autostart in the c'tor of JobQueue.
2016-09-27 10:21:35 +03:00
Noam Meltzer
e4a132c0e4
Reusable dispatcher ( #402 )
...
* Create a Request class which maintains its own connection pool
* When creating a Bot instance a new Request instance will be created if one wasn't supplied.
* Updater is responsible for creating a Request instance if a Bot instance wasn't provided.
* Dispatcher: add method to run async functions without decorator
* Dispatcher can now run as a singleton (allowing run_async decorator to work) as it always did and as multiple instances (where run_async decorator will raise RuntimeError)
2016-09-06 16:38:07 +03:00
Rahiel Kasim
00bba73673
drop Python 2.6 support ( closes #245 ) ( #386 )
...
* drop Python 2.6 support (closes #245 )
* fix NullHandler import
* README: explicitly mention Py3 and PyPy compatibility
2016-08-20 22:01:07 +02:00
Jannes Höke
ad3eec2af8
ConversationHandler ( #331 )
...
* initial commit for conversationhandler and example
* implement simple Promise for run_async/conversationhandler
* refactor Promise._done to done
* add handling for timed out Promises
* correctly handle promises with None results
* fix handling tuple states
* update comments on example
* Added a first test on the ConversationHandler.
* Fixed a small typo.
* Yapf'd.
* add sphinx doc for conversation handler
* fix title for callbackqueryhandler sphinx docs
2016-07-15 01:30:54 +02:00
Noam Meltzer
d192b385ea
dispatcher: add comment to describe the reason for conpool size
2016-07-12 21:58:27 +03:00
Jannes Höke
c4a8ee5175
Merge branch 'master' into jobqueue-rework
...
Conflicts:
tests/test_jobqueue.py
2016-06-20 05:32:15 +02:00
Jannes Höke
7635bc0eec
comments, lock thread pool, while 1 and snake_case everywhere
2016-06-19 23:46:34 +02:00
Noam Meltzer
3608c2bbe5
dispatcher: if connection pool is already initialized raise exception
...
this will better protect the user from wrong usage
2016-06-01 22:30:34 +03:00
Noam Meltzer
c28763c5be
dispatcher: cosmetic fix
2016-06-01 22:30:33 +03:00
Noam Meltzer
dd8b6219b9
dispatcher: a little performance improvment
2016-06-01 22:30:33 +03:00
Noam Meltzer
78f9bdcac9
dispatcher: pep8 style fix
...
globals are supposed to be upper case
2016-06-01 22:30:09 +03:00
Jannes Höke
1ff348adbb
issue warning if connection pool was initialized before Dispatcher
2016-05-31 13:47:43 +02:00
Jannes Höke
41f6591ac6
more sensible logging
2016-05-30 17:12:27 +02:00
Jannes Höke
dd91ce1f39
use single queue for thread pool, initialize connection pool with n+3
2016-05-30 13:09:23 +02:00
Jannes Höke
57759d8e6d
[drunk] use actual thread pool and queue new functions into the pool instead of starting new threads every time
2016-05-30 03:16:33 +02:00
Jannes Höke
783f9c375c
move job_queue kwarg to end
2016-05-28 14:21:39 +02:00
Jannes Höke
bb165b6acf
add pass_job_queue parameter to all handler classes
2016-05-26 14:39:11 +02:00
Jannes Höke
4d770843cc
use non-deprecated methods
2016-05-16 15:02:51 +02:00
Leandro Toledo
d445d35ceb
Running yapf for codebase #259
2016-05-14 22:46:40 -03:00
Rahiel Kasim
592352c849
dispatcher/*handler methods to snake_case + deprecation warnings
2016-04-28 14:29:27 +02:00
Rahiel Kasim
ec15e866be
add snake_case aliases for CamelCase methods
2016-04-28 12:20:42 +02:00
Noam Meltzer
e9a782a3c8
dispatcher.addHandler(): fix docstring
2016-04-26 17:47:37 +03:00
Noam Meltzer
1f83e7ae4e
dispatcher.addHandler(): validate value of group is int
2016-04-26 17:47:37 +03:00
Noam Meltzer
c5ad34b074
dispatcher: style fix
2016-04-26 17:47:37 +03:00
Noam Meltzer
78d1faa21e
dispatcher: on removeHandle(), remove the groups too if it's empty
2016-04-26 17:47:37 +03:00
Noam Meltzer
4ac8f86156
dispatcher: honour the priority of groups
2016-04-26 17:47:37 +03:00
Noam Meltzer
8a087dce69
import queue
(like in py3) directly
...
future module takes care of adding the `queue` package to py2
2016-04-26 17:47:37 +03:00
Noam Meltzer
82282ae125
dispatcher: retrieve Handler class name dynamically
...
this way it is more resilient to class name changes
2016-04-26 17:47:37 +03:00
Jannes Höke
5a7a62c3d8
release semaphore on exceptions
2016-04-24 13:43:42 +02:00
Jannes Höke
b6fceefc80
documentation
2016-04-18 18:13:54 +02:00
Jannes Höke
687a3b0ba1
dispatcher: also break on errors in checkHandler
2016-04-18 17:15:41 +02:00
Jannes Höke
31fba47829
fix super calls and module docs
2016-04-16 19:25:38 +02:00
Jannes Höke
b2045717d6
Merge branch 'bot-api-2.0' into dispatcher-rework
2016-04-16 18:18:37 +02:00
kiddick
a9b305edd0
Fix class declaration according to consistency. ( #235 )
2016-04-15 17:20:37 +03:00
Jannes Höke
1e19084a0d
initial commit for dispatcher rework. deleted updatequeue.py as it is not needed. added handler base class, messagehandler, commandhandler, regexhandler. adjusted dispatcher for new system
2016-04-14 23:57:40 +02:00
Noam Meltzer
e179b27f57
dispatcher: fix wrong variable ( #233 )
2016-04-14 23:23:02 +03:00
Rahiel Kasim
01b90e7ede
small improvements
2016-04-02 23:13:49 +02:00
Jannes Höke
45a47d54bd
move updatequeue to telegram.utils
2016-03-22 02:42:19 +01:00
Leandro Toledo
1e4ae6546f
Changing INFO logs to DEBUG and minor fixes
2016-03-14 22:56:20 -03:00
Rahiel Kasim
dcea2c8015
Merge branch 'master' of https://github.com/leandrotoledo/python-telegram-bot
2016-03-14 15:07:16 +01:00
Rahiel Kasim
98112d3987
move Updater and friends to ext submodule
2016-03-14 14:50:12 +01:00