Skip to content

Update requirements: remove pathlib #224

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

Merged

Conversation

esquire900
Copy link
Contributor

Removing the pathlib dependency; it might interfere with some other projects and it's no longer needed. Pathlib is included in python core >= 3.5, this project required at least 3.7

Removing the pathlib dependency; it might interfere with some other projects and it's no longer needed. Pathlib is included in python core >= 3.5, this project required at least 3.7
@oliver-zehentleitner
Copy link
Owner

Do you have a link to proof that info?

Besides the requirements.txt file, dependencies are also defined in environment.yml and setup.py.

@esquire900
Copy link
Contributor Author

Pathlib was introduced in https://www.python.org/dev/peps/pep-0428/ and is part of the core library since at least 3.6: https://docs.python.org/3.6/library/pathlib.html

I am running into a weird bug when trying to install with poetry, where a function of pathlib is requested that exists in the core library, but not the pip version.

AttributeError: 'PosixPath' object has no attribute 'read_text'
Similar to, for example:
emilhe/dash-extensions#19

I suspect it's a pretty niche problem, but since pathlib should not be necessary, it might be simpler to remove the requirement altogether.

(Thank you for all your work on this package by the way, very helpful!)

@oliver-zehentleitner oliver-zehentleitner merged commit 64ccf7d into oliver-zehentleitner:master Dec 22, 2021
@oliver-zehentleitner
Copy link
Owner

Thank you for this hint and PR!

Will be included within the next release!

@papapon
Copy link

papapon commented Dec 30, 2021

@oliver-zehentleitner when do you plan to do a release?

If I try to install it (with poetry) from master, I get an error:

$ poetry add git+https://github.com/oliver-zehentleitner/unicorn-binance-websocket-api.git
x
PackageInfoError

Unable to determine package info for path: /tmp/pypoetry-git-unicorn-binance-websocket-apt4qgqv43

Fallback egg_info generation failed.

Command ['/tmp/tmpfoqpapo6/.venv/bin/python', 'setup.py', 'egg_info'] errored with the following return code 1, and output:
Traceback (most recent call last):
File "/tmp/pypoetry-git-unicorn-binance-websocket-apt4qgqv43/setup.py", line 37, in
from unicorn_binance_websocket_api.unicorn_binance_websocket_api_manager import BinanceWebSocketApiManager
File "/tmp/pypoetry-git-unicorn-binance-websocket-apt4qgqv43/unicorn_binance_websocket_api/init.py", line 2, in
from unicorn_binance_websocket_api.unicorn_binance_websocket_api_connection import BinanceWebSocketApiConnection
File "/tmp/pypoetry-git-unicorn-binance-websocket-apt4qgqv43/unicorn_binance_websocket_api/unicorn_binance_websocket_api_connection.py", line 43, in
import websockets
ModuleNotFoundError: No module named 'websockets'

at /usr/local/lib/python3.10/site-packages/poetry/inspection/info.py:500 in _pep517_metadata
496│ try:
497│ venv.run_python("setup.py", "egg_info")
498│ return cls.from_metadata(path)
499│ except EnvCommandError as fbe:
→ 500│ raise PackageInfoError(
501│ path, "Fallback egg_info generation failed.", fbe
502│ )
503│ finally:
504│ os.chdir(cwd.as_posix())

@oliver-zehentleitner
Copy link
Owner

it was planed for now. in the next couple of days!

@oliver-zehentleitner
Copy link
Owner

Its released: https://github.com/LUCIT-Systems-and-Development/unicorn-binance-websocket-api/releases/tag/1.35.0

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.

3 participants