Issue 34063: binhex REASONABLY_LARGE = 32768 so what is 128000 (original) (raw)

Issue34063

Created on 2018-07-06 21:42 by Jim.Jewett, last changed 2022-04-11 14:59 by admin.

Messages (2)
msg321193 - (view) Author: Jim Jewett (Jim.Jewett) * (Python triager) Date: 2018-07-06 21:42
binhex defines a module-wide constant of REASONABLY_LARGE = 32768 # Minimal amount we pass the rle-coder Later on, in 5 locations it does either ifp.read(128000) or ifp.read_rsrc(128000) It isn't clear why a different constant is used, let alone why a literal is used instead of something like REASONABLY_LARGE.
msg321626 - (view) Author: Karthikeyan Singaravelan (xtreak) * (Python committer) Date: 2018-07-13 18:12
I tried changing it to REASONABLY_LARGE and could see no test failures. It seems the literal was added as part of a220e67a9ed94d66b81e393a3bb9e6acd10068c1 (23/03/1996) and REASONABLY_LARGE was before that as added part of fcdffeaaa144147f43224a641b668df539ffb6fe (07/08/1995) ➜ cpython git:(master) time ./python -Werror -m unittest -v test.test_binhex test_binhex (test.test_binhex.BinHexTestCase) ... ok test_binhex_error_on_long_filename (test.test_binhex.BinHexTestCase) ... ok ---------------------------------------------------------------------- Ran 2 tests in 0.002s OK ./python -Werror -m unittest -v test.test_binhex 0.23s user 0.03s system 93% cpu 0.279 total
History
Date User Action Args
2022-04-11 14:59:02 admin set github: 78244
2018-07-13 18:12:41 xtreak set nosy: + xtreakmessages: +
2018-07-06 21:42:25 Jim.Jewett create