# More Future!
For old code written against Python2, plus some tiny useful functions
## Recent Changes
**December 2022** - No longer points to Python2 modules.
## Description
### Problem
`future` or `six` are hard to use: It is easy to google how to import an object in Python2, or Python3, but finding the full path to the same in these compatibility libraries is difficult.
## Solution
All the modules and types required for compatibility are put into the `mo-future` top-level module so they are easy to find.
### Flat namespace
Instead of
```python
from future.utils import text
```
you get the same, but without having to discover what sub-module the `text` is hiding:
```python
from mo_future import text
```
### Simpler imports
Instead of writing conditional imports like
```python
try:
from io import StringIO
except:
from StringIO import StringIO
```
or
```python
if PY3:
from io import StringIO
else:
from StringIO import StringIO
```
you can use `mo-future`:
```python
from mo_future import StringIO
```
Raw data
{
"_id": null,
"home_page": "https://github.com/klahnakoski/mo-future",
"name": "mo-future",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": null,
"author": "Kyle Lahnakoski",
"author_email": "kyle@lahnakoski.com",
"download_url": "https://files.pythonhosted.org/packages/f6/cf/57662d8788e381d646e8581fe853bd990acb412bc49a677e035fb80e69f7/mo_future-7.671.25036.tar.gz",
"platform": null,
"description": "# More Future!\r\n\r\nFor old code written against Python2, plus some tiny useful functions\r\n\r\n## Recent Changes\r\n\r\n**December 2022** - No longer points to Python2 modules. \r\n\r\n\r\n## Description\r\n\r\n### Problem \r\n\r\n`future` or `six` are hard to use: It is easy to google how to import an object in Python2, or Python3, but finding the full path to the same in these compatibility libraries is difficult. \r\n\r\n## Solution\r\n\r\nAll the modules and types required for compatibility are put into the `mo-future` top-level module so they are easy to find.\r\n\r\n\r\n### Flat namespace\r\n\r\nInstead of \r\n\r\n```python\r\n from future.utils import text\r\n```\r\n\r\nyou get the same, but without having to discover what sub-module the `text` is hiding: \r\n\r\n```python\r\n from mo_future import text\r\n```\r\n\r\n\r\n### Simpler imports\r\n\r\nInstead of writing conditional imports like \r\n\r\n```python\r\n try:\r\n from io import StringIO\r\n except:\r\n from StringIO import StringIO\r\n```\r\n\r\nor \r\n\r\n```python\r\n if PY3:\r\n from io import StringIO\r\n else:\r\n from StringIO import StringIO\r\n```\r\n\r\nyou can use `mo-future`:\r\n\r\n```python\r\n from mo_future import StringIO\r\n```\r\n\r\n\r\n",
"bugtrack_url": null,
"license": "MPL 2.0",
"summary": "More future! Make Python 2/3 compatibility a bit easier",
"version": "7.671.25036",
"project_urls": {
"Homepage": "https://github.com/klahnakoski/mo-future"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "4ae932ac391e5bf2db1cbaea7c89ce1eae4fcb9208664d59fda9f84fc889dc78",
"md5": "1d4356021b52c6ea0a5e623cf30b07ca",
"sha256": "7086f373f75fcc70ea59f5cc337fc8a60cc50febead86c692a739b0255ead43a"
},
"downloads": -1,
"filename": "mo_future-7.671.25036-py3-none-any.whl",
"has_sig": false,
"md5_digest": "1d4356021b52c6ea0a5e623cf30b07ca",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 11052,
"upload_time": "2025-02-05T01:18:17",
"upload_time_iso_8601": "2025-02-05T01:18:17.197137Z",
"url": "https://files.pythonhosted.org/packages/4a/e9/32ac391e5bf2db1cbaea7c89ce1eae4fcb9208664d59fda9f84fc889dc78/mo_future-7.671.25036-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "f6cf57662d8788e381d646e8581fe853bd990acb412bc49a677e035fb80e69f7",
"md5": "a6c4d0dc1e4635ff8b5bbcda848c975a",
"sha256": "aaca2693558cea08a5905f8e07c39da7c30fe76759e11d6a776a687b8d40a7dd"
},
"downloads": -1,
"filename": "mo_future-7.671.25036.tar.gz",
"has_sig": false,
"md5_digest": "a6c4d0dc1e4635ff8b5bbcda848c975a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 10382,
"upload_time": "2025-02-05T01:18:20",
"upload_time_iso_8601": "2025-02-05T01:18:20.454772Z",
"url": "https://files.pythonhosted.org/packages/f6/cf/57662d8788e381d646e8581fe853bd990acb412bc49a677e035fb80e69f7/mo_future-7.671.25036.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-02-05 01:18:20",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "klahnakoski",
"github_project": "mo-future",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "mo-future"
}