Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mime.py #55

Open
gene-git opened this issue Apr 29, 2023 · 7 comments
Open

mime.py #55

gene-git opened this issue Apr 29, 2023 · 7 comments

Comments

@gene-git
Copy link

News file for 0.8.0 says

Move /mime/ and dynip to Milter subpackage

dynip was moved but not mime.py

Should mime.py be moved into Milter/mime.py?

Its ending up in /usr/lib/python3.11/site-packages/mime.py which feels wrong.

@sdgathman
Copy link
Owner

sdgathman commented May 1, 2023

It's been a while since 0.8, but as I recall a lot of things broke when I moved it. I could move it again, and say something in the release notes, and call the new release 1.1. (Slight incompatibility.)

There are workarounds for python email bugs, and the "mimedefang" - which are arguably two different things. If we're going to be renaming things, I might look at separating out the defang stuff.

@gene-git
Copy link
Author

gene-git commented May 1, 2023

I imagine that the import references would also need to be changed as well, since mime would now be part of Milter module instead of mime module - obviously and trivial change to Milter/init.py - but I haven't looked too hard at any code so this is just off the cuff.

And of I assume the 'import Milter' in mime.py would need modifying in some appropriate way as well.

Maybe other stuff?

@gene-git
Copy link
Author

gene-git commented May 1, 2023

Actually just looked a bit more at code - your suggestion of simply creating a directory 'mime' and moving it there looks like it might be the simplest - that way references to import mime should just work.

The only references in Milter/xxx.py are 2 test programs.

Maybe i'm missing something.

@sdgathman
Copy link
Owner

Other packages like bmsmilter use mime. The references aren't just in pymilter.

@sdgathman
Copy link
Owner

Hmm. Maybe I could install in both places, and deprecate the old location. @gene-git

@gene-git
Copy link
Author

gene-git commented Jul 17, 2023

I honestly think nothing should be in

 /usr/lib/python3.11/site-packages/mime.py 

Maybe as you suggested, I -think-, put it in

 /usr/lib/python3.11/site-packages/mime/mime.py

add usual __init__.py stuff to make it a module.

That way import mime should continue to work - at least in my setup there is no other package occupying that directory so would be fine

What you think?

@kitterma
Copy link
Collaborator

kitterma commented Jul 17, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants