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

Patch to remove unbound methods #45834

Closed
tiran opened this issue Nov 24, 2007 · 10 comments
Closed

Patch to remove unbound methods #45834

tiran opened this issue Nov 24, 2007 · 10 comments
Assignees
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs) type-feature A feature request or enhancement

Comments

@tiran
Copy link
Member

tiran commented Nov 24, 2007

BPO 1493
Nosy @gvanrossum, @birkenfeld, @tiran
Files
  • py3k_remove_unbound.patch
  • py3k_remove_unbound_4.patch
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/gvanrossum'
    closed_at = <Date 2007-11-25.09:40:05.606>
    created_at = <Date 2007-11-24.06:50:33.235>
    labels = ['interpreter-core', 'type-feature']
    title = 'Patch to remove unbound methods'
    updated_at = <Date 2008-01-06.22:29:44.834>
    user = 'https://github.com/tiran'

    bugs.python.org fields:

    activity = <Date 2008-01-06.22:29:44.834>
    actor = 'admin'
    assignee = 'gvanrossum'
    closed = True
    closed_date = <Date 2007-11-25.09:40:05.606>
    closer = 'christian.heimes'
    components = ['Interpreter Core']
    creation = <Date 2007-11-24.06:50:33.235>
    creator = 'christian.heimes'
    dependencies = []
    files = ['8799', '8802']
    hgrepos = []
    issue_num = 1493
    keywords = ['patch']
    message_count = 10.0
    messages = ['57798', '57810', '57813', '57814', '57815', '57816', '57819', '57820', '57825', '57839']
    nosy_count = 3.0
    nosy_names = ['gvanrossum', 'georg.brandl', 'christian.heimes']
    pr_nums = []
    priority = 'high'
    resolution = 'fixed'
    stage = None
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue1493'
    versions = ['Python 3.0']

    @tiran
    Copy link
    Member Author

    tiran commented Nov 24, 2007

    Here is a first patch to remove unbound method objects.

    6 tests failed:
    test_descr test_inspect test_pyclbr test_typechecks test_unittest
    test_weakref

    @tiran tiran added interpreter-core (Objects, Python, Grammar, and Parser dirs) type-feature A feature request or enhancement labels Nov 24, 2007
    @gvanrossum
    Copy link
    Member

    I'm waiting for those failing tests to magically start passing. :-)

    @tiran
    Copy link
    Member Author

    tiran commented Nov 24, 2007

    Do you still believe in the tooth fairy, too? :p

    @birkenfeld
    Copy link
    Member

    Okay, this new patch takes care of test_pyclbr, test_inspect and
    test_weakref.

    test_unittest is a bit hard:

    previously, calling loadTestsFromName with the name of a method would
    create a test that runs that test case with that method being the test
    method. With the name of a staticmethod though it would call the
    staticmethod first and use the result of that call as the test case.

    Now, there is no visible distinction between static methods and normal
    methods anymore.

    @birkenfeld
    Copy link
    Member

    Got test_typechecks too - the test is simply not applicable anymore.

    @birkenfeld
    Copy link
    Member

    Okay, got test_descr too -- the problem was introduced by the patch
    itself :)

    @tiran
    Copy link
    Member Author

    tiran commented Nov 24, 2007

    Georg Brandl wrote:

    Okay, got test_descr too -- the problem was introduced by the patch
    itself :)

    Yes, I introduced the problem because I thought that sometimes is wrong
    here. The question mark in <bound method ?.foo of <main.C object at
    ...>> doesn't look right.

    Christian

    @birkenfeld
    Copy link
    Member

    I think it is correct -- normally the __get__ call gets a second
    argument of C.

    @tiran
    Copy link
    Member Author

    tiran commented Nov 25, 2007

    Fixed in r59183
    unittest was pretty tricky.

    @tiran tiran closed this as completed Nov 25, 2007
    @gvanrossum
    Copy link
    Member

    On Nov 24, 2007 11:37 AM, Christian Heimes <report@bugs.python.org> wrote:

    Do you still believe in the tooth fairy, too? :p

    Yes, and in the Easter Bunny, Santa Claus, and Sinterklaas. But in
    this particular case I believe in Kaboutertjes. (Dutch gnomes.) And it
    turns out I was right. :-)

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    interpreter-core (Objects, Python, Grammar, and Parser dirs) type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants