[wp-trac] [WordPress Trac] #54504: Update Requests library to version 2.0.0

WordPress Trac noreply at wordpress.org
Tue Jun 14 23:06:47 UTC 2022

#54504: Update Requests library to version 2.0.0
 Reporter:  jrf                                  |       Owner:
                                                 |  SergeyBiryukov
     Type:  task (blessed)                       |      Status:  reopened
 Priority:  normal                               |   Milestone:  6.1
Component:  External Libraries                   |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  php80 php81 has-patch has-unit-      |     Focuses:
  tests early early-like-actually-early          |

Comment (by azaozz):

 Replying to [comment:41 schlessera]:

 Uhh, sorry for the very late reply, had some health problems and had to
 take some time off.

 > > So basically you're saying that changing the case in the names is an
 essential, irreplaceable part of Requests 2.0 and this cannot be changed
 again without throwing all the other work out?
 > No, not at all. What I'm saying is that the current maintainers of
 Requests will not undo their work and change back the maintenance
 improvements they've made...

 Seems we're still misunderstanding one another and mostly talking about
 different things...

 Think this is pretty obvious by now, just adding it here mostly for
 posterity. As far as I see version 2.0 of the Requests library was
 refactored completely. The refactoring:

 - Made the library compatible with PHP 8.x. That's a very welcome change.
 - Significantly changed the way the code was written and organized. The
 "coding style" is quite better now, perhaps the "barrier to entry" is
 somewhat higher when comparing it to the rest of the WordPress code, but
 that's not a (big) issue.
 - Some files were renamed where the new names only had capitalization
 changes. Unfortunately this is incompatible with how PHP handles (or
 actually cannot handle) the differences between case-sensitive and non-
 case-sensitive filesystems. That exposed a bug in the WP upgrade process
 (that will likely be fixed) but may affect other uses of the library.
 - The refactoring broke backwards-compatibility.
 - There are no new features and no major (user facing) enhancements. The
 changes were mostly to how the code is organized and written.

 Seems that the last three points make this refactoring somewhat
 incompatible with WordPress. It is also not inline with the WordPress
 philosophy to always prioritize the needs of its users. While the library
 "looks" a lot better now, it doesn't seem to "work" better as its
 functionality is almost the same. The only significant changes were to
 make it compatible with PHP 8.x and the broken backwards compatibility.

 In that terms is seems that the refactoring in version 2.0 was perhaps not
 a good idea at this time and only causes (both philosophical and code)

 As a result the Requests library is currently in "limbo": it is a
 WordPress project that doesn't follow established WordPress philosophies
 and cannot be used by WordPress because of some (good but mostly
 insignificant) changes.

Ticket URL: <https://core.trac.wordpress.org/ticket/54504#comment:61>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list