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

skip pyreadline dependency on Windows with Python 3.9+ #45

Merged
merged 1 commit into from
Sep 17, 2021

Conversation

dirk-thomas
Copy link
Contributor

Fixes #44

Since pyreadline doesn't support Python 3.9 and isn't being maintained at the moment this patch makes the dependency conditional based on the Python version. Additionally the import of the module is allowed to fail.

@dirk-thomas
Copy link
Contributor Author

CI seems to be failing for unrelated reasons already on the target branch. I created #46 to address these linter warnings. Once that got merged I can rebase this patch to hopefully also pass CI.

@dirk-thomas
Copy link
Contributor Author

@xolox FYI

@dirk-thomas
Copy link
Contributor Author

@xolox Friendly ping.

jacobperron added a commit to ros2/ci that referenced this pull request Oct 2, 2020
This is to fix our Windows builds until xolox/python-humanfriendly#45 is resolved.

Signed-off-by: Jacob Perron <jacob@openrobotics.org>
@domdfcoding
Copy link

The deprecated aliases have now been removed from Python as of 3.10 alpha 5 (see python/cpython#23754), so this is now a hard error.

@KyleKing
Copy link

You could also consider adding a dependency on pyreadline3 for >=3.10, which had a release in Nov 2020 and is a drop-in replacement (https://github.com/brgirgis/pyreadline3). I submitted similar changes for cmd2: https://github.com/python-cmd2/cmd2/pull/1046/files

(I'm currently seeing this warning because dagster imports coloredlogs which imports humanfriendly)

@domdfcoding
Copy link

@xolox Friendly ping

@xolox
Copy link
Owner

xolox commented Sep 17, 2021

I'm going to merge the changes provided by @dirk-thomas in this pull request but will incorporate the suggestion @KyleKing made in #45 (comment) because it sounds like this should result in the best of both worlds.

xolox added a commit that referenced this pull request Sep 17, 2021
@xolox xolox merged commit ae2a7e2 into xolox:master Sep 17, 2021
@xolox
Copy link
Owner

xolox commented Sep 17, 2021

Hi all,

Thanks for the feedback and sorry it took me so long to resolve this.

I think this issue should now be resolved with the release of humanfriendly 10.0, because I merged the changes suggested by this pull request and then also incorporated the pyreadline3 suggestion made in the comments here.

However I don't have access to a Windows environment for testing, so if anyone can confirm that would be great 😅.

@dirk-thomas dirk-thomas deleted the dirk-thomas/skip-pyreadline-py39 branch September 18, 2021 04:52
kraj pushed a commit to YoeDistro/meta-openembedded that referenced this pull request Sep 27, 2021
`Release 10.0`_ (2021-09-17)
----------------------------
**Noteworthy changes:**

- Merged pull request `openembedded#45`_ to resolve the issue caused by the conditional
  :pypi:`pyreadline` requirement on Windows not supporting Python 3.9+.

- Updated the readme to use Python 3 in the example (reported in issue `openembedded#56`_).
  Also added a mention of the ``humanfriendly --demo`` command.

- Removed the ``humanfriendly.compat.unittest`` alias that presumably no-one is
  using at this point; it had been rendered useless quite a long time ago
  (requested in issue `openembedded#53`_).

**Internal changes:**

- Merged pull request `openembedded#54`_ which migrates the :pypi:`humanfriendly` project
  from Travis CI to GitHub Actions and from Coveralls.io to Codecov.

- Fixed a deprecation warning concerning ``setup.cfg`` and some Sphinx
  documentation errors.

.. _Release 10.0: xolox/python-humanfriendly@9.2...10.0
.. _#45: xolox/python-humanfriendly#45
.. _#53: xolox/python-humanfriendly#53
.. _#54: xolox/python-humanfriendly#54
.. _#56: xolox/python-humanfriendly#56

Signed-off-by: Zheng Ruoqin <zhengrq.fnst@fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
kraj pushed a commit to YoeDistro/meta-openembedded that referenced this pull request Sep 27, 2021
`Release 10.0`_ (2021-09-17)
----------------------------
**Noteworthy changes:**

- Merged pull request `openembedded#45`_ to resolve the issue caused by the conditional
  :pypi:`pyreadline` requirement on Windows not supporting Python 3.9+.

- Updated the readme to use Python 3 in the example (reported in issue `openembedded#56`_).
  Also added a mention of the ``humanfriendly --demo`` command.

- Removed the ``humanfriendly.compat.unittest`` alias that presumably no-one is
  using at this point; it had been rendered useless quite a long time ago
  (requested in issue `openembedded#53`_).

**Internal changes:**

- Merged pull request `openembedded#54`_ which migrates the :pypi:`humanfriendly` project
  from Travis CI to GitHub Actions and from Coveralls.io to Codecov.

- Fixed a deprecation warning concerning ``setup.cfg`` and some Sphinx
  documentation errors.

.. _Release 10.0: xolox/python-humanfriendly@9.2...10.0
.. _#45: xolox/python-humanfriendly#45
.. _#53: xolox/python-humanfriendly#53
.. _#54: xolox/python-humanfriendly#54
.. _#56: xolox/python-humanfriendly#56

Signed-off-by: Zheng Ruoqin <zhengrq.fnst@fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
kraj pushed a commit to YoeDistro/meta-openembedded that referenced this pull request Sep 27, 2021
`Release 10.0`_ (2021-09-17)
----------------------------
**Noteworthy changes:**

- Merged pull request `openembedded#45`_ to resolve the issue caused by the conditional
  :pypi:`pyreadline` requirement on Windows not supporting Python 3.9+.

- Updated the readme to use Python 3 in the example (reported in issue `openembedded#56`_).
  Also added a mention of the ``humanfriendly --demo`` command.

- Removed the ``humanfriendly.compat.unittest`` alias that presumably no-one is
  using at this point; it had been rendered useless quite a long time ago
  (requested in issue `openembedded#53`_).

**Internal changes:**

- Merged pull request `openembedded#54`_ which migrates the :pypi:`humanfriendly` project
  from Travis CI to GitHub Actions and from Coveralls.io to Codecov.

- Fixed a deprecation warning concerning ``setup.cfg`` and some Sphinx
  documentation errors.

.. _Release 10.0: xolox/python-humanfriendly@9.2...10.0
.. _#45: xolox/python-humanfriendly#45
.. _#53: xolox/python-humanfriendly#53
.. _#54: xolox/python-humanfriendly#54
.. _#56: xolox/python-humanfriendly#56

Signed-off-by: Zheng Ruoqin <zhengrq.fnst@fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
kraj pushed a commit to YoeDistro/meta-openembedded that referenced this pull request Sep 28, 2021
`Release 10.0`_ (2021-09-17)
----------------------------
**Noteworthy changes:**

- Merged pull request `openembedded#45`_ to resolve the issue caused by the conditional
  :pypi:`pyreadline` requirement on Windows not supporting Python 3.9+.

- Updated the readme to use Python 3 in the example (reported in issue `openembedded#56`_).
  Also added a mention of the ``humanfriendly --demo`` command.

- Removed the ``humanfriendly.compat.unittest`` alias that presumably no-one is
  using at this point; it had been rendered useless quite a long time ago
  (requested in issue `openembedded#53`_).

**Internal changes:**

- Merged pull request `openembedded#54`_ which migrates the :pypi:`humanfriendly` project
  from Travis CI to GitHub Actions and from Coveralls.io to Codecov.

- Fixed a deprecation warning concerning ``setup.cfg`` and some Sphinx
  documentation errors.

.. _Release 10.0: xolox/python-humanfriendly@9.2...10.0
.. _#45: xolox/python-humanfriendly#45
.. _#53: xolox/python-humanfriendly#53
.. _#54: xolox/python-humanfriendly#54
.. _#56: xolox/python-humanfriendly#56

Signed-off-by: Zheng Ruoqin <zhengrq.fnst@fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
kraj pushed a commit to YoeDistro/meta-openembedded that referenced this pull request Sep 28, 2021
`Release 10.0`_ (2021-09-17)
----------------------------
**Noteworthy changes:**

- Merged pull request `openembedded#45`_ to resolve the issue caused by the conditional
  :pypi:`pyreadline` requirement on Windows not supporting Python 3.9+.

- Updated the readme to use Python 3 in the example (reported in issue `openembedded#56`_).
  Also added a mention of the ``humanfriendly --demo`` command.

- Removed the ``humanfriendly.compat.unittest`` alias that presumably no-one is
  using at this point; it had been rendered useless quite a long time ago
  (requested in issue `openembedded#53`_).

**Internal changes:**

- Merged pull request `openembedded#54`_ which migrates the :pypi:`humanfriendly` project
  from Travis CI to GitHub Actions and from Coveralls.io to Codecov.

- Fixed a deprecation warning concerning ``setup.cfg`` and some Sphinx
  documentation errors.

.. _Release 10.0: xolox/python-humanfriendly@9.2...10.0
.. _#45: xolox/python-humanfriendly#45
.. _#53: xolox/python-humanfriendly#53
.. _#54: xolox/python-humanfriendly#54
.. _#56: xolox/python-humanfriendly#56

Signed-off-by: Zheng Ruoqin <zhengrq.fnst@fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
halstead pushed a commit to openembedded/meta-openembedded that referenced this pull request Sep 28, 2021
`Release 10.0`_ (2021-09-17)
----------------------------
**Noteworthy changes:**

- Merged pull request `#45`_ to resolve the issue caused by the conditional
  :pypi:`pyreadline` requirement on Windows not supporting Python 3.9+.

- Updated the readme to use Python 3 in the example (reported in issue `#56`_).
  Also added a mention of the ``humanfriendly --demo`` command.

- Removed the ``humanfriendly.compat.unittest`` alias that presumably no-one is
  using at this point; it had been rendered useless quite a long time ago
  (requested in issue `#53`_).

**Internal changes:**

- Merged pull request `#54`_ which migrates the :pypi:`humanfriendly` project
  from Travis CI to GitHub Actions and from Coveralls.io to Codecov.

- Fixed a deprecation warning concerning ``setup.cfg`` and some Sphinx
  documentation errors.

.. _Release 10.0: xolox/python-humanfriendly@9.2...10.0
.. _#45: xolox/python-humanfriendly#45
.. _#53: xolox/python-humanfriendly#53
.. _#54: xolox/python-humanfriendly#54
.. _#56: xolox/python-humanfriendly#56

Signed-off-by: Zheng Ruoqin <zhengrq.fnst@fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com>
daregit pushed a commit to daregit/yocto-combined that referenced this pull request May 22, 2024
`Release 10.0`_ (2021-09-17)
----------------------------
**Noteworthy changes:**

- Merged pull request `#45`_ to resolve the issue caused by the conditional
  :pypi:`pyreadline` requirement on Windows not supporting Python 3.9+.

- Updated the readme to use Python 3 in the example (reported in issue `#56`_).
  Also added a mention of the ``humanfriendly --demo`` command.

- Removed the ``humanfriendly.compat.unittest`` alias that presumably no-one is
  using at this point; it had been rendered useless quite a long time ago
  (requested in issue `#53`_).

**Internal changes:**

- Merged pull request `#54`_ which migrates the :pypi:`humanfriendly` project
  from Travis CI to GitHub Actions and from Coveralls.io to Codecov.

- Fixed a deprecation warning concerning ``setup.cfg`` and some Sphinx
  documentation errors.

.. _Release 10.0: xolox/python-humanfriendly@9.2...10.0
.. _#45: xolox/python-humanfriendly#45
.. _#53: xolox/python-humanfriendly#53
.. _#54: xolox/python-humanfriendly#54
.. _#56: xolox/python-humanfriendly#56

Signed-off-by: Zheng Ruoqin <zhengrq.fnst@fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com>
daregit pushed a commit to daregit/yocto-combined that referenced this pull request May 22, 2024
`Release 10.0`_ (2021-09-17)
----------------------------
**Noteworthy changes:**

- Merged pull request `#45`_ to resolve the issue caused by the conditional
  :pypi:`pyreadline` requirement on Windows not supporting Python 3.9+.

- Updated the readme to use Python 3 in the example (reported in issue `#56`_).
  Also added a mention of the ``humanfriendly --demo`` command.

- Removed the ``humanfriendly.compat.unittest`` alias that presumably no-one is
  using at this point; it had been rendered useless quite a long time ago
  (requested in issue `#53`_).

**Internal changes:**

- Merged pull request `#54`_ which migrates the :pypi:`humanfriendly` project
  from Travis CI to GitHub Actions and from Coveralls.io to Codecov.

- Fixed a deprecation warning concerning ``setup.cfg`` and some Sphinx
  documentation errors.

.. _Release 10.0: xolox/python-humanfriendly@9.2...10.0
.. _#45: xolox/python-humanfriendly#45
.. _#53: xolox/python-humanfriendly#53
.. _#54: xolox/python-humanfriendly#54
.. _#56: xolox/python-humanfriendly#56

Signed-off-by: Zheng Ruoqin <zhengrq.fnst@fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com>
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

Successfully merging this pull request may close these issues.

Dependency on pyreadline may cause breaking incompatibility in Python 3.9
4 participants