From 00d9398416a745a10652dbddc7cdc09f4d786c14 Mon Sep 17 00:00:00 2001 From: python273 Date: Sun, 31 Oct 2021 07:36:44 +0300 Subject: [PATCH] Update version to 2.0.0 --- .travis.yml | 25 ------------------------- README.md | 15 +++++---------- setup.py | 10 +++------- telegraph/__init__.py | 2 +- telegraph/exceptions.py | 2 -- 5 files changed, 9 insertions(+), 45 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 70d4669..0000000 --- a/.travis.yml +++ /dev/null @@ -1,25 +0,0 @@ -language: python -python: - - "2.7" - - "3.4" - - "3.5" - - "3.6" - - "3.7" - - "3.8" - # PyPy versions - - "pypy" - - "pypy3" -install: - - "pip install -r requirements.txt" - - "pip install ." - - "pip install nose" -script: nosetests - -deploy: - provider: pypi - user: python273_travisci - password: - secure: n7NMKDxCHymJqVgXgNcdWT2LCHorSGwp6waJG4Xibqc7OEfTUX2S8I5kW45y2QDORTi8GuHKuR6GaPHvMPIt1VspgFQPDzNx4fVCzzq2ej7uyC32qFo2A7e6l2S8CojIXdtm9TffRGxQ5dsY7fNtzU8I0xc821pjufVHpzDP4lyea+udRueZB33xa2KiLFnsDFbsIJzHLQTJUcdgav70uyUFQRf1WLrRILIiX9NzFKHVY5WM3TuME9T2HTR43ZGmv/8xF72ufMb9zMK0gP58L3dcvFFPPn4382obXoQGZkrZj+jWXSjrFeZDM4MKlrYnLuRmwYOpwP3E0O2Zi5XTXRuMDrBB4T4LvvSVjlrDB0p6bOuGiV92yZJoeeIA5tT2aIlq/T2OIW/N/g7OElVImd1iLWawaU1+2AFLPf5vedLfOFUe9dvl1p9hmRS1DZ5eQdYDgg5ZCHbfLgpOqTNmNFDLe2ucdVyxjHYTESo1ttw+l80ulVR8c0OB8aEXomT4bV8lpYtsE10QwNfL6hqwyw2EjNg+hHdCBJYR15ff+op5zsAzPme8+ItV50pQc3gyl4jAmIDEnVhD7FbhpF2iTNPtsOWBsjqJqdigsMbZN0+WoPxBWxZRIpCr3g1qpOm8OS1odKMKT5jHD11RjCfcn57laB0R+1+zhnqPaBFzh3M= - on: - tags: true - branch: master diff --git a/README.md b/README.md index abd2a9d..085a340 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,4 @@ # Telegraph -[![Build Status](https://travis-ci.org/python273/telegraph.svg?branch=master)](https://travis-ci.org/python273/telegraph) [![PyPI](https://img.shields.io/pypi/v/telegraph.svg)](https://pypi.python.org/pypi/telegraph) ![Python Versions](https://img.shields.io/pypi/pyversions/telegraph.svg) ![License](https://img.shields.io/github/license/python273/telegraph.svg) @@ -8,24 +7,20 @@ Python Telegraph API wrapper - [Documentation](https://python-telegraph.readthedocs.io/en/latest/) +```bash +$ python3 -m pip install telegraph +``` + # Example ```python from telegraph import Telegraph telegraph = Telegraph() - telegraph.create_account(short_name='1337') response = telegraph.create_page( 'Hey', html_content='

Hello, world!

' ) - -print('https://telegra.ph/{}'.format(response['path'])) -``` - -# Installation - -```bash -$ pip install telegraph +print(response['url']) ``` diff --git a/setup.py b/setup.py index 66c7b48..f1d1158 100755 --- a/setup.py +++ b/setup.py @@ -14,7 +14,7 @@ except ImportError: from distutils.core import setup -version = '1.4.1' +version = '2.0.0' with open('README.md') as f: @@ -46,15 +46,11 @@ 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :: Python', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.4', - 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: Implementation :: PyPy', - 'Programming Language :: Python :: Implementation :: CPython', + 'Programming Language :: Python :: 3.9', + 'Programming Language :: Python :: 3.10', ] ) diff --git a/telegraph/__init__.py b/telegraph/__init__.py index 466ed44..1f39e45 100644 --- a/telegraph/__init__.py +++ b/telegraph/__init__.py @@ -9,7 +9,7 @@ """ __author__ = 'python273' -__version__ = '1.4.1' +__version__ = '2.0.0' from .api import Telegraph, TelegraphException from .upload import upload_file diff --git a/telegraph/exceptions.py b/telegraph/exceptions.py index ff2283f..1bfaa60 100644 --- a/telegraph/exceptions.py +++ b/telegraph/exceptions.py @@ -17,8 +17,6 @@ class InvalidHTML(ParsingException): class RetryAfterError(TelegraphException): - def __init__(self, retry_after: int): self.retry_after = retry_after super().__init__(f'Flood control exceeded. Retry in {retry_after} seconds') - \ No newline at end of file