rveachkc / pymsteams

Format messages and post to Microsoft Teams.
https://pypi.org/project/pymsteams/
Apache License 2.0
418 stars 77 forks source link

pymsteams async_connectorcard Python 2 incompatibility #119

Closed ALERTua closed 2 years ago

ALERTua commented 2 years ago

Clean installation of the latest pymsteams package via "pip install pymsteams" cannot be used on the latest Python 2.7.18

  1. Execute "pip install pymsteams"
  2. Execute python
  3. Execute "import pymsteams"
  4. See error
    >>> import pymsteams
    Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    File "C:\Python27\lib\site-packages\pymsteams\__init__.py", line 268
    async def send(self):
            ^
    SyntaxError: invalid syntax

It would be perfect if the asynchronous code blocks are compatible with Python 2. Also, maybe a simple test that just imports the module at Python 2 environment would suffice to smoke-test this type of issue in the future. Right now I am forced to use the previous pymsteams package frozen forever.

nsano-rururu commented 2 years ago

Maintenance of python2 has been completed. I think it's a good idea to exclude it from support for the latest version.

Some of the libraries you are using should no longer support python 2, so I think it will be difficult to maintain support for python 2 and 3.

rveachkc commented 2 years ago

The async functionality won't work with python 2, due to the requirement of httpx. I'll just update the python version requirements, so python 2 installs will stay on the older versions without async.

rveachkc commented 2 years ago

Version 0.2.1 has been released with an update to the python version requirement.

Version 0.2.0 has been yanked from PyPI, so it will no longer be seen as a valid install candidate.

ALERTua commented 2 years ago

alas, my project is currently limited to Python 2. but thank you anyway.