carletes / mock-ssh-server

Python mock SSH server for testing purposes
MIT License
56 stars 32 forks source link

Added easy way to overwrite Handler class #18

Closed TitaniumHocker closed 3 years ago

TitaniumHocker commented 3 years ago

I'm trying to use this library for testing one of my projects, so I have a need to add additional authorization methods locally in my project tests. For this I need to overwrite the handler class. This PR will make it easy.

swiatek25 commented 3 years ago

If you could add a test for sample usage it would be great!

TitaniumHocker commented 3 years ago

@swiatek25 Thx, are you planning to release new version in the near future?

swiatek25 commented 3 years ago

@swiatek25 Thx, are you planning to release new version in the near future?

Not really sure about that. I have not been doing it before. @carletes could you help out?

TitaniumHocker commented 3 years ago

Btw @carletes you can add GitHub CI/CD(GitHub Actions) workflow to automate publishing to PyPI on release tag in repo. Something like this for example: https://github.com/TitaniumHocker/gvapi/blob/master/.github/workflows/python-publish.yml

carletes commented 3 years ago

@TitaniumHocker: Thanks for your contribution and for the Github Actions tip! I'll implement the push to PyPI during this weekend.

TitaniumHocker commented 3 years ago

@carletes Also I have a question. Are you planning to drop old python<3.6 support?

carletes commented 3 years ago

Thanks for your PR, @TitaniumHocker! I've added you to the list of this project's collaborators. For any changes you may want to do in the future, just open a PR, ensure tests are green and, if you don't hear from me or from other collaborators in a couple of days, just go ahead and merge it.

@swiatek25: Thanks for looking at this PR, as well!

carletes commented 3 years ago

Are you planning to drop old python<3.6 support?

I still need 2.7, unfortunately :( Hopefully by the end of the year I'll be able to drop 2.7 and 3.5

carletes commented 3 years ago

... and 0.9.0 is now on PyPI with your changes, @TitaniumHocker (using GitHub Actions, as you suggested).

TitaniumHocker commented 3 years ago

@carletes Thx. What do you think about migrating to Poetry as modern packaging and dependency management tool? Also I can add separate linting CI with flake8(+some extensions).

carletes commented 3 years ago

What do you think about migrating to Poetry as modern packaging and dependency management tool?

Go ahead!

Also I can add separate linting CI with flake8(+some extensions).

Likewise: PR most welcome!