Comments (8)
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
- Changed state: Accepted
from python-twitter.
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 [email protected]
on 18 Sep 2008 at 6:01
from python-twitter.
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
from python-twitter.
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 [email protected]
on 18 Sep 2008 at 8:41
from python-twitter.
[deleted comment]
from python-twitter.
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%[email protected]
on 27 Sep 2008 at 7:33
from python-twitter.
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 [email protected]
on 5 Oct 2008 at 4:50
from python-twitter.
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
- Changed state: WontFix
from python-twitter.
Related Issues (20)
- Character Limit does not accurately match URL t.co wrapper
- NewFromJsonDict AttributeError HOT 2
- "UnicodeEncodeError: 'ascii' codec can't encode characters" during GetSearch() for utf-8 encoded search terms
- Current head (dca91beb7418) has a failing unit test HOT 1
- 404 - Dependency issue? HOT 1
- README.md did not get up to speed HOT 1
- Pip Install from source fails (google code) HOT 3
- api.GetMentions errors HOT 1
- import twitter produces AttributeError: 'module' object has no attribute 'Http' HOT 1
- Getting {“errors”:[{“message”:“Bad Authentication data”,“code”:215}]} using python-twitter API v1.0 HOT 5
- Direct Messages failing HOT 3
- GetPublicTimeline() is referenced in docs but not implemented HOT 1
- python 3.x HOT 2
- GetUser gives a "page does not exist 34" HOT 2
- remove dependency to python-oauth2 switch to oauthlib HOT 2
- GetUserTimeLine does not work
- status of python-twitter-1.1
- api.CreateList returns UnboundLocalError
- Cannot be installed with Pip HOT 2
- User behind a proxy will face a problem
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-twitter.