diff --git a/tools/stable_backport.py b/tools/stable_backport.py index 148c91092536ed923337c19eed2278b95ad13d89..e6ae4023bae3a831ed68e249e3730db91fc7daad 100755 --- a/tools/stable_backport.py +++ b/tools/stable_backport.py @@ -43,13 +43,6 @@ def create_compat_dir(name): MANUAL_PORTS = [ - 'weboob.capabilities.bank', - 'weboob.capabilities.housing', - 'weboob.capabilities.recipe', - 'weboob.browser.pages', - 'weboob.browser.exceptions', - 'weboob.exceptions', - 'weboob.browser.filters.html', ] MANUAL_PORT_DIR = path.join(path.dirname(__file__), 'stable_backport_data') @@ -211,9 +204,6 @@ def main(self): error.fixup() system('git add %s' % compat_dirname) - with log('Custom fixups'): - replace_all("from weboob.browser.exceptions import LoggedOut", "from .weboob_browser_exceptions import LoggedOut") - system('git add -u') diff --git a/tools/stable_backport_data/weboob_browser_exceptions.py b/tools/stable_backport_data/weboob_browser_exceptions.py deleted file mode 100644 index d08f643f48785931aae55a3deaba7f17ff9984f0..0000000000000000000000000000000000000000 --- a/tools/stable_backport_data/weboob_browser_exceptions.py +++ /dev/null @@ -1,6 +0,0 @@ - -from weboob.browser.exceptions import * - -class LoggedOut(Exception): - pass - diff --git a/tools/stable_backport_data/weboob_browser_filters_html.py b/tools/stable_backport_data/weboob_browser_filters_html.py deleted file mode 100644 index 042780c54325fcbc116c7d34abf0d24937132cff..0000000000000000000000000000000000000000 --- a/tools/stable_backport_data/weboob_browser_filters_html.py +++ /dev/null @@ -1,5 +0,0 @@ - -from weboob.browser.filters.html import * -from weboob.browser.filters.standard import ColumnNotFound - - diff --git a/tools/stable_backport_data/weboob_browser_pages.py b/tools/stable_backport_data/weboob_browser_pages.py deleted file mode 100644 index 35b966ab28d14918516fac76c53f37ecbe32a65d..0000000000000000000000000000000000000000 --- a/tools/stable_backport_data/weboob_browser_pages.py +++ /dev/null @@ -1,13 +0,0 @@ - -from weboob.browser.pages import * - -from .weboob_browser_exceptions import LoggedOut - - -class LoginPage(object): - def on_load(self): - if not self.browser.logging_in: - raise LoggedOut() - - super(LoginPage, self).on_load() - diff --git a/tools/stable_backport_data/weboob_capabilities_bank.py b/tools/stable_backport_data/weboob_capabilities_bank.py deleted file mode 100644 index 404e8d30ed28683c8a27f183d1e670c10509ce56..0000000000000000000000000000000000000000 --- a/tools/stable_backport_data/weboob_capabilities_bank.py +++ /dev/null @@ -1,40 +0,0 @@ - -import weboob.capabilities.bank as OLD - -# can't import *, __all__ is incomplete... -for attr in dir(OLD): - globals()[attr] = getattr(OLD, attr) - - -__all__ = OLD.__all__ - - -class CapBankWealth(CapBank): - pass - - -class CapBankPockets(CapBank): - pass - - -class Rate(BaseObject, Currency): - pass - -class CapCurrencyRate(CapBank): - pass - - -class CapBankTransfer(OLD.CapBankTransfer): - def transfer_check_label(self, old, new): - from unidecode import unidecode - - return unidecode(old) == unidecode(new) - - -class CapBankTransferAddRecipient(CapBankTransfer, OLD.CapBankTransferAddRecipient): - pass - - -Account.TYPE_MORTGAGE = 17 -Account.TYPE_CONSUMER_CREDIT = 18 -Account.TYPE_REVOLVING_CREDIT = 19 diff --git a/tools/stable_backport_data/weboob_capabilities_housing.py b/tools/stable_backport_data/weboob_capabilities_housing.py deleted file mode 100644 index f763fcbaf7f9b168db3d2069e15ff965d2faac3d..0000000000000000000000000000000000000000 --- a/tools/stable_backport_data/weboob_capabilities_housing.py +++ /dev/null @@ -1,31 +0,0 @@ - -import weboob.capabilities.housing as OLD - -# can't import *, __all__ is incomplete... -for attr in dir(OLD): - globals()[attr] = getattr(OLD, attr) - - -__all__ = OLD.__all__ - - -ENERGY_CLASS = enum(A=u'A', B=u'B', C=u'C', D=u'D', E=u'E', F=u'F', G=u'G') - - -POSTS_TYPES = enum(RENT=u'RENT', - SALE=u'SALE', - SHARING=u'SHARING', - FURNISHED_RENT=u'FURNISHED_RENT', - VIAGER=u'VIAGER') - - -ADVERT_TYPES = enum(PROFESSIONAL=u'Professional', PERSONAL=u'Personal') - - -HOUSE_TYPES = enum(APART=u'Apartment', - HOUSE=u'House', - PARKING=u'Parking', - LAND=u'Land', - OTHER=u'Other', - UNKNOWN=u'Unknown') - diff --git a/tools/stable_backport_data/weboob_capabilities_recipe.py b/tools/stable_backport_data/weboob_capabilities_recipe.py deleted file mode 100644 index a7e73f76722312dde8204b084234ecc97aa86ad9..0000000000000000000000000000000000000000 --- a/tools/stable_backport_data/weboob_capabilities_recipe.py +++ /dev/null @@ -1,16 +0,0 @@ - -import weboob.capabilities.recipe as OLD - -# can't import *, __all__ is incomplete... -for attr in dir(OLD): - globals()[attr] = getattr(OLD, attr) - - -class Recipe(OLD.Recipe): - @property - def picture_url(self): - return getattr(self, 'picture', None) and self.picture.url - - @property - def thumbnail_url(self): - return getattr(self, 'picture', None) and self.picture.thumbnail and self.picture.thumbnail.url diff --git a/tools/stable_backport_data/weboob_exceptions.py b/tools/stable_backport_data/weboob_exceptions.py deleted file mode 100644 index e1912dfbf13e2acd7d6a676b5765d962a734925f..0000000000000000000000000000000000000000 --- a/tools/stable_backport_data/weboob_exceptions.py +++ /dev/null @@ -1,46 +0,0 @@ - -from weboob.exceptions import * - - -class AuthMethodNotImplemented(Exception): - pass - - -class CaptchaQuestion(Exception): - """Site requires solving a CAPTCHA (base class)""" - # could be improved to pass the name of the backendconfig key - - def __init__(self, type=None, **kwargs): - super(CaptchaQuestion, self).__init__("The site requires solving a captcha") - self.type = type - for key, value in kwargs.items(): - setattr(self, key, value) - - -class ImageCaptchaQuestion(CaptchaQuestion): - type = 'image_captcha' - - image_data = None - - def __init__(self, image_data): - super(ImageCaptchaQuestion, self).__init__(self.type, image_data=image_data) - - -class NocaptchaQuestion(CaptchaQuestion): - type = 'g_recaptcha' - - website_key = None - website_url = None - - def __init__(self, website_key, website_url): - super(NocaptchaQuestion, self).__init__(self.type, website_key=website_key, website_url=website_url) - - -class RecaptchaQuestion(CaptchaQuestion): - type = 'g_recaptcha' - - website_key = None - website_url = None - - def __init__(self, website_key, website_url): - super(RecaptchaQuestion, self).__init__(self.type, website_key=website_key, website_url=website_url)