httpx 1.7.4 → 1.7.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/sig/options.rbs CHANGED
@@ -17,6 +17,7 @@ module HTTPX
17
17
 
18
18
  DEFAULT_OPTIONS: Hash[Symbol, untyped]
19
19
  REQUEST_BODY_IVARS: Array[Symbol]
20
+ RESOLVER_IVARS: Array[Symbol]
20
21
  RESOLVER_TYPES: Array[Symbol]
21
22
  USER_AGENT: String
22
23
 
@@ -106,8 +107,10 @@ module HTTPX
106
107
 
107
108
  attr_reader ssl: Hash[Symbol, untyped]
108
109
 
109
- # io
110
- type io_option = _ToIO | Hash[String, _ToIO]
110
+ type external_io = TCPSocket | OpenSSL::SSL::SSLSocket | UNIXSocket
111
+
112
+ type io_option = external_io | Hash[String, external_io]
113
+
111
114
  attr_reader io: io_option?
112
115
 
113
116
  # fallback_protocol
@@ -142,7 +145,9 @@ module HTTPX
142
145
 
143
146
  def ==: (Options other) -> bool
144
147
 
145
- def options_equals?: (Options other, ?Array[Symbol] ignore_ivars) -> bool
148
+ def connection_options_match?: (Options other, ?Array[Symbol] ignore_ivars) -> bool
149
+
150
+ def resolver_options_match?: (Options other) -> bool
146
151
 
147
152
  def merge: (Object & _ToHash[Symbol, untyped] other) -> (instance | self)
148
153
 
data/sig/parser/http1.rbs CHANGED
@@ -23,7 +23,7 @@ module HTTPX
23
23
 
24
24
  @observer: _HTTP1Events
25
25
  @state: Symbol
26
- @buffer: String
26
+ @buffer: String | Transcoder::Chunker::Decoder
27
27
  @content_type: String?
28
28
  @content_length: Integer
29
29
  @_has_trailers: bool
data/sig/plugins/auth.rbs CHANGED
@@ -10,7 +10,8 @@ module HTTPX
10
10
  end
11
11
 
12
12
  module InstanceMethods
13
- @auth_header_value: String
13
+ @auth_header_value: String?
14
+ @auth_header_value_mtx: Thread::Mutex
14
15
  @skip_auth_header_value: bool
15
16
 
16
17
  def authorization: (?string token, ?auth_header_type: string) ?{ (Request) -> string } -> instance
@@ -29,7 +30,9 @@ module HTTPX
29
30
  end
30
31
 
31
32
  module RequestMethods
32
- @auth_token_value: String?
33
+ attr_reader auth_token_value: String?
34
+
35
+ @auth_header_value: String?
33
36
 
34
37
  def authorized?: () -> bool
35
38
 
@@ -20,6 +20,10 @@ module HTTPX
20
20
  def delete: (String host) -> void
21
21
  end
22
22
 
23
+ module RequestMethods
24
+ @informational_status: Integer?
25
+ end
26
+
23
27
  interface _ExpectOptions
24
28
  def expect_timeout: () -> Integer?
25
29
 
@@ -9,12 +9,12 @@ module HTTPX
9
9
 
10
10
  def set_context!: () -> void
11
11
 
12
- def current_context?: () -> bool
12
+ def current_context?: () -> boolish
13
13
  end
14
14
 
15
15
  module ConnectionMethods
16
16
 
17
- def current_context?: () -> bool
17
+ def current_context?: () -> boolish
18
18
 
19
19
  def send: (request request) -> void
20
20
  end
@@ -47,7 +47,7 @@ module HTTPX
47
47
 
48
48
  def prepare_to_retry: (Request & RequestMethods request, retriesResponse response) -> void
49
49
 
50
- def when_to_retry: (Request & RequestMethods request, retriesResponse response, retriesOptions options) -> void
50
+ def when_to_retry: (Request & RequestMethods request, retriesResponse response, retriesOptions options) -> Numeric?
51
51
  end
52
52
 
53
53
  module RequestMethods
data/sig/pool.rbs CHANGED
@@ -34,7 +34,7 @@ module HTTPX
34
34
 
35
35
  def checkout_resolver: (Options options) -> resolver_manager
36
36
 
37
- def checkin_resolver: (Resolver::Resolver resolver) -> void
37
+ def checkin_resolver: (Resolver::Multi | Resolver::Resolver resolver) -> void
38
38
 
39
39
  private
40
40
 
data/sig/request.rbs CHANGED
@@ -18,6 +18,7 @@ module HTTPX
18
18
  attr_reader drain_error: StandardError?
19
19
  attr_reader active_timeouts: Array[Symbol]
20
20
 
21
+ attr_writer connection: Connection?
21
22
  attr_accessor peer_address: (String | IPAddr)?
22
23
 
23
24
  attr_writer persistent: bool
@@ -81,6 +82,8 @@ module HTTPX
81
82
 
82
83
  def set_timeout_callback: (Symbol event) { (*untyped) -> void } -> void
83
84
 
85
+ def handle_error: (StandardError error) -> void
86
+
84
87
  private
85
88
 
86
89
  def initialize_body: (Options options) -> Transcoder::_Encoder?
data/sig/selector.rbs CHANGED
@@ -24,8 +24,6 @@ module HTTPX
24
24
 
25
25
  type io_select_selectable = (selectable | Array[selectable])?
26
26
 
27
- include _Each[selectable]
28
-
29
27
  extend Forwardable
30
28
 
31
29
  READABLE: Array[io_interests]
@@ -36,6 +34,9 @@ module HTTPX
36
34
  @selectables: Array[selectable]
37
35
  @is_timer_interval: bool
38
36
 
37
+ def each: () -> ::Enumerator[selectable, self]
38
+ | () { (selectable) -> void } -> self
39
+
39
40
  def next_tick: () -> void
40
41
 
41
42
  def terminate: () -> void
data/sig/timers.rbs CHANGED
@@ -14,6 +14,8 @@ module HTTPX
14
14
 
15
15
  def initialize: () -> void
16
16
 
17
+ def empty?: () -> bool
18
+
17
19
  private
18
20
 
19
21
  def drop_elapsed!: (Numeric elapsed_time) -> void
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: httpx
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.4
4
+ version: 1.7.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tiago Cardoso
@@ -164,6 +164,8 @@ extra_rdoc_files:
164
164
  - doc/release_notes/1_7_2.md
165
165
  - doc/release_notes/1_7_3.md
166
166
  - doc/release_notes/1_7_4.md
167
+ - doc/release_notes/1_7_5.md
168
+ - doc/release_notes/1_7_6.md
167
169
  files:
168
170
  - LICENSE.txt
169
171
  - README.md
@@ -300,6 +302,8 @@ files:
300
302
  - doc/release_notes/1_7_2.md
301
303
  - doc/release_notes/1_7_3.md
302
304
  - doc/release_notes/1_7_4.md
305
+ - doc/release_notes/1_7_5.md
306
+ - doc/release_notes/1_7_6.md
303
307
  - lib/httpx.rb
304
308
  - lib/httpx/adapters/datadog.rb
305
309
  - lib/httpx/adapters/faraday.rb