[issue29566] binhex() creates files with mixed line endings

2020-11-01 Thread miss-islington


miss-islington  added the comment:


New changeset 39a56e55231be00d52fa183fcd2b7d88619ced4b by Miss Skeleton (bot) 
in branch '3.8':
[3.8] bpo-29566: binhex.binhex now consitently writes MacOS 9 line endings. 
(GH-23059) (GH-23070)
https://github.com/python/cpython/commit/39a56e55231be00d52fa183fcd2b7d88619ced4b


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29566] binhex() creates files with mixed line endings

2020-11-01 Thread miss-islington


miss-islington  added the comment:


New changeset 3defcbac2c9ff4306ed5b7fb37d12637eb188306 by Miss Skeleton (bot) 
in branch '3.9':
[3.9] bpo-29566: binhex.binhex now consitently writes MacOS 9 line endings. 
(GH-23059) (GH-23071)
https://github.com/python/cpython/commit/3defcbac2c9ff4306ed5b7fb37d12637eb188306


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29566] binhex() creates files with mixed line endings

2020-11-01 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
resolution: duplicate -> fixed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29566] binhex() creates files with mixed line endings

2020-11-01 Thread miss-islington


Change by miss-islington :


--
pull_requests: +21991
pull_request: https://github.com/python/cpython/pull/23071

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29566] binhex() creates files with mixed line endings

2020-11-01 Thread Ronald Oussoren


Change by Ronald Oussoren :


--
resolution:  -> duplicate
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29566] binhex() creates files with mixed line endings

2020-11-01 Thread miss-islington


miss-islington  added the comment:


New changeset 2165cea548f961b308050f30d1f042a377651d44 by Ronald Oussoren in 
branch 'master':
bpo-29566: binhex.binhex now consitently writes MacOS 9 line endings. (GH-23059)
https://github.com/python/cpython/commit/2165cea548f961b308050f30d1f042a377651d44


--
nosy: +miss-islington

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29566] binhex() creates files with mixed line endings

2020-11-01 Thread miss-islington


Change by miss-islington :


--
pull_requests: +21990
pull_request: https://github.com/python/cpython/pull/23070

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29566] binhex() creates files with mixed line endings

2020-10-31 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

I've added a PR that changes the line ending to "\r" in encoded data.

Not very useful now that binhex is deprecated, but this allows us to close this 
issue.

--
versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.5, Python 3.6, Python 
3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29566] binhex() creates files with mixed line endings

2020-10-31 Thread Ronald Oussoren


Change by Ronald Oussoren :


--
keywords: +patch
pull_requests: +21978
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/23059

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29566] binhex() creates files with mixed line endings

2017-02-15 Thread Guido van Rossum

Changes by Guido van Rossum :


--
nosy:  -gvanrossum

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29566] binhex() creates files with mixed line endings

2017-02-15 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

binhex.binhex() creates files with mixed line endings in Python 3. The header 
line '(This file must be converted with BinHex 4.0)' is separated from the data 
by LFs, but the data is split for lines by CRs.

>>> import binhex
>>> with open('inp', 'wb') as f: f.write(bytes(range(256)))
... 
256
>>> binhex.binhex('inp', 'outp')
>>> for line in open('outp', 'rb').read().splitlines(True): print(repr(line))
... 
b'(This file must be converted with BinHex 4.0)\r'
b'\r'
b':!fPZF!!rN!J!N!3"!*!&*VF!!3)$"!8\'"`J*#JX-$3i2%"%5%a39&KFB\'4SE("d\n'
b'H(b!K)L-N*5BR+#NU+b`Y,Lm`-6)c0$8f0cJj1MXm26ir3%d4&4NG)58T,6%e\n'
b'16e"48P0899CA@&PD@eaGAPpJB@*MC\'9QCfKTDQYXE@j[F(&bFh4eGRGiHATlI(e\n'
b'qIi#"JS1%KBD(L)Q+Lib0MSq3!*\'5Nj59PTHBQCUER*fHRk#KSU1NTDDRU+QUUkb\n'
b'YVUq`XE+cY,@fYlLjZVZm[Ekr`-(#`m6&aXI)bFV,c-h1cp$4dY28eGEAf0RDfpc\n'
b'GhYrJiH,Mj1AQjqMTkZ[XlHl[m2(bmr6ep[IiqIVlr2hqrhj9!!!:\n'

In Python 2 the output file was file object usually opened in text mode. 
Newline characters were translated to platform-depending line endings: CRLF on 
Windows, LF on classic Mac OS. In Python 2 the output file is binary stream 
that doesn't do any newline translations.

The last related commit is 34a042d301d6ab88645046a6dfa6c38265ca4b39 with 
Guido's message "This is the last time I fix binhex.  If it breaks again it 
goes in the dustbin."

--
components: macOS
messages: 287849
nosy: gvanrossum, ned.deily, ronaldoussoren, serhiy.storchaka
priority: normal
severity: normal
status: open
title: binhex() creates files with mixed line endings
type: behavior
versions: Python 3.5, Python 3.6, Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com