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

async_chat.__init__() parameters #45860

Closed
nadeemvawda mannequin opened this issue Nov 29, 2007 · 4 comments
Closed

async_chat.__init__() parameters #45860

nadeemvawda mannequin opened this issue Nov 29, 2007 · 4 comments
Assignees
Labels
stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@nadeemvawda
Copy link
Mannequin

nadeemvawda mannequin commented Nov 29, 2007

BPO 1519
Nosy @josiahcarlson, @giampaolo
Files
  • asynchat.patch
  • asynchat.2.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/josiahcarlson'
    closed_at = <Date 2008-07-07.05:05:12.143>
    created_at = <Date 2007-11-29.14:20:58.511>
    labels = ['type-bug', 'library']
    title = 'async_chat.__init__() parameters'
    updated_at = <Date 2008-07-07.05:05:12.142>
    user = 'https://bugs.python.org/nadeemvawda'

    bugs.python.org fields:

    activity = <Date 2008-07-07.05:05:12.142>
    actor = 'josiahcarlson'
    assignee = 'josiahcarlson'
    closed = True
    closed_date = <Date 2008-07-07.05:05:12.143>
    closer = 'josiahcarlson'
    components = ['Library (Lib)']
    creation = <Date 2007-11-29.14:20:58.511>
    creator = 'nadeem.vawda'
    dependencies = []
    files = ['8822', '8834']
    hgrepos = []
    issue_num = 1519
    keywords = []
    message_count = 4.0
    messages = ['57930', '57988', '57989', '69377']
    nosy_count = 3.0
    nosy_names = ['josiahcarlson', 'giampaolo.rodola', 'nadeem.vawda']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = None
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue1519'
    versions = ['Python 2.5']

    @nadeemvawda
    Copy link
    Mannequin Author

    nadeemvawda mannequin commented Nov 29, 2007

    The __init__() function for asynchat.async_chat doesn't allow the caller
    to specify a channel map. I thought it would make sense to add an
    optional 'map' parameter, for consistency with asyncore.dispatcher. If
    the parameter is not specified, asyncore.dispatcher.__init__() will
    default to using the global map, which is the current behaviour.

    @nadeemvawda nadeemvawda mannequin added stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error labels Nov 29, 2007
    @giampaolo
    Copy link
    Contributor

    +1.
    Another inconsistency are the argument names used in __init__ methods,
    one called "sock" and the other called "conn":

    asyncore:
    def __init__(self, sock=None, map=None):

    asynchat:
    def __init__ (self, conn=None):

    @nadeemvawda
    Copy link
    Mannequin Author

    nadeemvawda mannequin commented Nov 30, 2007

    Thanks for pointing that out; I've uploaded a second patch that changes
    async_chat.__init__() to use 'sock' instead of 'conn'.

    This change shouldn't affect anything either, since the argument is
    simply passed to asyncore.dispatcher.__init__().

    @josiahcarlson
    Copy link
    Mannequin

    josiahcarlson mannequin commented Jul 7, 2008

    Fixed for 2.6 in changelist 64768.
    Fixed for 3.0 in changelist 64770.

    @josiahcarlson josiahcarlson mannequin closed this as completed Jul 7, 2008
    @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
    stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant