Issue #15893 has been updated by cabo (Carsten Bormann).


Thank you.  So I gather

`URI.open(url, **options)`

becomes

`URI(url).open(**options)`

(Re the deprecation of old Ruby versions: users of gems often want to use them with whatever is on their OS, and that currently means we really have to go back to 2.3.  We sure don't like that situation.)

----------------------------------------
Misc #15893: open-uri: URI.open status
https://bugs.ruby-lang.org/issues/15893#change-84511

* Author: zverok (Victor Shepelev)
* Status: Closed
* Priority: Normal
* Assignee: akr (Akira Tanaka)
----------------------------------------
On the one hand, Ruby 2.5's NEWS [stated](https://github.com/ruby/ruby/commit/bf287424fd00c0304c836525bb52d89fc1f4a84a#diff-ff4e2dc4962dc25a1512353299992c8dR298):

> URI.open method defined as an alias to open-uri's Kernel.open. open-uri's Kernel.open will be deprecated in future.

I believe there were good reasons for that decision.

On the other hand,
* no movements in this direction were done since 2.5
* `URI.open` [is excluded](https://github.com/ruby/ruby/blob/trunk/lib/open-uri.rb#L43) from `open-uri`'s docs, and the main library's [documentation](https://ruby-doc.org/stdlib-2.5.0/libdoc/open-uri/rdoc/OpenURI.html) doesn't mention this option as preferred or even existing.

I'd like to know what the real status of this library and its migration to (safer) `URI.open`?
Should a patch be provided to change the library's docs accordingly?
Maybe even change the code (still leaving `Kernel.open` option, but just as an alias, moving the implementation away from that method)?

---Files--------------------------------
deprecate-open-uri-kernel-open.patch (21.3 KB)


-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>