Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package rubygem-parallel for 
openSUSE:Factory checked in at 2021-10-12 21:48:17
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-parallel (Old)
 and      /work/SRC/openSUSE:Factory/.rubygem-parallel.new.2443 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rubygem-parallel"

Tue Oct 12 21:48:17 2021 rev:7 rq:924369 version:1.21.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-parallel/rubygem-parallel.changes        
2021-01-25 18:22:28.840331206 +0100
+++ 
/work/SRC/openSUSE:Factory/.rubygem-parallel.new.2443/rubygem-parallel.changes  
    2021-10-12 21:48:55.519834957 +0200
@@ -1,0 +2,7 @@
+Sat Oct  9 09:15:36 UTC 2021 - Manuel Schnitzer <[email protected]>
+
+- updated to version 1.21.0
+
+  * no changelog found
+
+-------------------------------------------------------------------

Old:
----
  parallel-1.20.1.gem

New:
----
  parallel-1.21.0.gem

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ rubygem-parallel.spec ++++++
--- /var/tmp/diff_new_pack.48ai3X/_old  2021-10-12 21:48:56.039835702 +0200
+++ /var/tmp/diff_new_pack.48ai3X/_new  2021-10-12 21:48:56.043835708 +0200
@@ -24,12 +24,12 @@
 #
 
 Name:           rubygem-parallel
-Version:        1.20.1
+Version:        1.21.0
 Release:        0
 %define mod_name parallel
 %define mod_full_name %{mod_name}-%{version}
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
-BuildRequires:  %{ruby >= 2.4}
+BuildRequires:  %{ruby >= 2.5}
 BuildRequires:  %{rubygem gem2rpm}
 BuildRequires:  ruby-macros >= 5
 URL:            https://github.com/grosser/parallel

++++++ parallel-1.20.1.gem -> parallel-1.21.0.gem ++++++
Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/parallel/processor_count.rb 
new/lib/parallel/processor_count.rb
--- old/lib/parallel/processor_count.rb 2020-11-22 21:29:55.000000000 +0100
+++ new/lib/parallel/processor_count.rb 2021-09-13 06:47:27.000000000 +0200
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
 require 'etc'
 
 module Parallel
@@ -11,29 +12,31 @@
     # Number of physical processor cores on the current system.
     def physical_processor_count
       @physical_processor_count ||= begin
-        ppc = case RbConfig::CONFIG["target_os"]
-        when /darwin1/
-          IO.popen("/usr/sbin/sysctl -n hw.physicalcpu").read.to_i
-        when /linux/
-          cores = {}  # unique physical ID / core ID combinations
-          phy = 0
-          IO.read("/proc/cpuinfo").scan(/^physical id.*|^core id.*/) do |ln|
-            if ln.start_with?("physical")
-              phy = ln[/\d+/]
-            elsif ln.start_with?("core")
-              cid = phy + ":" + ln[/\d+/]
-              cores[cid] = true if not cores[cid]
+        ppc =
+          case RbConfig::CONFIG["target_os"]
+          when /darwin[12]/
+            IO.popen("/usr/sbin/sysctl -n hw.physicalcpu").read.to_i
+          when /linux/
+            cores = {} # unique physical ID / core ID combinations
+            phy = 0
+            IO.read("/proc/cpuinfo").scan(/^physical id.*|^core id.*/) do |ln|
+              if ln.start_with?("physical")
+                phy = ln[/\d+/]
+              elsif ln.start_with?("core")
+                cid = "#{phy}:#{ln[/\d+/]}"
+                cores[cid] = true unless cores[cid]
+              end
             end
+            cores.count
+          when /mswin|mingw/
+            require 'win32ole'
+            result_set = WIN32OLE.connect("winmgmts://").ExecQuery(
+              "select NumberOfCores from Win32_Processor"
+            )
+            result_set.to_enum.collect(&:NumberOfCores).reduce(:+)
+          else
+            processor_count
           end
-          cores.count
-        when /mswin|mingw/
-          require 'win32ole'
-          result_set = WIN32OLE.connect("winmgmts://").ExecQuery(
-            "select NumberOfCores from Win32_Processor")
-          result_set.to_enum.collect(&:NumberOfCores).reduce(:+)
-        else
-          processor_count
-        end
         # fall back to logical count if physical info is invalid
         ppc > 0 ? ppc : processor_count
       end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/parallel/version.rb new/lib/parallel/version.rb
--- old/lib/parallel/version.rb 2020-11-22 21:29:55.000000000 +0100
+++ new/lib/parallel/version.rb 2021-09-13 06:47:27.000000000 +0200
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
 module Parallel
-  VERSION = Version = '1.20.1'
+  VERSION = Version = '1.21.0' # rubocop:disable Naming/ConstantName
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/parallel.rb new/lib/parallel.rb
--- old/lib/parallel.rb 2020-11-22 21:29:55.000000000 +0100
+++ new/lib/parallel.rb 2021-09-13 06:47:27.000000000 +0200
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
 require 'rbconfig'
 require 'parallel/version'
 require 'parallel/processor_count'
@@ -12,7 +13,9 @@
 
   class Break < StandardError
     attr_reader :value
+
     def initialize(value = nil)
+      super()
       @value = value
     end
   end
@@ -22,6 +25,7 @@
 
   class UndumpableException < StandardError
     attr_reader :backtrace
+
     def initialize(original)
       super "#{original.class}: #{original.message}"
       @backtrace = original.backtrace
@@ -30,6 +34,7 @@
 
   class ExceptionWrapper
     attr_reader :exception
+
     def initialize(exception)
       # Remove the bindings stack added by the better_errors gem,
       # because it cannot be marshalled
@@ -40,7 +45,7 @@
       @exception =
         begin
           Marshal.dump(exception) && exception
-        rescue
+        rescue StandardError
           UndumpableException.new(exception)
         end
     end
@@ -49,8 +54,11 @@
   class Worker
     attr_reader :pid, :read, :write
     attr_accessor :thread
+
     def initialize(read, write, pid)
-      @read, @write, @pid = read, write, pid
+      @read = read
+      @write = write
+      @pid = pid
     end
 
     def stop
@@ -77,7 +85,7 @@
       rescue EOFError
         raise DeadWorker
       end
-      raise result.exception if ExceptionWrapper === result
+      raise result.exception if result.is_a?(ExceptionWrapper)
       result
     end
 
@@ -144,7 +152,7 @@
     end
 
     def queue_wrapper(array)
-      array.respond_to?(:num_waiting) && array.respond_to?(:pop) && lambda { 
array.pop(false) }
+      array.respond_to?(:num_waiting) && array.respond_to?(:pop) && -> { 
array.pop(false) }
     end
   end
 
@@ -160,7 +168,7 @@
 
         if @to_be_killed.empty?
           old_interrupt = trap_interrupt(signal) do
-            $stderr.puts 'Parallel execution interrupted, exiting ...'
+            warn 'Parallel execution interrupted, exiting ...'
             @to_be_killed.flatten.each { |pid| kill(pid) }
           end
         end
@@ -204,32 +212,30 @@
   end
 
   class << self
-    def in_threads(options={:count => 2})
+    def in_threads(options = { count: 2 })
       threads = []
-      count, _ = extract_count_from_options(options)
+      count, = extract_count_from_options(options)
 
       Thread.handle_interrupt(Exception => :never) do
-        begin
-          Thread.handle_interrupt(Exception => :immediate) do
-            count.times do |i|
-              threads << Thread.new { yield(i) }
-            end
-            threads.map(&:value)
+        Thread.handle_interrupt(Exception => :immediate) do
+          count.times do |i|
+            threads << Thread.new { yield(i) }
           end
-        ensure
-          threads.each(&:kill)
+          threads.map(&:value)
         end
+      ensure
+        threads.each(&:kill)
       end
     end
 
     def in_processes(options = {}, &block)
       count, options = extract_count_from_options(options)
       count ||= processor_count
-      map(0...count, options.merge(:in_processes => count), &block)
+      map(0...count, options.merge(in_processes: count), &block)
     end
 
-    def each(array, options={}, &block)
-      map(array, options.merge(:preserve_results => false), &block)
+    def each(array, options = {}, &block)
+      map(array, options.merge(preserve_results: false), &block)
     end
 
     def any?(*args, &block)
@@ -242,8 +248,8 @@
       !!each(*args) { |*a| raise Kill unless block.call(*a) }
     end
 
-    def each_with_index(array, options={}, &block)
-      each(array, options.merge(:with_index => true), &block)
+    def each_with_index(array, options = {}, &block)
+      each(array, options.merge(with_index: true), &block)
     end
 
     def map(source, options = {}, &block)
@@ -251,8 +257,8 @@
       options[:mutex] = Mutex.new
 
       if options[:in_processes] && options[:in_threads]
-        raise ArgumentError.new("Please specify only one of `in_processes` or 
`in_threads`.")
-      elsif RUBY_PLATFORM =~ /java/ and not options[:in_processes]
+        raise ArgumentError, "Please specify only one of `in_processes` or 
`in_threads`."
+      elsif RUBY_PLATFORM =~ (/java/) && !(options[:in_processes])
         method = :in_threads
         size = options[method] || processor_count
       elsif options[:in_threads]
@@ -278,9 +284,9 @@
         if size == 0
           work_direct(job_factory, options, &block)
         elsif method == :in_threads
-          work_in_threads(job_factory, options.merge(:count => size), &block)
+          work_in_threads(job_factory, options.merge(count: size), &block)
         else
-          work_in_processes(job_factory, options.merge(:count => size), &block)
+          work_in_processes(job_factory, options.merge(count: size), &block)
         end
 
       return result.value if result.is_a?(Break)
@@ -288,8 +294,8 @@
       options[:return_results] ? result : source
     end
 
-    def map_with_index(array, options={}, &block)
-      map(array, options.merge(:with_index => true), &block)
+    def map_with_index(array, options = {}, &block)
+      map(array, options.merge(with_index: true), &block)
     end
 
     def flat_map(*args, &block)
@@ -343,7 +349,7 @@
             call_with_index(item, index, options, &block)
           end
         end
-      rescue
+      rescue StandardError
         exception = $!
       end
       exception || results
@@ -367,7 +373,7 @@
               call_with_index(item, index, options, &block)
             end
             results_mutex.synchronize { results[index] = result }
-          rescue
+          rescue StandardError
             exception = $!
           end
         end
@@ -407,9 +413,9 @@
                 results_mutex.synchronize { results[index] = result } # arrays 
are not threads safe on jRuby
               rescue StandardError => e
                 exception = e
-                if Kill === exception
+                if exception.is_a?(Kill)
                   (workers - [worker]).each do |w|
-                    w.thread.kill if w.thread
+                    w.thread&.kill
                     UserInterruptHandler.kill(w.pid)
                   end
                 end
@@ -423,15 +429,15 @@
       exception || results
     end
 
-    def replace_worker(job_factory, workers, i, options, blk)
+    def replace_worker(job_factory, workers, index, options, blk)
       options[:mutex].synchronize do
         # old worker is no longer used ... stop it
-        worker = workers[i]
+        worker = workers[index]
         worker.stop
 
         # create a new replacement worker
         running = workers - [worker]
-        workers[i] = worker(job_factory, options.merge(started_workers: 
running, worker_number: i), &blk)
+        workers[index] = worker(job_factory, options.merge(started_workers: 
running, worker_number: index), &blk)
       end
     end
 
@@ -473,14 +479,17 @@
       until read.eof?
         data = Marshal.load(read)
         item, index = job_factory.unpack(data)
-        result = begin
-          call_with_index(item, index, options, &block)
-        # 
https://github.com/rspec/rspec-support/blob/673133cdd13b17077b3d88ece8d7380821f8d7dc/lib/rspec/support.rb#L132-L140
-        rescue NoMemoryError, SignalException, Interrupt, SystemExit
-          raise $!
-        rescue Exception
-          ExceptionWrapper.new($!)
-        end
+
+        result =
+          begin
+            call_with_index(item, index, options, &block)
+          # 
https://github.com/rspec/rspec-support/blob/673133cdd13b17077b3d88ece8d7380821f8d7dc/lib/rspec/support.rb#L132-L140
+          rescue NoMemoryError, SignalException, Interrupt, SystemExit # 
rubocop:disable Lint/ShadowedException
+            raise $!
+          rescue Exception # # rubocop:disable Lint/RescueException
+            ExceptionWrapper.new($!)
+          end
+
         begin
           Marshal.dump(result, write)
         rescue Errno::EPIPE
@@ -503,10 +512,10 @@
     def call_with_index(item, index, options, &block)
       args = [item]
       args << index if options[:with_index]
+      results = block.call(*args)
       if options[:return_results]
-        block.call(*args)
+        results
       else
-        block.call(*args)
         nil # avoid GC overhead of passing large results around
       end
     end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata        2020-11-22 21:29:55.000000000 +0100
+++ new/metadata        2021-09-13 06:47:27.000000000 +0200
@@ -1,14 +1,14 @@
 --- !ruby/object:Gem::Specification
 name: parallel
 version: !ruby/object:Gem::Version
-  version: 1.20.1
+  version: 1.21.0
 platform: ruby
 authors:
 - Michael Grosser
 autorequire: 
 bindir: bin
 cert_chain: []
-date: 2020-11-22 00:00:00.000000000 Z
+date: 2021-09-13 00:00:00.000000000 Z
 dependencies: []
 description: 
 email: [email protected]
@@ -25,8 +25,8 @@
 - MIT
 metadata:
   bug_tracker_uri: https://github.com/grosser/parallel/issues
-  documentation_uri: https://github.com/grosser/parallel/blob/v1.20.1/Readme.md
-  source_code_uri: https://github.com/grosser/parallel/tree/v1.20.1
+  documentation_uri: https://github.com/grosser/parallel/blob/v1.21.0/Readme.md
+  source_code_uri: https://github.com/grosser/parallel/tree/v1.21.0
   wiki_uri: https://github.com/grosser/parallel/wiki
 post_install_message: 
 rdoc_options: []
@@ -36,14 +36,14 @@
   requirements:
   - - ">="
     - !ruby/object:Gem::Version
-      version: '2.4'
+      version: '2.5'
 required_rubygems_version: !ruby/object:Gem::Requirement
   requirements:
   - - ">="
     - !ruby/object:Gem::Version
       version: '0'
 requirements: []
-rubygems_version: 3.1.3
+rubygems_version: 3.2.16
 signing_key: 
 specification_version: 4
 summary: Run any kind of code in parallel processes

Reply via email to