Skip to content

[FIX] Python 3.6 compatibility#1963

Merged
lanzagar merged 2 commits intobiolab:masterfrom
ales-erjavec:fixes/python36-array-hash
Jan 27, 2017
Merged

[FIX] Python 3.6 compatibility#1963
lanzagar merged 2 commits intobiolab:masterfrom
ales-erjavec:fixes/python36-array-hash

Conversation

@ales-erjavec
Copy link
Contributor

Issue

On Python 3.6 bytes(numpy.array([1,2])) raises a

TypeError: only integer scalar arrays can be converted to a scalar index
Description of changes

Fix this use in two places where sha1 digest of an array is requested, passing the array memory view directly to sha1 (if the arrays is c contiguous this also avoids a copy.

Includes
  • Code changes
  • Tests
  • Documentation

On Python 3.6 `bytes(numpy.array([2]))` raises a

    TypeError: only integer scalar arrays can be converted to a scalar index
... when running without ORANGE_DEPRECATIONS_ERROR env set.
@codecov-io
Copy link

codecov-io commented Jan 26, 2017

Current coverage is 89.53% (diff: 100%)

Merging #1963 into master will not change coverage

@@             master      #1963   diff @@
==========================================
  Files            90         90          
  Lines          9179       9179          
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
  Hits           8218       8218          
  Misses          961        961          
  Partials          0          0          

Sunburst

Powered by Codecov. Last update a8f71bc...29a7922

@astaric astaric added this to the 3.3.11 milestone Jan 26, 2017
@lanzagar lanzagar merged commit 53b0321 into biolab:master Jan 27, 2017
@ales-erjavec ales-erjavec deleted the fixes/python36-array-hash branch January 27, 2017 10:39
astaric pushed a commit that referenced this pull request Feb 3, 2017
[FIX] Python 3.6 compatibility
(cherry picked from commit 53b0321)

 Conflicts:
	Orange/tests/test_preprocess.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants