PyPDF4 icon indicating copy to clipboard operation
PyPDF4 copied to clipboard

Rename `generic.py` to `objects.py` and `pdf.py` to `io.py`

Open acsor opened this issue 7 years ago • 4 comments

As can be clearly seen, generic.py stores PDF object definitions and other ancillaries. I know I am being a terrible nag here for all the subliminal changes to the codebase, but until the project switches to 1.0.0 I propose to change generic.py to objects.py: roughly 90% of the code is PDF objects implementations.

acsor avatar Sep 12 '18 19:09 acsor

but until the project switches to 1.0.0

Well, unti it goes stable. Semver adoption hasn't yet been confirmed.

acsor avatar Sep 12 '18 19:09 acsor

Proposal edit: now that pdf.py has been purged by non-pdf.py related stuff (that was moved to generic.py, the more appropriate place) in PR #14, I propose to change pdf.py to io.py as well. While I imagine you can interpret this as a nuisance (and maybe it breaks thoroughly by previous versions of the library) the io.py name reflects much more what is contained in pdf.py, and it is a change we can afford (if we start versioning the library at 0.1.0, that is).

acsor avatar Sep 23 '18 18:09 acsor

I strongly recommend against changing the name to io.py. IDE's have the potential to get confused about an io.py and will throw lots of errors and warnings because io.py conflicts with io in the Python standard library. I know this from years of experience with an existing codebase.

I recommend closing this ticket.

kurtmckee avatar May 07 '19 13:05 kurtmckee

I strongly recommend against changing the name to io.py

I seem to have incurred around the same behavior time ago.

I recommend closing this ticket.

Hold on :-). I do not want to drag this out forever, but the module names effectively don't reflect what is written in them. generics.py could as well become objects.py and pdf.py stay the way it is, or turn into something more appropriate.

if we start versioning the library at 0.1.0, that is

Totally ignore this. Have a look at Package name is confusing.

acsor avatar May 09 '19 15:05 acsor