Page MenuHomePhabricator

Deprecate comms.threadedhttp.HttpRequest in favour of direct requests response
Closed, ResolvedPublic

Description

comms.threadedhttp.HttpRequest holds some wraps some response results requests but the access can be made directly. e.g.

  • hr.response_headers -> be replaces by r.headers
  • hr.raw -> r.content
  • hr.status -> r.status

Steps to proceed

  • rename HttpRequest methods and properties to corresponding requests methods and properties
  • show a FutureWarnig for the old identifiers
  • After a desupporting time switch http.fetch() method result from HttpRequest to requests.Response result
  • Desupport HttpRequest
  • return requests.Response with http.request too; a Breaking change but usually not used directly because the common way is api.Request()
  • Remove HttpRequest

Event Timeline

Xqt triaged this task as Medium priority.Oct 11 2020, 6:41 AM
Xqt updated the task description. (Show Details)

Change 633352 had a related patch set uploaded (by Xqt; owner: Xqt):
[pywikibot/core@master] [cleanup] rename HttpRequest properties to request.Response identifiers

https://gerrit.wikimedia.org/r/633352

Change 634238 had a related patch set uploaded (by Mpaa; owner: Mpaa):
[pywikibot/core@master] [IMPR] remove _http_process() and _enqueue()

https://gerrit.wikimedia.org/r/634238

Change 634238 merged by jenkins-bot:
[pywikibot/core@master] [IMPR] remove _http_process() and _enqueue()

https://gerrit.wikimedia.org/r/634238

Change 628583 had a related patch set uploaded (by Xqt; owner: Xqt):
[pywikibot/core@master] [cleanup] Prepare merging threadedhttp.py to http.py

https://gerrit.wikimedia.org/r/628583

Change 634495 had a related patch set uploaded (by Xqt; owner: Xqt):
[pywikibot/core@master] [IMPR] Rename http.py to httplib.py to be merged with threadedhttp.py

https://gerrit.wikimedia.org/r/634495

Change 634496 had a related patch set uploaded (by Xqt; owner: Xqt):
[pywikibot/core@master] [IMPR] rename threadedhttp.py to httplib.py to be merged

https://gerrit.wikimedia.org/r/634496

Change 634497 had a related patch set uploaded (by Xqt; owner: Xqt):
[pywikibot/core@master] Merge branch 'rename_threadedhttp' into rename_http

https://gerrit.wikimedia.org/r/634497

Change 634498 had a related patch set uploaded (by Xqt; owner: Xqt):
[pywikibot/core@master] [IMPR] Merge http.py and threadedhttp.py keeping the history

https://gerrit.wikimedia.org/r/634498

Change 628583 abandoned by Xqt:
[pywikibot/core@master] [cleanup] Prepare merging threadedhttp.py to http.py

Reason:
Too much to work. Waiting for desupport HttpRequest

https://gerrit.wikimedia.org/r/628583

Change 634497 abandoned by Xqt:
[pywikibot/core@master] Merge branch 'rename_threadedhttp' into rename_http

Reason:
Too much to work. Waiting for desupport HttpRequest

https://gerrit.wikimedia.org/r/634497

Change 634495 abandoned by Xqt:
[pywikibot/core@master] [IMPR] Rename http.py to httplib.py to be merged with threadedhttp.py

Reason:
Too much to work. Waiting for desupport HttpRequest

https://gerrit.wikimedia.org/r/634495

Change 634496 abandoned by Xqt:
[pywikibot/core@master] [IMPR] rename threadedhttp.py to httplib.py to be merged

Reason:
Too much to work. Waiting for desupport HttpRequest

https://gerrit.wikimedia.org/r/634496

Change 634498 abandoned by Xqt:
[pywikibot/core@master] [IMPR] Merge http.py and threadedhttp.py keeping the history

Reason:
Too much to work. Waiting for desupport HttpRequest

https://gerrit.wikimedia.org/r/634498

Change 633352 merged by jenkins-bot:
[pywikibot/core@master] [cleanup] rename HttpRequest properties to request.Response identifiers

https://gerrit.wikimedia.org/r/633352

Change 647709 had a related patch set uploaded (by Xqt; owner: Xqt):
[pywikibot/core@master] [IMPR] Replace HttpRequest.raw with HttpRequest.content

https://gerrit.wikimedia.org/r/647709

Change 647719 had a related patch set uploaded (by Xqt; owner: Xqt):
[pywikibot/core@master] [IMPR] Delegate undefined method calls to requests.Response object

https://gerrit.wikimedia.org/r/647719

Change 648200 had a related patch set uploaded (by Xqt; owner: Xqt):
[pywikibot/core@master] [cleanup] Cleanups and improvements from http.py and HttpRequest

https://gerrit.wikimedia.org/r/648200

Change 647709 merged by jenkins-bot:
[pywikibot/core@master] [IMPR] Replace HttpRequest.raw with HttpRequest.content

https://gerrit.wikimedia.org/r/647709

Change 647719 merged by jenkins-bot:
[pywikibot/core@master] [IMPR] Delegate undefined method calls to requests.Response object

https://gerrit.wikimedia.org/r/647719

Change 648200 merged by jenkins-bot:
[pywikibot/core@master] [cleanup] Cleanups and improvements from http.py and HttpRequest

https://gerrit.wikimedia.org/r/648200

Change 648752 had a related patch set uploaded (by Mpaa; owner: Mpaa):
[pywikibot/core@master] [IMPR] align http.fetc() params with requests

https://gerrit.wikimedia.org/r/648752

Change 649024 had a related patch set uploaded (by Mpaa; owner: Mpaa):
[pywikibot/core@master] [IMPR] use response in http.error_handling_callback()

https://gerrit.wikimedia.org/r/649024

Change 649024 merged by jenkins-bot:
[pywikibot/core@master] [IMPR] use response in http.error_handling_callback()

https://gerrit.wikimedia.org/r/649024

Change 648752 merged by jenkins-bot:
[pywikibot/core@master] [IMPR] align http.fetch() params with requests

https://gerrit.wikimedia.org/r/648752

Change 651946 had a related patch set uploaded (by Mpaa; owner: Mpaa):
[pywikibot/core@master] [WIP] http.fetch() return requests.Response()

https://gerrit.wikimedia.org/r/651946

Change 651946 merged by jenkins-bot:
[pywikibot/core@master] [IMPR] http.fetch() return requests.Response()

https://gerrit.wikimedia.org/r/651946

Change 658044 had a related patch set uploaded (by Xqt; owner: Xqt):
[pywikibot/core@master] [cleanup] Remove unused threadedhttp.py

https://gerrit.wikimedia.org/r/658044

Change 658058 had a related patch set uploaded (by Xqt; owner: Xqt):
[pywikibot/core@master] [IMPR] return requests.Response with http.request

https://gerrit.wikimedia.org/r/658058

Change 658044 merged by jenkins-bot:
[pywikibot/core@master] [cleanup] Remove unused threadedhttp.py

https://gerrit.wikimedia.org/r/658044

Change 658058 merged by jenkins-bot:
[pywikibot/core@master] [IMPR] return requests.Response with http.request

https://gerrit.wikimedia.org/r/658058

Xqt claimed this task.
Xqt updated the task description. (Show Details)

Change 735671 had a related patch set uploaded (by Xqt; author: Xqt):

[pywikibot/core@master] [cleanup] Remove disable_ssl_certificate_validation kwargs in http functions

https://gerrit.wikimedia.org/r/735671

Change 735671 merged by jenkins-bot:

[pywikibot/core@master] [cleanup] Remove disable_ssl_certificate_validation kwargs in http functions

https://gerrit.wikimedia.org/r/735671