Commit graph

3,407 commits

Author SHA1 Message Date
Laurent Bachelier
e52e85022a logging: Restore more discreet DEBUG color 2014-10-08 15:52:12 +02:00
Laurent Bachelier
72819cdb67 html2text: Use the class if possible 2014-10-08 15:45:40 +02:00
Laurent Bachelier
362b441445 newsfeed: No need for workaround with feedparser>=5.1 2014-10-08 15:45:40 +02:00
Romain Bignon
65ece349db HTMLPage checks the inner charset and parse again document if it is not the same than Content-Type HTTP header 2014-10-08 15:42:58 +02:00
Bezleputh
d73c6b2245 Add a " LIMIT " keyword in conditions 2014-10-08 13:05:40 +02:00
Bezleputh
c2654ba06d [CapHousing] fix pep8 2014-10-08 10:45:31 +02:00
Bezleputh
77995378c5 [housing] adding a url field in housing capability and management of it in flatboob 2014-10-08 10:45:31 +02:00
Laurent Bachelier
7be9a6468b logging: Create a new level DEBUG_FILTERS
This is a cleaner approach that requires less configuration
in other applications.
This also easily allows us to have another color.

Many checks were made on being exactly at the DEBUG level, they were
fixed to also check on being below DEBUG (i.e. DEBUG_FILTERS).
2014-10-07 17:11:09 +02:00
Laurent Bachelier
822c1a3607 Proper English 2014-10-07 16:47:28 +02:00
Laurent Bachelier
a330b08262 logging: Better colors
Inspired by https://github.com/borntyping/python-colorlog
INFO had no colors.
You can run weboob/tools/log.py to test them.
2014-10-07 16:44:39 +02:00
Laurent Bachelier
24aea160b1 logging: Output to stderr, not stdout 2014-10-07 16:10:51 +02:00
Romain Bignon
5bd70c564f os.isatty is now forbidden (as stream.fileno() is not implemented by StringIO)
Use stream.isatty() instead.
2014-10-07 09:39:12 +02:00
Romain Bignon
8508f951f5 fix docstrings and add weboob.browser.* in nosetests 2014-10-07 09:31:10 +02:00
Romain Bignon
c281d7a255 fix doctests 2014-10-07 09:20:07 +02:00
Romain Bignon
47c2257490 add Investment.description field 2014-10-07 00:36:29 +02:00
Romain Bignon
d61e15cf84 rename things related to browsers
weboob.tools.browser -> weboob.deprecated.browser
weboob.tools.parsers -> weboob.deprecated.browser.parsers
weboob.tools.mech -> weboob.deprecated.mech
weboob.browser2 -> weboob.browser
weboob.core.exceptions -> weboob.exceptions

Also, the new tree for browser2 is:

weboob.browser: import weboob.browser.browsers.* and weboob.browser.url.*
weboob.browser.browsers: all browsers (including PagesBrowser and LoginBrowser)
weboob.browser.url: the URL class
weboob.browser.profiles: all Profile classes
weboob.browser.sessions: WeboobSession and FuturesSession
weboob.browser.cookies: that's a cookies thing
weboob.browser.pages: all Page and derivated classes, and Form class
weboob.browser.exceptions: specific browser exceptions
weboob.browser.elements: AbstractElement classes, and 'method' decorator
weboob.browser.filters.*: all filters
2014-10-07 00:30:07 +02:00
Romain Bignon
c6c856fa86 fix crash if departure time is not available 2014-10-06 17:31:18 +02:00
Laurent Bachelier
74a4ef6723 Use the print function everywhere
python modernize.py --no-six -f libmodernize.fixes.fix_print -w

With manual fixes as the import was put always on top.
2014-10-06 17:00:17 +02:00
Laurent Bachelier
719435c3d7 Force absolute import 2014-10-06 13:56:24 +02:00
Florent
5e832eb235 Fix select parameters 2014-10-03 15:58:29 +02:00
Bezleputh
f89f3a83ee [filters] missing parameters in select method 2014-10-03 15:58:28 +02:00
Florent
9949bbf919 Move exceptions to weboob.core.exceptions 2014-10-02 11:04:14 +02:00
Florent
a019819f9d Move browser2 from weboob/tools/b2 to weboob/browser2 2014-10-02 11:01:34 +02:00
Florent
990bb056eb Replace -D with -dd 2014-10-02 10:56:11 +02:00
Florent
cba66416b2 Expand html/xml in debug mode 2014-10-02 10:56:11 +02:00
Florent
bdd2be4d4b introduce an incremental id to help the debug reading 2014-10-02 10:56:11 +02:00
Florent
ef9e45a544 Print obj.attr first 2014-10-02 10:56:11 +02:00
Florent
20b5a534c5 Display results in debug only once 2014-10-02 10:56:11 +02:00
Florent
5a4920748d Get objects id and attribut name in debug 2014-10-02 10:56:11 +02:00
Florent
dbc33de235 Use %r and not %s 2014-10-02 10:56:11 +02:00
Florent
a3d8217fb7 Add the type in formatting 2014-10-02 10:56:11 +02:00
Florent
d89ef22772 Make some attribute private 2014-10-02 10:56:11 +02:00
Florent
b84b25db66 Fix formatting and add some black magic to @debug 2014-10-02 10:56:11 +02:00
Florent
5daba0f8ab Add debug on some standards filters 2014-10-02 10:56:11 +02:00
Florent
23aec4046c Add -D option to base applications 2014-10-02 10:56:11 +02:00
Florent
1b0096e6e3 Add a DebugFilter class to weboob/tools/log.py
The browser2 filter debugging is an extra level of "Debug". Since python
logging does not support adding severity levels, we use the Filter class
to remove the lines by default.

Sadly, we cannot pass variable to filters (logging system does not use
the instance passed with addFilter method), so we use to write a filter
for each use case (today: only one...)
2014-10-02 10:56:11 +02:00
Florent
b337d2f655 Add debug pre-processor 2014-10-02 10:56:11 +02:00
Florent
dd5213b761 Add __str__ to _Filters 2014-10-02 10:56:11 +02:00
Bezleputh
38bc6819df [flatboob] fix bug type_of_good does not exist anymore 2014-10-01 17:43:21 +02:00
Bezleputh
017c6f7e54 handle datetime in condition argument 2014-10-01 17:43:21 +02:00
Laurent Bachelier
deb1249e65 browser2: Fix error message text 2014-10-01 16:23:04 +02:00
Florent
54a1bc4809 Remove * imports in filters 2014-09-29 22:31:54 +02:00
Florent
fbd8cf1a64 Move CleanHTML to html filters 2014-09-29 22:31:54 +02:00
Bezleputh
9a7d5edb79 [flatboob] add load command 2014-09-27 12:13:17 +02:00
Florent
0f4f1222b7 s/backend/module in docstrings 2014-09-26 10:18:12 +02:00
Florent
0088013ae1 Rename BaseBrowser to Browser 2014-09-26 10:18:12 +02:00
Florent
444d36eee8 Rename BasePage to Page 2014-09-26 10:18:12 +02:00
Florent
44dffce7b2 Rename CapBase to Capability 2014-09-26 10:18:12 +02:00
Florent
a64c9f2edb Rename BaseApplication to Application 2014-09-26 10:18:12 +02:00
Florent
5a1d83b567 Rename BaseModule to Module and Module to LoadedModule 2014-09-26 10:18:12 +02:00