classification
Title: Remove the strict and related params completely removing the 0.9 support
Type: enhancement Stage: patch review
Components: Library (Lib) Versions: Python 3.4
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: orsenthil Nosy List: ezio.melotti, orsenthil, pitrou, python-dev, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2013-03-18 15:01 by orsenthil, last changed 2014-01-03 19:14 by python-dev. This issue is now closed.

Files
File name Uploaded Description Edit
17460.patch orsenthil, 2013-03-18 16:11 review
Messages (12)
msg184458 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2013-03-18 15:01
issue10711 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.
msg184464 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2013-03-18 16:11
Tested this patch and all tests pass.
msg184474 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2013-03-18 17:12
May be in 3.4 an exception should be raised? HTTPConnection('python.org', 80, False) now silently returns wrong result.
msg184493 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2013-03-18 19:03
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.
msg184518 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2013-03-18 20:48
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.
msg184522 - (view) Author: Roundup Robot (python-dev) Date: 2013-03-18 21:08
New changeset c9bf987d80f1 by Senthil Kumaran in branch 'default':
#17460: Remove the strict argument of HTTPConnection and removing the
http://hg.python.org/cpython/rev/c9bf987d80f1
msg184544 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2013-03-18 22:49
> 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.

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.
msg184546 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2013-03-18 23:01
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.
msg184618 - (view) Author: Roundup Robot (python-dev) Date: 2013-03-19 08:20
New changeset ac023b1a23ea by Senthil Kumaran in branch '3.2':
#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':
#17460 - merge from 3.2
http://hg.python.org/cpython/rev/f4e966570416

New changeset 2a1b4ac63f3a by Senthil Kumaran in branch 'default':
#17460 - merge from 3.3
http://hg.python.org/cpython/rev/2a1b4ac63f3a
msg184627 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2013-03-19 10:09
I do not understand what is bad in converting parameters after removed 'strict' to be keyword-only.
msg184766 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2013-03-20 14:49
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?
msg207234 - (view) Author: Roundup Robot (python-dev) Date: 2014-01-03 19:14
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
History
Date User Action Args
2014-01-03 19:14:08python-devsetmessages: + msg207234
2013-03-20 14:50:00orsenthilsetnosy: + ezio.melotti
messages: + msg184766
2013-03-19 10:09:49serhiy.storchakasetmessages: + msg184627
2013-03-19 08:20:02python-devsetmessages: + msg184618
2013-03-18 23:01:16orsenthilsetmessages: + msg184546
2013-03-18 22:49:17serhiy.storchakasetmessages: + msg184544
2013-03-18 21:09:00orsenthilsetstatus: open -> closed
resolution: fixed
2013-03-18 21:08:36python-devsetnosy: + python-dev
messages: + msg184522
2013-03-18 20:48:51orsenthilsetmessages: + msg184518
2013-03-18 19:03:06orsenthilsetmessages: + msg184493
2013-03-18 17:12:19serhiy.storchakasettype: enhancement
components: + Library (Lib)
versions: + Python 3.4
nosy: + serhiy.storchaka

messages: + msg184474
stage: patch review
2013-03-18 16:11:09orsenthilsetfiles: + 17460.patch
keywords: + patch
messages: + msg184464
2013-03-18 15:01:04orsenthilcreate