[netcdf4-python] 04/09: Drop tempfile-mktemp.patch, applied upstream.
Sebastiaan Couwenberg
sebastic at moszumanska.debian.org
Sat Apr 16 15:52:01 UTC 2016
This is an automated email from the git hooks/post-receive script.
sebastic pushed a commit to branch master
in repository netcdf4-python.
commit 16ec488ef80ac99391109a97e432a571e74ebf75
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date: Sat Apr 16 17:14:42 2016 +0200
Drop tempfile-mktemp.patch, applied upstream.
---
debian/changelog | 1 +
debian/patches/series | 1 -
debian/patches/tempfile-mktemp.patch | 392 -----------------------------------
3 files changed, 1 insertion(+), 393 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 3361d9a..d0a549f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,7 @@
netcdf4-python (1.2.4-1) UNRELEASED; urgency=medium
* New upstream release.
+ * Drop tempfile-mktemp.patch, applied upstream.
-- Bas Couwenberg <sebastic at debian.org> Sat, 16 Apr 2016 17:10:04 +0200
diff --git a/debian/patches/series b/debian/patches/series
deleted file mode 100644
index 9618aed..0000000
--- a/debian/patches/series
+++ /dev/null
@@ -1 +0,0 @@
-tempfile-mktemp.patch
diff --git a/debian/patches/tempfile-mktemp.patch b/debian/patches/tempfile-mktemp.patch
deleted file mode 100644
index 77283f0..0000000
--- a/debian/patches/tempfile-mktemp.patch
+++ /dev/null
@@ -1,392 +0,0 @@
-Description: Use NamedTemporaryFile instead of deprecated mktemp.
- See: https://docs.python.org/2/library/tempfile.html#tempfile.mktemp
-Author: Bas Couwenberg <sebastic at debian.org>
-Forwarded: https://github.com/Unidata/netcdf4-python/pull/543
-Applied-Upstream: https://github.com/Unidata/netcdf4-python/commit/7d55bfe99204aa7edc656c9424a59c9b5e0c4f58
-
---- a/test/tst_atts.py
-+++ b/test/tst_atts.py
-@@ -14,7 +14,7 @@ except ImportError: # or else use drop-i
- from ordereddict import OrderedDict
-
- # test attribute creation.
--FILE_NAME = tempfile.mktemp(".nc")
-+FILE_NAME = tempfile.NamedTemporaryFile(suffix='.nc', delete=False).name
- VAR_NAME="dummy_var"
- GROUP_NAME = "dummy_group"
- DIM1_NAME="x"
---- a/test/tst_cdf5.py
-+++ b/test/tst_cdf5.py
-@@ -3,7 +3,7 @@ import numpy as np
- import sys, os, unittest, tempfile
- from numpy.testing import assert_array_equal
-
--FILE_NAME = tempfile.mktemp(".nc")
-+FILE_NAME = tempfile.NamedTemporaryFile(suffix='.nc', delete=False).name
- dimsize = np.iinfo(np.int64).max # max unsigned 64 bit integer
- ndim = 100
- arrdata = np.random.randint(np.iinfo(np.uint8).min,np.iinfo(np.uint8).max,size=ndim)
---- a/test/tst_compound_alignment.py
-+++ b/test/tst_compound_alignment.py
-@@ -75,7 +75,7 @@ cells = numpy.array([ (387, 289, 65.
- (396, 290, 65.71821594238281, -167.9770050048828, 3545, -10149, 8941, -16614, 9, 34164, 1, 0, 200, 526, 511, 301, 170, 65528, 35, 1480, 2350, 3029, 2645, 2928, 5907, 11842, 6208, 16528, 7384, 7988, 870, 527, 661, 3054, 2504, 3291, 3235, 2490, 3424, 354, 354, 10039, 10988, 7958, 7395, 7902, 8811, 14853, 16836, 17231, 20852, 13, 7, 6, 15, 15, 15, 15, 0, 10, 5, 8, 8, 4, 5, 4, 7, 0, 0, 12, 13, 15, 5, 12, 2, 2, 6, 3, 15, 15, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 28, 6, 6, 6, 0, 6, 0, 0, [...]
- dtype=[('mxd03_granule_row', '<i2'), ('mxd03_granule_column', '<i2'), ('mxd03_latitude', '<f4'), ('mxd03_longitude', '<f4'), ('mxd03_sensor_zenith', '<i2'), ('mxd03_sensor_azimuth', '<i2'), ('mxd03_solar_zenith', '<i2'), ('mxd03_solar_azimuth', '<i2'), ('mxd03_height', '<i2'), ('mxd03_range', '<u2'), ('mxd03_land_sea_mask', '|u1'), ('mxd03_gflags', '|u1'), ('mxd02_band_1A', '<u2'), ('mxd02_band_2A', '<u2'), ('mxd02_band_3A', '<u2'), ('mxd02_band_4A', '<u2'), ('mxd02_band_5A', '<u2 [...]
-
--FILE_NAME = tempfile.mktemp(".nc")
-+FILE_NAME = tempfile.NamedTemporaryFile(suffix='.nc', delete=False).name
-
- class CompoundAlignTestCase(unittest.TestCase):
-
---- a/test/tst_compoundatt.py
-+++ b/test/tst_compoundatt.py
-@@ -9,7 +9,7 @@ from numpy.testing import assert_array_e
-
- # test compound attributes.
-
--FILE_NAME = tempfile.mktemp(".nc")
-+FILE_NAME = tempfile.NamedTemporaryFile(suffix='.nc', delete=False).name
- DIM_NAME = 'time'
- VAR_NAME = 'wind'
- VAR_NAME2 = 'forecast_wind'
---- a/test/tst_compoundvar.py
-+++ b/test/tst_compoundvar.py
-@@ -9,7 +9,7 @@ from numpy.testing import assert_array_e
-
- # test compound data types.
-
--FILE_NAME = tempfile.mktemp(".nc")
-+FILE_NAME = tempfile.NamedTemporaryFile(suffix='.nc', delete=False).name
- #FILE_NAME = 'test.nc'
- DIM_NAME = 'phony_dim'
- GROUP_NAME = 'phony_group'
---- a/test/tst_compression.py
-+++ b/test/tst_compression.py
-@@ -8,7 +8,7 @@ ndim = 100000
- ndim2 = 100
- chunk1 = 10; chunk2 = ndim2
- nfiles = 7
--files = [tempfile.mktemp(".nc") for nfile in range(nfiles)]
-+files = [tempfile.NamedTemporaryFile(suffix='.nc', delete=False).name for nfile in range(nfiles)]
- array = uniform(size=(ndim,))
- array2 = uniform(size=(ndim,ndim2))
- lsd = 3
---- a/test/tst_dims.py
-+++ b/test/tst_dims.py
-@@ -6,7 +6,7 @@ import numpy as NP
- from numpy.random.mtrand import uniform
- import netCDF4
-
--FILE_NAME = tempfile.mktemp(".nc")
-+FILE_NAME = tempfile.NamedTemporaryFile(suffix='.nc', delete=False).name
- LAT_NAME="lat"
- LAT_LEN = 25
- LAT_LENG = 50
---- a/test/tst_diskless.py
-+++ b/test/tst_diskless.py
-@@ -12,8 +12,8 @@ n2dim = 73
- n3dim = 144
- ranarr = 100.*uniform(size=(n1dim,n2dim,n3dim))
- ranarr2 = 100.*uniform(size=(n1dim,n2dim,n3dim))
--FILE_NAME = tempfile.mktemp(".nc")
--FILE_NAME2 = tempfile.mktemp(".nc")
-+FILE_NAME = tempfile.NamedTemporaryFile(suffix='.nc', delete=True).name
-+FILE_NAME2 = tempfile.NamedTemporaryFile(suffix='.nc', delete=False).name
-
- class DisklessTestCase(unittest.TestCase):
-
---- a/test/tst_endian.py
-+++ b/test/tst_endian.py
-@@ -4,8 +4,8 @@ import unittest, os, tempfile
- from numpy.testing import assert_array_equal, assert_array_almost_equal
-
- data = np.arange(12,dtype='f4').reshape(3,4)
--FILE_NAME = tempfile.mktemp(".nc")
--FILE_NAME2 = tempfile.mktemp(".nc")
-+FILE_NAME = tempfile.NamedTemporaryFile(suffix='.nc', delete=False).name
-+FILE_NAME2 = tempfile.NamedTemporaryFile(suffix='.nc', delete=False).name
-
- def create_file(file,format,data):
- import warnings
---- a/test/tst_enum.py
-+++ b/test/tst_enum.py
-@@ -6,7 +6,7 @@ from netCDF4 import Dataset
- import numpy as np
- from numpy.testing import assert_array_equal
-
--FILE_NAME = tempfile.mktemp(".nc")
-+FILE_NAME = tempfile.NamedTemporaryFile(suffix='.nc', delete=False).name
- ENUM_NAME = 'cloud_t'
- ENUM_BASETYPE = np.int8
- VAR_NAME = 'primary_cloud'
---- a/test/tst_fancyslicing.py
-+++ b/test/tst_fancyslicing.py
-@@ -19,7 +19,7 @@ to be checked.)
- See test2unlim below for an example.
- """
-
--file_name = tempfile.mktemp(".nc")
-+file_name = tempfile.NamedTemporaryFile(suffix='.nc', delete=False).name
- xdim=9; ydim=10; zdim=11
- i = np.array([2,5,7],'i4')
- i2 = np.array([0,8],'i4')
---- a/test/tst_grps.py
-+++ b/test/tst_grps.py
-@@ -7,8 +7,8 @@ import netCDF4
-
- # test group creation.
-
--FILE_NAME1 = tempfile.mktemp(".nc")
--FILE_NAME2 = tempfile.mktemp(".nc")
-+FILE_NAME1 = tempfile.NamedTemporaryFile(suffix='.nc', delete=False).name
-+FILE_NAME2 = tempfile.NamedTemporaryFile(suffix='.nc', delete=False).name
- DYNASTY=u"Tudor"
- HENRY_VII=u"Henry_VII"
- MARGARET=u"Margaret"
---- a/test/tst_grps2.py
-+++ b/test/tst_grps2.py
-@@ -9,7 +9,7 @@ import netCDF4
- # in createVariable and createGroups (added in 1.1.8).
- # also test Dataset.__getitem__, also added in 1.1.8.
-
--FILE_NAME = tempfile.mktemp(".nc")
-+FILE_NAME = tempfile.NamedTemporaryFile(suffix='.nc', delete=False).name
-
- class Groups2TestCase(unittest.TestCase):
-
---- a/test/tst_masked.py
-+++ b/test/tst_masked.py
-@@ -12,7 +12,7 @@ import netCDF4
- # packing/unpacking of short ints.
-
- # create an n1dim by n2dim random ranarr.
--FILE_NAME = tempfile.mktemp(".nc")
-+FILE_NAME = tempfile.NamedTemporaryFile(suffix='.nc', delete=False).name
- ndim = 10
- ranarr = 100.*uniform(size=(ndim))
- ranarr2 = 100.*uniform(size=(ndim))
---- a/test/tst_masked2.py
-+++ b/test/tst_masked2.py
-@@ -12,9 +12,9 @@ seterr(over='ignore') # don't print warn
- # test automatic conversion of masked arrays, and
- # packing/unpacking of short ints.
-
--FILE_NAME1 = tempfile.mktemp(".nc")
--FILE_NAME2 = tempfile.mktemp(".nc")
--FILE_NAME3 = tempfile.mktemp(".nc")
-+FILE_NAME1 = tempfile.NamedTemporaryFile(suffix='.nc', delete=False).name
-+FILE_NAME2 = tempfile.NamedTemporaryFile(suffix='.nc', delete=False).name
-+FILE_NAME3 = tempfile.NamedTemporaryFile(suffix='.nc', delete=False).name
- datacheck1 =\
- ma.array([0,5000.0,4000.0,0],dtype=np.float,mask=[True,False,False,True])
- datacheck2 =\
---- a/test/tst_masked3.py
-+++ b/test/tst_masked3.py
-@@ -15,7 +15,7 @@ class SetAutoMaskTestBase(unittest.TestC
-
- def setUp(self):
-
-- self.testfile = tempfile.mktemp(".nc")
-+ self.testfile = tempfile.NamedTemporaryFile(suffix='.nc', delete=False).name
-
- self.fillval = default_fillvals["i2"]
- self.v = np.array([self.fillval, 5, 4, -9999], dtype = "i2")
-@@ -137,7 +137,7 @@ class GlobalSetAutoMaskTest(unittest.Tes
-
- def setUp(self):
-
-- self.testfile = tempfile.mktemp(".nc")
-+ self.testfile = tempfile.NamedTemporaryFile(suffix='.nc', delete=False).name
-
- f = Dataset(self.testfile, 'w')
-
---- a/test/tst_multifile.py
-+++ b/test/tst_multifile.py
-@@ -8,7 +8,7 @@ import tempfile, unittest, os, datetime
- nx=100; ydim=5; zdim=1
- nfiles = 10
- ninc = nx/nfiles
--files = [tempfile.mktemp(".nc") for nfile in range(nfiles)]
-+files = [tempfile.NamedTemporaryFile(suffix='.nc', delete=False).name for nfile in range(nfiles)]
- data = randint(0,10,size=(nx,ydim,zdim))
- missval = 99
- data[::10] = missval
-@@ -66,7 +66,7 @@ class NonuniformTimeTestCase(unittest.Te
- ninc = 365
- def setUp(self):
-
-- self.files = [tempfile.mktemp(".nc") for nfile in range(2)]
-+ self.files = [tempfile.NamedTemporaryFile(suffix='.nc', delete=False).name for nfile in range(2)]
- for nfile,file in enumerate(self.files):
- f = Dataset(file,'w',format='NETCDF4_CLASSIC')
- f.createDimension('time',None)
---- a/test/tst_multifile2.py
-+++ b/test/tst_multifile2.py
-@@ -8,7 +8,7 @@ import tempfile, unittest, os, datetime
- nx=100; ydim=5; zdim=1
- nfiles = 10
- ninc = nx/nfiles
--files = [tempfile.mktemp(".nc") for nfile in range(nfiles)]
-+files = [tempfile.NamedTemporaryFile(suffix='.nc', delete=False).name for nfile in range(nfiles)]
- data = randint(0,10,size=(nx,ydim,zdim))
- missval = 99
- data[::10] = missval
-@@ -68,7 +68,7 @@ class NonuniformTimeTestCase(unittest.Te
- ninc = 365
- def setUp(self):
-
-- self.files = [tempfile.mktemp(".nc") for nfile in range(2)]
-+ self.files = [tempfile.NamedTemporaryFile(suffix='.nc', delete=False).name for nfile in range(2)]
- for nfile,file in enumerate(self.files):
- f = Dataset(file,'w',format='NETCDF4_CLASSIC')
- f.createDimension('time',None)
---- a/test/tst_netcdftime.py
-+++ b/test/tst_netcdftime.py
-@@ -506,7 +506,7 @@ class TestDate2index(unittest.TestCase):
- self.standardtime = self.TestTime(datetime(1950, 1, 1), 366, 24,
- 'hours since 1900-01-01', 'standard')
-
-- self.file = tempfile.mktemp(".nc")
-+ self.file = tempfile.NamedTemporaryFile(suffix='.nc', delete=False).name
- f = Dataset(self.file, 'w')
- f.createDimension('time', None)
- time = f.createVariable('time', float, ('time',))
---- a/test/tst_refcount.py
-+++ b/test/tst_refcount.py
-@@ -1,6 +1,6 @@
- import unittest, netCDF4, tempfile, os
-
--file_name = tempfile.mktemp(".nc")
-+file_name = tempfile.NamedTemporaryFile(suffix='.nc', delete=False).name
-
- class RefCountTestCase(unittest.TestCase):
-
---- a/test/tst_rename.py
-+++ b/test/tst_rename.py
-@@ -9,7 +9,7 @@ from netCDF4 import __has_rename_grp__
- # test changing dimension, variable names
- # and deleting attributes.
-
--FILE_NAME = tempfile.mktemp(".nc")
-+FILE_NAME = tempfile.NamedTemporaryFile(suffix='.nc', delete=False).name
- LAT_NAME="lat"
- LON_NAME="lon"
- LON_NAME2 = "longitude"
---- a/test/tst_scalarvar.py
-+++ b/test/tst_scalarvar.py
-@@ -10,7 +10,7 @@ import math
- VAR_NAME='temp'
- VAR_TYPE='f4'
- VAR_VAL=math.pi
--FILE_NAME = tempfile.mktemp(".nc")
-+FILE_NAME = tempfile.NamedTemporaryFile(suffix='.nc', delete=False).name
- GROUP_NAME = 'subgroup'
-
- # test scalar variable creation and retrieval.
---- a/test/tst_scaled.py
-+++ b/test/tst_scaled.py
-@@ -16,7 +16,7 @@ class SetAutoScaleTestBase(unittest.Test
-
- def setUp(self):
-
-- self.testfile = tempfile.mktemp(".nc")
-+ self.testfile = tempfile.NamedTemporaryFile(suffix='.nc', delete=False).name
-
- self.fillval = default_fillvals["i2"]
- self.missing_value = -9999
-@@ -184,7 +184,7 @@ class GlobalSetAutoScaleTest(unittest.Te
-
- def setUp(self):
-
-- self.testfile = tempfile.mktemp(".nc")
-+ self.testfile = tempfile.NamedTemporaryFile(suffix='.nc', delete=False).name
-
- f = Dataset(self.testfile, 'w')
-
---- a/test/tst_shape.py
-+++ b/test/tst_shape.py
-@@ -2,7 +2,7 @@ from netCDF4 import Dataset
- import tempfile, unittest, os
- import numpy as np
-
--file_name = tempfile.mktemp(".nc")
-+file_name = tempfile.NamedTemporaryFile(suffix='.nc', delete=False).name
- xdim=None; ydim=121; zdim=169
- datashape = (ydim,zdim)
- data = np.ones(datashape,dtype=np.float)
---- a/test/tst_slicing.py
-+++ b/test/tst_slicing.py
-@@ -5,7 +5,7 @@ assert_array_almost_equal
- import tempfile, unittest, os, random
- import numpy as np
-
--file_name = tempfile.mktemp(".nc")
-+file_name = tempfile.NamedTemporaryFile(suffix='.nc', delete=False).name
- xdim=9; ydim=10; zdim=11
- #seed(9) # fix seed
- data = randint(0,10,size=(xdim,ydim,zdim)).astype('u1')
---- a/test/tst_types.py
-+++ b/test/tst_types.py
-@@ -10,7 +10,7 @@ import netCDF4
- # test primitive data types.
-
- # create an n1dim by n2dim random ranarr.
--FILE_NAME = tempfile.mktemp(".nc")
-+FILE_NAME = tempfile.NamedTemporaryFile(suffix='.nc', delete=False).name
- n1dim = 5
- n2dim = 10
- ranarr = 100.*uniform(size=(n1dim,n2dim))
---- a/test/tst_unicode.py
-+++ b/test/tst_unicode.py
-@@ -4,7 +4,7 @@ import sys, unittest, os, tempfile
-
- netCDF4.default_encoding = 'utf-8'
-
--FILE_NAME = tempfile.mktemp(".nc")
-+FILE_NAME = tempfile.NamedTemporaryFile(suffix='.nc', delete=False).name
- ATT1 = u'\u03a0\u03a3\u03a9'
- ATT2 = u'x\xb0'
- ATT3 = [u'\u03a0',u'\u03a3',u'\u03a9']
---- a/test/tst_unicode3.py
-+++ b/test/tst_unicode3.py
-@@ -4,7 +4,7 @@ import sys, unittest, os, tempfile
-
- netCDF4.default_encoding = 'utf-8'
-
--FILE_NAME = tempfile.mktemp(".nc")
-+FILE_NAME = tempfile.NamedTemporaryFile(suffix='.nc', delete=False).name
- ATT1 = '\u03a0\u03a3\u03a9'
- ATT2 = 'x\xb0'
- ATT3 = ['\u03a0','\u03a3','\u03a9']
---- a/test/tst_unlimdim.py
-+++ b/test/tst_unlimdim.py
-@@ -15,7 +15,7 @@ n1dim = 4
- n2dim = 10
- n3dim = 8
- ranarr = 100.*uniform(size=(n1dim,n2dim,n3dim))
--FILE_NAME = tempfile.mktemp(".nc")
-+FILE_NAME = tempfile.NamedTemporaryFile(suffix='.nc', delete=False).name
-
- class UnlimdimTestCase(unittest.TestCase):
-
---- a/test/tst_vars.py
-+++ b/test/tst_vars.py
-@@ -9,7 +9,7 @@ import netCDF4
-
- # test variable creation.
-
--FILE_NAME = tempfile.mktemp(".nc")
-+FILE_NAME = tempfile.NamedTemporaryFile(suffix='.nc', delete=False).name
- VAR_DOUBLE_NAME="dummy_var"
- VAR_SHORT_NAME='dummy_var_short'
- VARNAMES = sorted([VAR_DOUBLE_NAME,VAR_SHORT_NAME])
---- a/test/tst_vlen.py
-+++ b/test/tst_vlen.py
-@@ -6,7 +6,7 @@ from netCDF4 import Dataset
- import numpy as np
- from numpy.testing import assert_array_equal
-
--FILE_NAME = tempfile.mktemp(".nc")
-+FILE_NAME = tempfile.NamedTemporaryFile(suffix='.nc', delete=False).name
- VL_NAME = 'vlen_type'
- VL_BASETYPE = np.int16
- DIM1_NAME = 'lon'
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/netcdf4-python.git
More information about the Pkg-grass-devel
mailing list