Comments (5)
pathlib is an old version, now the current version is pathlib2.
from ubelt.
The pathlib module is a standard library module. It's always installed in Python 3.4+
Recent versions of ubelt only support Python 3.6+, but older releases do support other older Python versions.
from ubelt.
I use python-39 and the test depending on pathlib is skipped because it isn't available.
from ubelt.
Something is wrong. The pathlib module should always be available on 3.9.
What is the result of:
python3 -c "import pathlib; print(pathlib.__file__)"
?
Oh, I think I see the problem now. The test_pathlib
test itself is bad.
def test_pathlib():
try:
import pathlib
base = pathlib.Path(ub.ensure_app_cache_dir('ubelt'))
dpath = base.joinpath('test_pathlib_mkdir')
# ensuredir
ub.delete(dpath)
assert not dpath.exists()
got = ub.ensuredir(dpath)
assert got.exists()
# shrinkuser
assert ub.shrinkuser(base) == '~/.cache/ubelt'
assert ub.augpath(base, prefix='foo') == '/home/joncrall/.cache/fooubelt'
ub.expandpath(base)
except Exception:
import pytest
pytest.skip('pathlib is not installed')
I hardcoded my machine name into it, and the exception catches anything. Changing that line to str(ub.Path('~/.cache/fooubelt').expand())
should work. This is a test from when ubelt still supported 2.7, which is why the try/except is there. It should just be removed now.
from ubelt.
$ python3.9 -c "import pathlib; print(pathlib.__file__)"
/usr/local/lib/python3.9/pathlib.py
from ubelt.
Related Issues (15)
- Test ubelt/util_platform.py::find_exe:0 fails if which(1) is not installed HOT 5
- Investigate code scanning alert - is this a real vulnerability?
- 23 errors in tests HOT 5
- 1.2.3: The test_deprecated_grabdata_args test fails HOT 2
- help to confirm the depends of the module HOT 2
- Provide a subprocess-compatible interface in cmd HOT 3
- FileNotFoundError attempting to launch sys.executable on Windows HOT 3
- test_numpy_object_array fails: TypeError: directly hashing ndarrays with dtype=object is unstable HOT 1
- Undefined name 'xdoc' in ubelt/util_colors.py HOT 1
- `pip install ubelt` incorrectly installs jaraco on linux HOT 2
- ub.argval strips equals signs ("=") from the value HOT 1
- Error in documentation for ubelt.util_dict.map_vals HOT 1
- Request: ensure director verbose mentions if it created a new directory HOT 1
- Docs are not being built right HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ubelt.