Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

this package neved needed "future" #283

Closed
wants to merge 1 commit into from

Conversation

a-detiste
Copy link

Hi,

__future__ and future are not the same thing. __future__ is included in the standard library.

Copy link

@andrivet
Copy link
Owner

Are you sure? The code does not compile for python 2.7 without it.

@a-detiste
Copy link
Author

I m pretty sure. I got "future" removed from Debian. The __future__ stanzas are something else and must stay as long as py2.7 compatibility is wanted

@andrivet
Copy link
Owner

andrivet commented Oct 14, 2024

“as long as py2.7 compatibility is wanted”. Py2.7 compatibility is wanted for this library. And I do not see why you are mentioning Debian. This is Python.

@andrivet
Copy link
Owner

I read again the documentation, and future IS required.

The imports have no effect on Python 3. On Python 2, they shadow the corresponding builtins, which normally have different semantics on Python 3 versus 2, to provide their Python 3 semantics.

If you still think it is a mistake, please provide more explanation and references. In the meantime, I am closing this PR.

@andrivet andrivet closed this Oct 14, 2024
@a-detiste
Copy link
Author

Future is a failed project. The winner was Six. Future own documentation read more like propaganda. Here is the documentation you want: https://docs.python.org/3/library/__future__.html

@andrivet
Copy link
Owner

andrivet commented Oct 14, 2024

What you provided is about __future__. What I am talking about is the future python package. “Future is a failed project. The winner was Six.”. This is your point of view. I will not change the library based on a point of view. The library needs the future package to be compatible with python 2.7. If I remove the package, the library does not work with python 2.7. I will not replace it with six because I do not see any reason to do so.

@a-detiste
Copy link
Author

a-detiste commented Oct 14, 2024 via email

@andrivet
Copy link
Owner

You make affirmations without providing any evidences to support them. So let’s stop this discussion that goes nowhere.

@a-detiste
Copy link
Author

future also provided builtins on py2.

I see

https://askubuntu.com/questions/697226/importerror-no-module-named-builtins

If you want your code to be compatible with Python 2 and 3, you can do this instead:

try:
    import builtins
except ImportError:
    import __builtin__ as builtins

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants