karlicoss / orgparse

Python module for reading Emacs org-mode files
https://orgparse.readthedocs.org
BSD 2-Clause "Simplified" License
372 stars 43 forks source link

QUESTION: Reason about using `codecs.open()` #54

Closed buhtz closed 1 year ago

buhtz commented 2 years ago

https://github.com/karlicoss/orgparse/blob/36b31d8151e45ac6701822864816b48446d3dcad/orgparse/__init__.py#L135

I am preparing a little bugfix but stumbled across this line where you use codecs.open() instead of builtin.open() or pathlib.Path.open().

From your current point of view:

Is there a good and strict reason for this? Are there any reasons against using the usual builtin.open() or pathlib.Path.open()?

If there is no need for using codecs I will show you in a PR what I have in my mind. ;)

karlicoss commented 2 years ago

Hey, seems that it's very very old code, from 2012 https://github.com/karlicoss/orgparse/commit/f8fda1007304ef7f2531b6b566f50bddf572c271

So i'd imagine there is no reason to use it now :) feel free to switch it to builtin.open!

buhtz commented 1 year ago

Fixed via PR #57