METADATA 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. Metadata-Version: 2.1
  2. Name: future
  3. Version: 1.0.0
  4. Summary: Clean single-source support for Python 3 and 2
  5. Home-page: https://python-future.org
  6. Author: Ed Schofield
  7. Author-email: ed@pythoncharmers.com
  8. License: MIT
  9. Project-URL: Source, https://github.com/PythonCharmers/python-future
  10. Keywords: future past python3 migration futurize backport six 2to3 modernize pasteurize 3to2
  11. Classifier: Programming Language :: Python
  12. Classifier: Programming Language :: Python :: 2
  13. Classifier: Programming Language :: Python :: 2.6
  14. Classifier: Programming Language :: Python :: 2.7
  15. Classifier: Programming Language :: Python :: 3
  16. Classifier: Programming Language :: Python :: 3.3
  17. Classifier: Programming Language :: Python :: 3.4
  18. Classifier: Programming Language :: Python :: 3.5
  19. Classifier: Programming Language :: Python :: 3.6
  20. Classifier: Programming Language :: Python :: 3.7
  21. Classifier: Programming Language :: Python :: 3.8
  22. Classifier: Programming Language :: Python :: 3.9
  23. Classifier: Programming Language :: Python :: 3.10
  24. Classifier: Programming Language :: Python :: 3.11
  25. Classifier: Programming Language :: Python :: 3.12
  26. Classifier: License :: OSI Approved
  27. Classifier: License :: OSI Approved :: MIT License
  28. Classifier: Development Status :: 6 - Mature
  29. Classifier: Intended Audience :: Developers
  30. Requires-Python: >=2.6, !=3.0.*, !=3.1.*, !=3.2.*
  31. License-File: LICENSE.txt
  32. future: Easy, safe support for Python 2/3 compatibility
  33. =======================================================
  34. ``future`` is the missing compatibility layer between Python 2 and Python
  35. 3. It allows you to use a single, clean Python 3.x-compatible codebase to
  36. support both Python 2 and Python 3 with minimal overhead.
  37. It is designed to be used as follows::
  38. from __future__ import (absolute_import, division,
  39. print_function, unicode_literals)
  40. from builtins import (
  41. bytes, dict, int, list, object, range, str,
  42. ascii, chr, hex, input, next, oct, open,
  43. pow, round, super,
  44. filter, map, zip)
  45. followed by predominantly standard, idiomatic Python 3 code that then runs
  46. similarly on Python 2.6/2.7 and Python 3.3+.
  47. The imports have no effect on Python 3. On Python 2, they shadow the
  48. corresponding builtins, which normally have different semantics on Python 3
  49. versus 2, to provide their Python 3 semantics.
  50. Standard library reorganization
  51. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  52. ``future`` supports the standard library reorganization (PEP 3108) through the
  53. following Py3 interfaces:
  54. >>> # Top-level packages with Py3 names provided on Py2:
  55. >>> import html.parser
  56. >>> import queue
  57. >>> import tkinter.dialog
  58. >>> import xmlrpc.client
  59. >>> # etc.
  60. >>> # Aliases provided for extensions to existing Py2 module names:
  61. >>> from future.standard_library import install_aliases
  62. >>> install_aliases()
  63. >>> from collections import Counter, OrderedDict # backported to Py2.6
  64. >>> from collections import UserDict, UserList, UserString
  65. >>> import urllib.request
  66. >>> from itertools import filterfalse, zip_longest
  67. >>> from subprocess import getoutput, getstatusoutput
  68. Automatic conversion
  69. --------------------
  70. An included script called `futurize
  71. <https://python-future.org/automatic_conversion.html>`_ aids in converting
  72. code (from either Python 2 or Python 3) to code compatible with both
  73. platforms. It is similar to ``python-modernize`` but goes further in
  74. providing Python 3 compatibility through the use of the backported types
  75. and builtin functions in ``future``.
  76. Documentation
  77. -------------
  78. See: https://python-future.org
  79. Credits
  80. -------
  81. :Author: Ed Schofield, Jordan M. Adler, et al
  82. :Sponsor: Python Charmers: https://pythoncharmers.com
  83. :Others: See docs/credits.rst or https://python-future.org/credits.html
  84. Licensing
  85. ---------
  86. Copyright 2013-2024 Python Charmers, Australia.
  87. The software is distributed under an MIT licence. See LICENSE.txt.