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

Python3 Version ? #2

Open
dryslope opened this issue Sep 16, 2021 · 4 comments
Open

Python3 Version ? #2

dryslope opened this issue Sep 16, 2021 · 4 comments

Comments

@dryslope
Copy link

Hello, do you plan to do a python3 version ?

I've seen that the lib asyncore is deprecated and asyncio should be used, but I can't find a way to change that as the lib is quite different.

Thanks in advance,
D.

@flaviovs
Copy link
Owner

Hi, thank you for the interest in the project.
That's a good question. I use the software mostly on Docker containers, so I never thought about porting it to Python 3.
Anyways, I am more that happy to merge patches to make the package compatible with 3.x, as long as they use only modules from Python standard library. Unfortunately I don't have the bandwidth to work on this right now, but may work on it in the future.

@dryslope
Copy link
Author

I see, my objective is to use it to test a python function in a docker container in gitlab CI, so I can't docker in docker. That would be really useful, thanks!

@flaviovs
Copy link
Owner

You don't need to do Docker on Docker for that. Your use case is very similar to what I do. You can spawn a mock-smtp container in your job services entry, assign a fixed alias hostname to it, and have your apps use the hostname as they would with any other SMTP server. More info here: https://docs.gitlab.com/ee/ci/services/

@dryslope
Copy link
Author

Thanks for the tip, I didn't know this can be done. However, I tried to make it work with a service in my job, and the problem is that you can't mount volumes, so the .eml file is created inside the smtp_server container, but I can't access it in the job. Maybe I'm missing something ?

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

2 participants