Git Product home page Git Product logo

Comments (8)

GoogleCodeExporter avatar GoogleCodeExporter commented on July 23, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 23, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 23, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 23, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 23, 2024
[deleted comment]

from python-twitter.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 23, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 23, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 23, 2024
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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.