{ "info": { "author": "Matthias Bussonnier", "author_email": "bussonniermatthias@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License" ], "description": "Some stupid badges:\n\n .. image:: https://badge.fury.io/py/insupportable.png\n :target: http://badge.fury.io/py/insupportable\n\n\n .. image:: https://travis-ci.org/Carreau/insupportable.png?branch=master\n :target: https://travis-ci.org/Carreau/insupportable\n\nI am really annoyed, more and more, especially in old project to figure out what code is a war a workaround\nfor old version of python, or another library. \n\nThis library should provide a simple way to warn you as early as possible when you can remove some legacy code,\nthat deals with unsupported library version.\n\nBy default come pre-configured with Python 2/3 convenience function, but works\nwith other libraries and more fine grained version numbering.\n\n.. code-block:: python\n\n # warn you you have dead code if you\n # drop Python2 support\n from insupportable import support\n if support('PY2'):\n print(\"You are on python 2\")\n else:\n print(\"You are on python 3\")\n\n\n.. code-block:: python\n\n # warn you you have dead code if you\n # drop Python2 support\n from insupportable import support\n if support('PY3'):\n print(\"You are on python 3\")\n else:\n print(\"You are on python 2\")\n\n\nSet it up to drop Python2 support.\n----------------------------------\n\nQuick and dirty way, modify global config, which is not recommended as it may\naffect other libraries that use this too, but super usefull. \n\n.. code-block:: python\n\n support.config(PY2=False)\n\n if support(PY2):\n print(\"You are on python 2\")\n else:\n print(\"You are on python 3\")\n\n\nwarn the following:\n\n.. code-block::\n\n mymodule/myfile.py:3: UserWarning: You are not supporting PY2 anymore \n if support(PY2):\n mymodule/myfile.py:3: UserWarning: PY2 is the last supported feature of this group, you can simplifiy this logic. \n if support(PY2):\n\nMore involve way, create a config context that have effect only locally: \n\n.. code-block:: python\n\n from insupportable import S\n\n support = S(PY2=False).support\n\n ....\n\nAdvance configuration/custom features:\n--------------------------------------\n\nExample:\n\n.. code-block:: python\n \n support.config(config=({\n 'WindowsPhone':True,\n 'Android' :False,\n 'iOS' :False\n },))\n if support('WindowsPhone'):\n print('Click on start menu')\n else:\n print(\"Probably Android - but you don't support it anymore\")\n\n.. code-block::\n\n mymodule/myfile.py:1: UserWarning: WindowsPhone is the last supported feature of this group, you can simplifiy this logic. \n if support('WindowsPhone'):\n\n\n\n\nTODO:\n-----\n\nWrite predicates and document like:\n\n.. code-block:: python\n\n if workaround('tornado==2.2'):\n # do something special\n\n\nThe predicate would decide wether or not to yield depending on the version of `tornado`, \nand warn if min tornado is higher than 2.2\n\n\nDeprecation decorator:\n\n.. code-block:: python\n\n @deprecated_since('2.3.1',will_remove='3.0.0')\n def my_api('something'):\n \"\"\"deprecated fucntion that should \n warn user when function is **called**\n\n when module version is >= 3.0, the decorator should warn **developper** at **compile** time\n that code has to be removed. \n \"\"\"\n\nThis case is more interesting than `support()` as there is 2 pass, the decoration of the function itsef,\nand the execution of the function. `will_remove` should infer next major I guess. \nShould we add option to deprecate after/at a date for some case like API.\n\n.. code-block:: python\n \n @deprecate_after(date='2015/10/15'):\n def marty_from_the_future(self):\n \"\"\"\n Docs has some invalid ssl certificates ?\n \"\"\"\n\n\n\n\n\n* Free software: MIT license\n* Documentation: https://insupportable.readthedocs.org.", "description_content_type": null, "docs_url": null, "download_url": null, "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Carreau/insupportable", "keywords": null, "license": null, "maintainer": null, "maintainer_email": null, "name": "insupportable", "package_url": "https://pypi.org/project/insupportable/", "platform": null, "project_url": "https://pypi.org/project/insupportable/", "project_urls": { "Homepage": "https://github.com/Carreau/insupportable" }, "release_url": "https://pypi.org/project/insupportable/0.1.2/", "requires_dist": null, "requires_python": null, "summary": "a simple way to remember to remove dead code due to notanymore supported", "version": "0.1.2" }, "last_serial": 1531112, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "914e2a67b302cd5bedc40f36f3650c4a", "sha256": "76c4b4ed56212e46a9fd61161d9a37bfbcfa1405e87ca42a7a1135d0f600fbff" }, "downloads": -1, "filename": "insupportable-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "914e2a67b302cd5bedc40f36f3650c4a", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 25817, "upload_time": "2015-05-03T02:23:15", "url": "https://files.pythonhosted.org/packages/46/7f/e9481bdb1ebd430981eb678e1856f979174c796d7f0c210ff560172abbd2/insupportable-0.1.0-py2.py3-none-any.whl" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "0ea9ff88060b8deeb6e3c379fb4f5c1f", "sha256": "661440609b9c13771c58b5362efaeeeba466b019df19635f33c951e997059c17" }, "downloads": -1, "filename": "insupportable-0.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "0ea9ff88060b8deeb6e3c379fb4f5c1f", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 25874, "upload_time": "2015-05-03T02:29:06", "url": "https://files.pythonhosted.org/packages/92/8a/71096c33cbaeebf67fc9d49ea3ef0227c7987e18ad09e6cee170bd9258bc/insupportable-0.1.1-py2.py3-none-any.whl" } ], "0.1.1.1": [ { "comment_text": "", "digests": { "md5": "7d7f979a404fa4453d154303d6f285c4", "sha256": "0ab06cf13d649500a00d738205625cdf13cfb66a2628b5b3dfc4be8752960a7f" }, "downloads": -1, "filename": "insupportable-0.1.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "7d7f979a404fa4453d154303d6f285c4", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 26048, "upload_time": "2015-05-03T02:34:46", "url": "https://files.pythonhosted.org/packages/c0/c4/926803f908fefc726ccf7f4da676b727cd6cf29cd2a785ddbf1f4138716e/insupportable-0.1.1.1-py2.py3-none-any.whl" } ], "0.1.1.2": [ { "comment_text": "", "digests": { "md5": "8300a7daeab0900c5f30f02f0348daf4", "sha256": "432004d7361b98e44cc1d7882746886eb960216bb80f37b47d10f3ac9baa7753" }, "downloads": -1, "filename": "insupportable-0.1.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "8300a7daeab0900c5f30f02f0348daf4", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 24340, "upload_time": "2015-05-03T02:36:00", "url": "https://files.pythonhosted.org/packages/87/f0/5476d6b7e91fd7188143e50fad5ad6b008cc3815c4f1a7dba01ed55a489d/insupportable-0.1.1.2-py2.py3-none-any.whl" } ], "0.1.1.3": [ { "comment_text": "", "digests": { "md5": "886be280b2f14c0762ec5ab691c2e54d", "sha256": "53cff561440404f9ae39d21d7ded95ca34fe75610cd0470173252cd1ba8d50ba" }, "downloads": -1, "filename": "insupportable-0.1.1.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "886be280b2f14c0762ec5ab691c2e54d", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 24368, "upload_time": "2015-05-03T02:37:27", "url": "https://files.pythonhosted.org/packages/46/75/ea930c59e64a9096d2b50bb16ae6a84dd4f9f921f5b84aacf20a461cb943/insupportable-0.1.1.3-py2.py3-none-any.whl" } ], "0.1.1.4": [ { "comment_text": "", "digests": { "md5": "a0105b3628276b2685e8c4f55f24efe1", "sha256": "24f8b937e7ff5ffe2f8f2eb76f0d69aef862cc18b3e962fd9d9845bf71e9b9f7" }, "downloads": -1, "filename": "insupportable-0.1.1.4-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "a0105b3628276b2685e8c4f55f24efe1", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 24401, "upload_time": "2015-05-03T02:39:48", "url": "https://files.pythonhosted.org/packages/47/a7/1317a3d279ae3955a85cc3b793bc9bd60c2e8c99f71a34bd5db15cd57b0b/insupportable-0.1.1.4-py2.py3-none-any.whl" } ], "0.1.1.5": [ { "comment_text": "", "digests": { "md5": "b721e31348fdc7b93d958daa840658c6", "sha256": "3f31f722a4d394da1301d0bff3af768d65d0ea9d91fa8af3b972e4324c9af605" }, "downloads": -1, "filename": "insupportable-0.1.1.5-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b721e31348fdc7b93d958daa840658c6", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 24448, "upload_time": "2015-05-03T02:40:27", "url": "https://files.pythonhosted.org/packages/06/c6/d9da37b77f2e3ae491d14edb79e17884b3e5498e2851ab63f091750dbad0/insupportable-0.1.1.5-py2.py3-none-any.whl" } ], "0.1.1.6": [ { "comment_text": "", "digests": { "md5": "b068b5f2ca8cd8ff33a0056cde2efdca", "sha256": "8417ace533de50859c73780c5afeeadd5cc477f513f35533e206e73387f41a48" }, "downloads": -1, "filename": "insupportable-0.1.1.6-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b068b5f2ca8cd8ff33a0056cde2efdca", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 24431, "upload_time": "2015-05-03T02:41:28", "url": "https://files.pythonhosted.org/packages/e1/62/3bb3370d8eee09c195d83307c0046cb742a4d79939a37a021d1d0b7cba7d/insupportable-0.1.1.6-py2.py3-none-any.whl" } ], "0.1.1.7": [ { "comment_text": "", "digests": { "md5": "804a26d1b4337c810a7ba04426548975", "sha256": "e56c749c6d4a7e488a265f5e920bc19d436a87208662ed30dec8367f005cabc0" }, "downloads": -1, "filename": "insupportable-0.1.1.7-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "804a26d1b4337c810a7ba04426548975", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 24446, "upload_time": "2015-05-03T02:43:23", "url": "https://files.pythonhosted.org/packages/a3/ce/e15b860e50476a91c088b1c2c5ce73e08702d88051e3f0727089e480566e/insupportable-0.1.1.7-py2.py3-none-any.whl" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "3f5571df5ad9b144bb36fb096faf1016", "sha256": "4d6ec45227cc126fd78bdb57d65abd9ebd251072f9f6cd06079a1b179021dd4e" }, "downloads": -1, "filename": "insupportable-0.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "3f5571df5ad9b144bb36fb096faf1016", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 24484, "upload_time": "2015-05-03T02:45:46", "url": "https://files.pythonhosted.org/packages/ca/56/a0f90a485eaa65875001b335dcfeeeed15ca0aea9c38b9ac1f09c446ad10/insupportable-0.1.2-py2.py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "3f5571df5ad9b144bb36fb096faf1016", "sha256": "4d6ec45227cc126fd78bdb57d65abd9ebd251072f9f6cd06079a1b179021dd4e" }, "downloads": -1, "filename": "insupportable-0.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "3f5571df5ad9b144bb36fb096faf1016", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 24484, "upload_time": "2015-05-03T02:45:46", "url": "https://files.pythonhosted.org/packages/ca/56/a0f90a485eaa65875001b335dcfeeeed15ca0aea9c38b9ac1f09c446ad10/insupportable-0.1.2-py2.py3-none-any.whl" } ] }