Skip to content

Commit f67ec5c

Browse files
committed
Merge branch 'release/2.15.0'
2 parents a7a38d2 + 336a2d6 commit f67ec5c

File tree

8 files changed

+1668
-22
lines changed

8 files changed

+1668
-22
lines changed

.travis.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,14 @@ matrix:
1313
env: TOXENV=docs
1414
- python: '3.6'
1515
env: TOXENV=flake8
16-
- python: '3.5'
17-
env: TOXENV=py35
1816
- python: '3.6'
1917
env: TOXENV=py36
2018
script: tox -vv
2119
- python: '3.7'
2220
env: TOXENV=py37
2321
- python: '3.8'
2422
env: TOXENV=py38
25-
- python: '3.9-dev'
23+
- python: '3.9'
2624
env: TOXENV=py39
2725
# Added power support architecture
2826
- arch: ppc64le
@@ -32,8 +30,6 @@ matrix:
3230
python: '3.6'
3331
env: TOXENV=flake8
3432
- arch: ppc64le
35-
python: '3.5'
36-
env: TOXENV=py35
3733
- arch: ppc64le
3834
python: '3.6'
3935
env: TOXENV=py36
@@ -44,7 +40,7 @@ matrix:
4440
python: '3.8'
4541
env: TOXENV=py38
4642
- arch: ppc64le
47-
python: '3.9-dev'
43+
python: '3.9'
4844
env: TOXENV=py39
4945

5046
cache:

stl/__about__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
__package_name__ = 'numpy-stl'
22
__import_name__ = 'stl'
3-
__version__ = '2.14.2'
3+
__version__ = '2.15.0'
44
__author__ = 'Rick van Hattem'
55
__author_email__ = '[email protected]'
66
__description__ = ' '.join('''

stl/stl.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,13 +136,18 @@ def _load_binary(cls, fh, header, check_size=False):
136136

137137
@classmethod
138138
def _ascii_reader(cls, fh, header):
139-
if b'\n' in header:
140-
recoverable = [True]
139+
recoverable = [True]
140+
line_separator = b'\n'
141+
142+
if b'\r\n' in header:
143+
line_separator = b'\r\n'
144+
elif b'\n' in header:
145+
pass
141146
else:
142147
recoverable = [False]
143148
header += b(fh.read(BUFFER_SIZE))
144149

145-
lines = b(header).split(b('\n'))
150+
lines = b(header).split(line_separator)
146151

147152
def get(prefix=''):
148153
prefix = b(prefix).lower()
@@ -156,7 +161,7 @@ def get(prefix=''):
156161
recoverable[0] = False
157162

158163
# Read more lines and make sure we prepend any old data
159-
lines[:] = b(fh.read(BUFFER_SIZE)).split(b('\n'))
164+
lines[:] = b(fh.read(BUFFER_SIZE)).split(line_separator)
160165
raw_line += lines.pop(0)
161166

162167
raw_line = raw_line.strip()

0 commit comments

Comments
 (0)