Closed GoogleCodeExporter closed 9 years ago
That's a great idea, but how could we do that without breaking existing code?
Original comment by dclinton
on 10 Jul 2008 at 9:50
I vote for this too -- existing code fix is a simple find-replace for "twitter"
to
"twitterapi" or whatever name is chosen.
twitterapi, please please. Right now I've got to do all sorts of contortions
because
I can't have a module called twitter.py without using absolute_import.
Original comment by iga...@gmail.com
on 18 Sep 2008 at 6:01
That sounds reasonable to me, but we still need to know how to do it without
breaking
everyone currently using the module.
Original comment by dclinton
on 18 Sep 2008 at 6:05
Is it truly so bad to change the name, along with an explanation along the
lines of:
If you were previously using python-twitter and would like to make the minimal
amount
of code changes, then edit your import lines from:
import twitter
to
import twitterapi as twitter
I can't say how many people are using python-twitter today, and how many people
for
whom this change would impact their daily lives, but a breaking change that is
fixable with a global find/replace is an entirely different animal than
changing a
method signature or some other logic.
I understand the desire to have zero impact on existing code, but I don't think
that
it's possible to have a zero-impact solution for a module name change, and I
don't
think that the "solution" that I've proposed is terribly onerous for people who
will
upgrade their installations.
Your call in the end, but I'd seriously prefer not to have to roll a modified
copy of
python-twitter into my app, or maintaining a fork that tracks your trunk and
changes
twitter -> twitterapi.
Original comment by iga...@gmail.com
on 18 Sep 2008 at 8:41
[deleted comment]
I second igazit's comment.
Consider this posting this line on the main page:
Future revisions (eg: 0.7 and above) of the twitter module will be named
twitterapi.
To maintain compatibility with code you're currently writing, v0.6 and prior
should
be imported as follows until the change is made:
import twitter as twitterapi
Original comment by sam%odio...@gtempaccount.com
on 27 Sep 2008 at 7:33
Well, in reply to comment #6:
If the goal is to allow people to name their modules 'twitter' then people
wishing to
get 0.6-style behavior will also need absolute imports.The warning should
probably
say so, along the lines of:
from __future__ import absolute_import
import twitter as twitterapi
Like I said before, not ideal, but it will hurt more to make this breaking
change
later on when there is yet more existing code to break.
Original comment by iga...@gmail.com
on 5 Oct 2008 at 4:50
I made a small tweak in twitter.py to make it possible for the end user to
rename it
by hand (to whatever they like). Marking won't fix, not because it isn't a good
idea, but because the suggest change breaks all users for a relatively small
gain for
a few.
Original comment by dclinton
on 21 Jan 2009 at 7:52
Original issue reported on code.google.com by
jonles...@gmail.com
on 29 Jun 2008 at 9:44