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

Remove the strict and related params completely removing the 0.9 support #61662

Closed
orsenthil opened this issue Mar 18, 2013 · 12 comments
Closed
Assignees
Labels
stdlib Python modules in the Lib dir type-feature A feature request or enhancement

Comments

@orsenthil
Copy link
Member

BPO 17460
Nosy @orsenthil, @pitrou, @ezio-melotti, @serhiy-storchaka
Files
  • 17460.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/orsenthil'
    closed_at = <Date 2013-03-18.21:09:00.317>
    created_at = <Date 2013-03-18.15:01:04.315>
    labels = ['type-feature', 'library']
    title = 'Remove the strict and related params completely removing the 0.9 support'
    updated_at = <Date 2014-01-03.19:14:08.220>
    user = 'https://github.com/orsenthil'

    bugs.python.org fields:

    activity = <Date 2014-01-03.19:14:08.220>
    actor = 'python-dev'
    assignee = 'orsenthil'
    closed = True
    closed_date = <Date 2013-03-18.21:09:00.317>
    closer = 'orsenthil'
    components = ['Library (Lib)']
    creation = <Date 2013-03-18.15:01:04.315>
    creator = 'orsenthil'
    dependencies = []
    files = ['29443']
    hgrepos = []
    issue_num = 17460
    keywords = ['patch']
    message_count = 12.0
    messages = ['184458', '184464', '184474', '184493', '184518', '184522', '184544', '184546', '184618', '184627', '184766', '207234']
    nosy_count = 5.0
    nosy_names = ['orsenthil', 'pitrou', 'ezio.melotti', 'python-dev', 'serhiy.storchaka']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'patch review'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue17460'
    versions = ['Python 3.4']

    @orsenthil
    Copy link
    Member Author

    bpo-10711 Removed the HTTP 0.9 support in 3.2 and deprecated strict and related params in 3.2. It is time to remove those in 3.4.

    @orsenthil orsenthil self-assigned this Mar 18, 2013
    @orsenthil
    Copy link
    Member Author

    Tested this patch and all tests pass.

    @serhiy-storchaka
    Copy link
    Member

    May be in 3.4 an exception should be raised? HTTPConnection('python.org', 80, False) now silently returns wrong result.

    @serhiy-storchaka serhiy-storchaka added stdlib Python modules in the Lib dir type-feature A feature request or enhancement labels Mar 18, 2013
    @orsenthil
    Copy link
    Member Author

    I don't know what is the best way to raise an Exception when we are deprecating an argument.

    1. The options are type checking on timeout parameter and then raising an error. This does not look good to me.
    2. Making the rest of the arguments as keyword only arguments in order to prevent people doing mistakes. I am okay with this, people upgrading from 3.3, will face a problem if they already dont have a keyword only argument.

    @orsenthil
    Copy link
    Member Author

    Serhiy - Had a chat with Thomas Wouters and realized that just removing the strict is a best way to go. We have been issuing Deprecation warning for 2 releases now and it should have given enough time for folks to make the changes.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Mar 18, 2013

    New changeset c9bf987d80f1 by Senthil Kumaran in branch 'default':
    bpo-17460: Remove the strict argument of HTTPConnection and removing the
    http://hg.python.org/cpython/rev/c9bf987d80f1

    @serhiy-storchaka
    Copy link
    Member

    1. Making the rest of the arguments as keyword only arguments in order to
      prevent people doing mistakes. I am okay with this, people upgrading from
      3.3, will face a problem if they already dont have a keyword only
      argument.

    I thought about how to leave the parameter and imlicitly raise an exception,
    but your variant #2 is better. It is fully backward compatible and allows us
    to avoid the subtle error.

    @orsenthil
    Copy link
    Member Author

    Sorry, I went ahead with committing it. But let's continue the discussion.

    Leaving the parameter when we have said it will be deprecated may be a bad practice. It has remained unused for 2 versions now when the deprecation warning was added.

    The option 2 further presented a challenge with HTTPSConnection which was already using keyword-only args for last two parameters. Moving it up in the argument list may have presented a bad case. Two changes for one.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Mar 19, 2013

    New changeset ac023b1a23ea by Senthil Kumaran in branch '3.2':
    bpo-17460 - Adding relevant warning messages regarding strict removal in docs
    http://hg.python.org/cpython/rev/ac023b1a23ea

    New changeset f4e966570416 by Senthil Kumaran in branch '3.3':
    bpo-17460 - merge from 3.2
    http://hg.python.org/cpython/rev/f4e966570416

    New changeset 2a1b4ac63f3a by Senthil Kumaran in branch 'default':
    bpo-17460 - merge from 3.3
    http://hg.python.org/cpython/rev/2a1b4ac63f3a

    @serhiy-storchaka
    Copy link
    Member

    I do not understand what is bad in converting parameters after removed 'strict' to be keyword-only.

    @orsenthil
    Copy link
    Member Author

    Serhiy - the bad thing IMO would be 'enforcing a new feature in order to save people from using deprecated feature'.

    I am not against the addition of keyword only args for HTTPConnection in 3.4. A concrete need should be ascertained. Should we ask for python-dev suggestion?

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Jan 3, 2014

    New changeset f9bb9c11363a by R David Murray in branch 'default':
    whatsnew: porting note for HTTP[S]Connection strict parameter removal.
    http://hg.python.org/cpython/rev/f9bb9c11363a

    @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-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants