dalli 3.2.5 → 3.2.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bc1fc3d1639a4e5380a972472d830cd6999f016672af936701201521433180e3
4
- data.tar.gz: 154207a695751bf6430f597783a6382bcb764f42e6f71303b2ead07f90e90f24
3
+ metadata.gz: d9a374b5939ef874ce8067059c88b088c9129e7ab09ff891b1ad1ca3cf13c3ce
4
+ data.tar.gz: d5937c697bcd86a6d3d4207d328ce7e73c854b93a1d19e402630c3f80caec2ec
5
5
  SHA512:
6
- metadata.gz: 4f7c65a4528f180ff8ccad3d39f0197cd83d409830e188e59fc8a03075e7a61c71c111db409cbefa01fb26d6e408fae2e5f2701e4f370744bf33a08023c33831
7
- data.tar.gz: cbd13ba3453f17eb012632f5d077552eb6ea46adbb349f4fb72b612c8d9fe2bb6a9b64641a2d105592d0def88ad7b467a1f007ed6abb76e8c0fdb8d94064c369
6
+ metadata.gz: 36010355440b325c1f8d5b922e882a8a8e199b8bd48dda92b1dcc4866f29e81b536ce41ff4896441c6c2c4f4e8e8faaf891ca6355e47de91733baf10bdfa9eee
7
+ data.tar.gz: 0c2b42e88960838ceef44c6c0f696b938925ade65da7c8791a07539ca36e18d6e874693dfde840a08e78ac9076f6810735a05d137c98d8c64387414f89d6f016
data/CHANGELOG.md CHANGED
@@ -4,6 +4,11 @@ Dalli Changelog
4
4
  Unreleased
5
5
  ==========
6
6
 
7
+ 3.2.6
8
+ ==========
9
+
10
+ - Rescue IO::TimeoutError raised by Ruby since 3.2.0 on blocking reads/writes (skaes)
11
+ - Fix rubydoc link (JuanitoFatas)
7
12
 
8
13
  3.2.5
9
14
  ==========
data/README.md CHANGED
@@ -23,7 +23,7 @@ The name is a variant of Salvador Dali for his famous painting [The Persistence
23
23
  * [Announcements](https://github.com/petergoldstein/dalli/discussions/categories/announcements) - Announcements of interest to the Dalli community will be posted here.
24
24
  * [Bug Reports](https://github.com/petergoldstein/dalli/issues) - If you discover a problem with Dalli, please submit a bug report in the tracker.
25
25
  * [Forum](https://github.com/petergoldstein/dalli/discussions/categories/q-a) - If you have questions about Dalli, please post them here.
26
- * [Client API](https://rubydoc.info/github/petergoldstein/dalli/Dalli/Client) - Ruby documentation for the `Dalli::Client` API
26
+ * [Client API](https://www.rubydoc.info/gems/dalli) - Ruby documentation for the `Dalli::Client` API
27
27
 
28
28
  ## Development
29
29
 
@@ -106,7 +106,7 @@ module Dalli
106
106
  end
107
107
 
108
108
  values
109
- rescue SystemCallError, Timeout::Error, EOFError => e
109
+ rescue SystemCallError, *TIMEOUT_ERRORS, EOFError => e
110
110
  @connection_manager.error_on_request!(e)
111
111
  end
112
112
 
@@ -52,7 +52,7 @@ module Dalli
52
52
  bitflags = extra_len.positive? ? body.unpack1('N') : 0x0
53
53
  key = body.byteslice(extra_len, key_len).force_encoding(Encoding::UTF_8) if key_len.positive?
54
54
  value = body.byteslice((extra_len + key_len)..-1)
55
- value = parse_as_stored_value ? @value_marshaller.retrieve(value, bitflags) : value
55
+ value = @value_marshaller.retrieve(value, bitflags) if parse_as_stored_value
56
56
  [key, value]
57
57
  end
58
58
 
@@ -150,19 +150,19 @@ module Dalli
150
150
  data = @sock.gets("\r\n")
151
151
  error_on_request!('EOF in read_line') if data.nil?
152
152
  data
153
- rescue SystemCallError, Timeout::Error, EOFError => e
153
+ rescue SystemCallError, *TIMEOUT_ERRORS, EOFError => e
154
154
  error_on_request!(e)
155
155
  end
156
156
 
157
157
  def read(count)
158
158
  @sock.readfull(count)
159
- rescue SystemCallError, Timeout::Error, EOFError => e
159
+ rescue SystemCallError, *TIMEOUT_ERRORS, EOFError => e
160
160
  error_on_request!(e)
161
161
  end
162
162
 
163
163
  def write(bytes)
164
164
  @sock.write(bytes)
165
- rescue SystemCallError, Timeout::Error => e
165
+ rescue SystemCallError, *TIMEOUT_ERRORS => e
166
166
  error_on_request!(e)
167
167
  end
168
168
 
@@ -1,8 +1,19 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'timeout'
4
+
3
5
  module Dalli
4
6
  module Protocol
5
7
  # Preserved for backwards compatibility. Should be removed in 4.0
6
8
  NOT_FOUND = ::Dalli::NOT_FOUND
9
+
10
+ # Ruby 3.2 raises IO::TimeoutError on blocking reads/writes, but
11
+ # it is not defined in earlier Ruby versions.
12
+ TIMEOUT_ERRORS =
13
+ if defined?(IO::TimeoutError)
14
+ [Timeout::Error, IO::TimeoutError]
15
+ else
16
+ [Timeout::Error]
17
+ end
7
18
  end
8
19
  end
data/lib/dalli/version.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Dalli
4
- VERSION = '3.2.5'
4
+ VERSION = '3.2.6'
5
5
 
6
6
  MIN_SUPPORTED_MEMCACHED_VERSION = '1.4'
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dalli
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.5
4
+ version: 3.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter M. Goldstein
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2023-06-13 00:00:00.000000000 Z
12
+ date: 2023-09-26 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: High performance memcached client for Ruby
15
15
  email:
@@ -75,7 +75,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
75
75
  - !ruby/object:Gem::Version
76
76
  version: '0'
77
77
  requirements: []
78
- rubygems_version: 3.4.14
78
+ rubygems_version: 3.4.19
79
79
  signing_key:
80
80
  specification_version: 4
81
81
  summary: High performance memcached client for Ruby