Giter VIP home page Giter VIP logo

pathlib2's Introduction

pathlib2

Jazzband github codecov

Fork of pathlib aiming to support the full stdlib Python API.

The old pathlib module on bitbucket is no longer maintained. The goal of pathlib2 is to provide a backport of standard pathlib module which tracks the standard library module, so all the newest features of the standard pathlib can be used also on older Python versions.

Download

Standalone releases are available on PyPI: http://pypi.python.org/pypi/pathlib2/

Development

The main development takes place in the Python standard library: see the Python developer's guide. In particular, new features should be submitted to the Python bug tracker.

Issues that occur in this backport, but that do not occur not in the standard Python pathlib module can be submitted on the pathlib2 bug tracker.

Documentation

Refer to the standard pathlib documentation.

Known Issues

For historic reasons, pathlib2 still uses bytes to represent file paths internally. Unfortunately, on Windows with Python 2.7, the file system encoder (mcbs) has only poor support for non-ascii characters, and can silently replace non-ascii characters without warning. For example, u'тест'.encode(sys.getfilesystemencoding()) results in ???? which is obviously completely useless.

Therefore, on Windows with Python 2.7, until this problem is fixed upstream, unfortunately you cannot rely on pathlib2 to support the full unicode range for filenames. See issue #56 for more details.

pathlib2's People

Contributors

chrysle avatar clbarnes avatar eevee avatar gaborbernat avatar graingert avatar hugovk avatar jazzband-bot avatar lelit avatar mcmtroffaes avatar ossdev07 avatar pitrou avatar ppentchev avatar pradyunsg avatar rubik avatar sirex avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pathlib2's Issues

maintainership & project lead

Follow up from #66.

The main activity for pathlib2 is to backport any updates from cpython into this repository, typically a few times a year, with the main development of pathlib happening in upstream cpython. As stated, in the long term, I really would like to stand down as lead maintainer. I'm happy to keep helping along in the background e.g. reviewing PRs and submitting trivial patches if need be.

Is someone interested (e.g. someone who uses pathlib2 in their work) to take on the lead responsibility for this package?

Cannot instantiate subclass

Should it be possible to subclass Path and create instances without having to figure out a special trick?

When I try to create an instance of a subclass, I get…

type object 'Path' has no attribute '_flavour'

Consider `tox` for testing

As a backport library, pathlib2 rightly tests against many different versions of python, and as such contains a complex system of shims filling in and renaming stdlib stuff. Running the tests to make sure that these all still work after any change means maintaining 9 different virtualenvs, which is a hassle and a barrier to entry for contributors.

Tox (and its extension for parallel testing, detox) could control setting up and tearing down all the different virtualenvs, making it much easier to test locally, and keeping the test environment consistent between the local and CI environments.

getfilesystemencoding can be None, causing error

In Python before 3.2, it's possible to get None from this. However AWS Codebuild is setting things up, this causes pathlib2 to explode:

...
  File "/codebuild/output/src991325250/src/github.com/.../ve-web/local/lib/python2.7/site-packages/pathlib2/__init__.py", line 928, in _make_child 
    drv, root, parts = self._parse_args(args) 
  File "/codebuild/output/src991325250/src/github.com/.../ve-web/local/lib/python2.7/site-packages/pathlib2/__init__.py", line 885, in _parse_args 
    parts.append(a.encode(sys.getfilesystemencoding())) 
TypeError: encode() argument 1 must be string, not None 

A support for absolute path in `glob()` is required

Currently, it is required to split a wildcard path to a directory part before to be able to list all relevant files using glob() call. It will be useful to feature support of the absolute path in glob() as well as relative.

Explicit license in source files

I am working on having a python-pathlib2 package in Fedora.
Review Request: python-pathlib2 - Object-oriented filesystem paths
One issue is about having only a LICENSE.rst file.

It should be enough to have a confirmation that all files are
under MIT license.
Otherwise, something like 3 lines header should be enough,
as there is already the LICENSE.rst file. For example:

# Copyright (c) 2014 Matthias C. M. Troffaes
# Copyright (c) 2012-2014 Antoine Pitrou and contributors
# Distributed under the terms of the MIT License.

resync against upstream pathlib?

I was doing a comparison between pathlib as exists in python git mirror and in this repository. Are you still planning on doing any more releases to keep up with changes up to 3.5?

Calling Path.exists() on non-existent drive raises WindowsError

Any idea why this is happening?

>>> import pathlib2 as pathlib
>>> pathlib.Path(r"E:\Whatever\blah.txt").exists()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "P:\common\rez\packages\pathlib2\2.3.2\pathlib2\__init__.py", line 1549, in exists
    self.stat()
  File "P:\common\rez\packages\pathlib2\2.3.2\pathlib2\__init__.py", line 1356, in stat
    return self._accessor.stat(self)
  File "P:\common\rez\packages\pathlib2\2.3.2\pathlib2\__init__.py", line 541, in wrapped
    return strfunc(str(pathobj), *args)
WindowsError: [Error 21] The device is not ready: 'E:\\Whatever\\blah.txt'
>>> import os
>>> os.path.exists(r"E:\Whatever\blah.txt")
False
>>> pathlib.Path(r"C:\whatever\blah.txt").exists()
False

I tested this with version 2.3.2 and the latest commit 87f9a0e

compatibility issue in v2.3.7

When installing new version of 2.3.7 on Python2.7, pip prompts error:

   from six.moves.collections_abc import Sequence

ImportError: No module named collections_abc

Pathlib2 switched to new syntax in setup.py without bumping major or minor version

The switch to new syntax for conditional dependencies in pathlib2-2.3.2 causes issues to automated build tooling that uses pex. This line: https://github.com/mcmtroffaes/pathlib2/blob/develop/setup.py#L47 used to be done in extras_require instead of install_requires.

Recent versions of setuptools and wheel are able to parse this new syntax, but older versions enforced by pex are not: https://github.com/pantsbuild/pex/blob/v1.4.5/pex/version.py#L9
Until recently, wheel was also forced to version that is not able to parse new syntax: https://github.com/pantsbuild/pex/blob/v1.4.4/pex/version.py#L11

This would be less of an issue if pathlib2 bumped a version in major or minor instead of just patch part of the version number. This is a breaking change for build systems that worked just fine with pathlib2-2.3.0.

I'm asking if we can do one or both of the following to fix this issue.

  1. Revert to extras_require in version 2.3.x of pathlib, preferably 2.x and perhaps use it only for the next major version?
  2. Perhaps avoid using the new syntax entirely? This is a backport package and those who need a backport package most probably do not have up-to-date environment anyway to parse the new features.

Path().glob() returns paths with corrupted case on Windows

Using Python 3.7.2 with pathlib2 2.3.3 on Windows 10.

D:\tmp>dir /S
 Том в устройстве D имеет метку Data
 Серийный номер тома: 6408-3709

 Содержимое папки D:\tmp

05.03.2019  13:28    <DIR>          .
05.03.2019  13:28    <DIR>          ..
05.03.2019  13:28    <DIR>          MySubDir
05.03.2019  13:23                 0 My_File.txt
               1 файлов              0 байт

 Содержимое папки D:\tmp\MySubDir

05.03.2019  13:28    <DIR>          .
05.03.2019  13:28    <DIR>          ..
05.03.2019  13:28    <DIR>          MySubDir2
05.03.2019  13:23                 0 my_file2.txt
               1 файлов              0 байт

 Содержимое папки D:\tmp\MySubDir\MySubDir2

05.03.2019  13:28    <DIR>          .
05.03.2019  13:28    <DIR>          ..
05.03.2019  13:28                 0 my_file3.TXT
               1 файлов              0 байт

     Всего файлов:
               3 файлов              0 байт
               8 папок  978 329 309 184 байт свободно
Python 3.7.2 (tags/v3.7.2:9a3ffc0492, Dec 23 2018, 23:09:28) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from pathlib2 import *
>>> p = Path('.')
>>> print([x for x in p.glob('My_File.txt')])
[WindowsPath('my_file.txt')]
>>> print([x for x in p.glob('*')])
[WindowsPath('MySubDir'), WindowsPath('My_File.txt')]
>>> print([x for x in p.glob('*/my_file2.txt')])
[WindowsPath('MySubDir/my_file2.txt')]
>>> print([x for x in p.glob('MySubDir/MySubDir2/my_file3.TXT')])
[WindowsPath('mysubdir/mysubdir2/my_file3.txt')]
>>> print([x for x in p.glob('*MySubDir/MySubDir2/my_file3.TXT')])
[WindowsPath('MySubDir/mysubdir2/my_file3.txt')]

Unicode issues

Python 2.7.13, pathlib2-2.3.0

If the the input to path is unicode, the output of Path functions is not unicode but str. In python 3 both will be unicode.

In python 2 str input should result in str, unicode in unicode output. This would also be consistent to how python 2 stdlib functions work.

>>> from pathlib2 import Path
>>> Path(u"/asd").parts
('\\', 'asd')
>>> Path(u"/asd").name
'asd'

resolve() is always strict with Python 2.7 on Windows

I'm using pathlib2 version 2.3.2.

On Windows with Python 2.7 the strict=False option has no effect:

Python 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:25:58) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import pathlib2
>>> pathlib2.Path('foo').resolve(False)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "c:\Python27\lib\site-packages\pathlib2\__init__.py", line 1343, in resolve
    self.stat()
  File "c:\Python27\lib\site-packages\pathlib2\__init__.py", line 1356, in stat
    return self._accessor.stat(self)
  File "c:\Python27\lib\site-packages\pathlib2\__init__.py", line 541, in wrapped
    return strfunc(str(pathobj), *args)
WindowsError: [Error 2] The system cannot find the file specified: 'foo'

On OSX with Python 2.7 it works ok:

Python 2.7.15 (default, Jun 17 2018, 13:05:56)
[GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.39.2)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pathlib2
>>> pathlib2.Path('/foo').resolve(False)
PosixPath('/foo')

And on Windows with Python 3.7 it works ok:

Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import pathlib2
>>> pathlib2.Path('foo').resolve(False)
WindowsPath('foo')

resolve(strict=True) is not case-sensitive on Windows and Python 2.7

Good day ladies and gentlemen,

I have a problem with the pathlib2.Path().resolve(strict=True) and python-2.
This function is case-sensitive when running with python-3 but not when run with python-2.

In the example in the screenshot I would expect pathlib2.Path("C:/temp/garbage.txt").resolve(strict=True) to return C:/temp/gArbage.txt instead of C:/temp/garbage.txt.

See screenshot (old screenshot where I tested python-3 agains pathlib):
grafik

I tested on Windows 10 with python-2.7.17, pathlib2-2.3.3 and pathlib2-2.3.7.post1.

I doublechecked python-3.7.5 with pathlib2-2.3.7.post1. This will resolve correctly. So it is a python-2 specific problem.

grafik

Thanks in advance for looking into it!

UnicodeEncodeError in Path() for a path with non-ASCII characters

>>> pathlib2.Path(u'/c/Documents and Settings/User/\u041c\u043e\u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b/.ipython/profile_default/db')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/site-packages/pathlib2.py", line 1095, in __new__
    self = cls._from_parts(args, init=False)
  File "/usr/lib/python2.7/site-packages/pathlib2.py", line 760, in _from_parts
    drv, root, parts = self._parse_args(args)
  File "/usr/lib/python2.7/site-packages/pathlib2.py", line 748, in _parse_args
    parts.append(str(a))
UnicodeEncodeError: 'ascii' codec can't encode characters in position 31-33: ordinal not in range(128)

As you may have guessed, this appears when starting ipython in Cygwin if Cygwin's home dir is a junction to the Windows one.

Since str is Unicode in Python 3, I believe the error is specific to the backport.

Casing removed from paths on Windows

With a file called TEST_capitalization.txt

import pathlib
import pathlib2

print(list(pathlib.Path().glob("TEST_capitalization.txt")))
print(list(pathlib2.Path().glob("TEST_capitalization.txt")))

returns

[WindowsPath('TEST_capitalization.txt')]
[WindowsPath('test_capitalization.txt')]

These two should be identical, right?

It is an issue in https://github.com/mbarkhau/bumpver, where files with capital letters in the path are updated, but not staged and comitted in git.

Environment:
pathlib2 2.3.7.post1
Windows 10 Enterprise, Version 10.0.19044 Build 19044
Python 3.9.4

resolve raises a WindowsError in py2.7 when a path does not exist.

the resolve method is not behaving as expected in python2.7 when called with a path that does not exist.

Expected behavior

Python 3.6.4 (v3.6.4:d48eceb, Dec 19 2017, 06:54:40) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from pathlib import Path
>>> Path('~/does_not_exist').resolve()
WindowsPath('~/does_not_exist')
Python 3.6.4 (v3.6.4:d48eceb, Dec 19 2017, 06:54:40) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from pathlib2 import Path
>>> Path('~/does_not_exist').resolve()
WindowsPath('~/does_not_exist')

Actual behavior

Python 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:25:58) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from pathlib2 import Path
>>> Path('~/does_not_exist').resolve()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Projects\python\construct_org\construct\venv27\lib\site-packages\pathlib2\__init__.py", line 1343, in resolve
    self.stat()
  File "C:\Projects\python\construct_org\construct\venv27\lib\site-packages\pathlib2\__init__.py", line 1356, in stat
    return self._accessor.stat(self)
  File "C:\Projects\python\construct_org\construct\venv27\lib\site-packages\pathlib2\__init__.py", line 541, in wrapped
    return strfunc(str(pathobj), *args)
WindowsError: [Error 3] The system cannot find the path specified: '~\\does_not_exist'

Pathlib2 2.2.1 fails to install on TravisCI

You can refer to solrcloudpy/solrcloudpy#41 as a history of me trying to figure out why my project's builds are failing, and isolating it to version 2.2.1 instead of 2.2.0. My project has IPython as dependency, which has Pathlib2 as a dependency. Since I wasn't pegged to 2.2.0, previous builds passed, but builds that use 2.2.1 fail.

You can see in this build in particular that version 2.2.1 fails because it now claims to only support Python version 3.5 or greater.

If we have introduced a breaking change where pathlib2 no longer supports 2.7, this probably should be a major version bump rather than a patch bump.

Release 2.3.7 has fragile six dependency

The new 2.3.7 release depends on six.moves.collections_abc, which was introduced in six 1.13.0, but setup.py does not specify that that the six dependency must be >=1.13.0. This can result in failures if projects depend on pathlib2 without manually specifying a newer six version themselves.

dropping python 2.7

I thought I write down my thoughts on this backport w.r.t. dropping Python 2.7 as this might need some discussion.

The current code for pathlib2 contains a lot of extremely ugly (and type-annotation unfriendly) hacks relating to Python 2.7. If we drop it, there's no need to keep those hacks around, resulting in cleaner code with less potential sources for bugs, and with more helpful type annotations. So, instead of manually removing those hacks, I'd actually suggest to make a fresh backport by taking the current cpython pathlib module and simply patching it to work on 3.6+. I believe this will be the easiest route going forward.

use “pathlib” as module name

i want to use

from pathlib import Path
Path('foo').mkdir(exist_ok=True)

instead of

try:
    from pathlib import Path
except ImportError:
    from pathlib2 import Path
Path('foo').mkdir(exist_ok=True)

this should be no problem since the stdlib pathlib should be backwards compatible.

in order to make the change backwards compatible, you could make setup.py create both pathlib.py and a symlink named pathlib2.py

You cannot have a py2.py3-none-any.whl if there are version dependent dependancies

Installing pathlib2 version 2.2.0 using pip on a Python 3.5 or Python 3.6 will get the wheel and thus install scandir. Because the setup.py contains code that depends on the version of Python that runs setup.py, no single py2.py3-none-any wheel can be used as there is no such version dependency within the wheel's metadata file.

This is especially harmful because scandir (version 1.4) includes test data in its zip file for which the filenames generates errors on extraction on Docker image Ubuntu 16.04 with Python3 installed. Scandir also doesn't seem to be able to handle systems without compiler.

This broke one of Docker containers and my current solution is to pin the install on pathlib2.
The quick solution would be to remove the wheel file from PyPI any new versions should remove the dependency on scandir in setup.py until scandir has solved its problems.

Implement Jazzband guidelines for pathlib2

This issue tracks the implementation of the Jazzband guidelines for the project pathlib2

It was initiated by @mcmtroffaes who was automatically assigned in addition to the Jazzband roadies.

See the TODO list below for the generally required tasks, but feel free to update it in case the project requires it.

Feel free to ping a Jazzband roadie if you have any question.

TODOs

Project details

Description Backport of pathlib aiming to support the full stdlib Python API. As of January 1 2020, this repository will no longer receive any further feature updates, as Python 2 is no longer supported.
Homepage
Stargazers 64
Open issues 0
Forks 18
Default branch develop
Is a fork False
Has Wiki False
Has Pages False

Pathlib does not compare Windows and MinGW paths as equal

pathlib does not compare absolute paths from Windows and MinGW as equal.

Windows absolute path: C:\path\to\tool
MinGW absolute path: /c/path/to/tool
Cygwin absolute path: /cygdrive/c/path/to/tool

I consider this a bug, because it's the same bug but 3 different writings and pathlib is not able to identify the equality.

This issues is also listed here:

`/ ".."` to go back one step

It would be good if there was a feature to make a Path to go back one step by new_path = some_path / "..".
Something like this:

from pathlib2 import Path
base_directory = Path("base_directory/source_directory")
data_directory = base_directory / "text_files/text_data"
print(data_directory)

That make this output:

base_directory/source_directory/text_files/text_data

Now with the code below:

file_directory = data_directory / ".."
print(file_directory)

Output this:

base_directory/source_directory/text_files/

Instead this:

base_directory/source_directory/text_files/text_data/..

Project is stale

Today I needed pathlib.Path.with_stem(), which was introduced in Python 3.9 but my projects still support Python 3.8. I saw that this project advertised compatibility with future Python versions, so I was hopeful it would fix the issue, but it doesn't:

 ~ @ pip-run pathlib2
Python 3.12.1 (main, Dec  7 2023, 20:45:44) [Clang 15.0.0 (clang-1500.1.0.2.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pathlib2
>>> pathlib2.Path('foo/bar.baz').with_stem('bing')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'PosixPath' object has no attribute 'with_stem'

I can see that with_stem exists in the code base, but there just haven't been any releases since.

I see in #70 that the project was on the verge of cutting a release. Are there still plans to cut a release of the committed code? If not, maybe consider updating the readme to indicate the status.

`os.path.join` compatibility

In python 3, os.path.join(pathlib.Path('my/path'), 'my.file') returns a string, my/path/my.file.

However, os.path.join(pathlib2.Path('my/path'), 'my.file') raises an AttributeError:

     68         if b.startswith('/'):
     69             path = b
---> 70         elif path == '' or path.endswith('/'):
     71             path +=  b
     72         else:

AttributeError: 'PosixPath' object has no attribute 'endswith'

This is an issue for someone trying to gradually port a large codebase over to using Paths

While strictly speaking, this may be due to py2's implementation of os.path.join rather than pathlib2's implementation of PurePath, it may be useful to reverse engineer compatibility for such a common path operation.

Usually, this would require implementing startswith, endswith, and __iadd__ on PurePath. However, giving pathlib2.PurePath a significant amount of behaviour not seen in the 'real' PurePath doesn't seem like a good idea. Is there another way round it? Is it possible for importing pathlib2 to insert a shim into os.path?

os.scandir only supported by python 3.6

I recently tried to version bump the Gentoo Linux pathlib2 ebuild. Unfortunately, the tests fail with ImportError: No module named scandir. With a quick look to the python docs it seems that os.scandir is only available with python 3.6. I would suggest to either drop scandir or modify the supported python versions in the setup.py accordingly.

need py3.5 pathlib .expanduser method

In Python 3.5.0:

  from pathlib import Path
  f = Path('~')
  f.expanduser()

gives the home directory full path.

In Python 3.4.3 with pathlib2 2.0.1:

  from pathlib2 import Path
  f = Path('~')
  f.expanduser()

gives AttributeError: 'PosixPath' object has no attribute 'expanduser'

handle collections deprecation

/pathlib2/__init__.py:15: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
    from collections import Sequence

_try_except_permissionerror_iter() passed unexpected argument to except_iter

except_iter() function is often defined without an argument and then passed to _try_except_permissionerror_iter() which invokes except_iter() with an exception as argument. As a result there are several scenarios where pathlib2 errors our with less than clear stack trace.

For example when glob is called on dir to which process does not have read access Pathlib2 raises TypeError:

  File "/usr/local/lib/python2.7/dist-packages/foo/bar.py", line 80, in list_unprocessed
    for f in self.path.glob(glob)
  File "/usr/local/lib/python2.7/dist-packages/pathlib2.py", line 1281, in glob
    for p in selector.select_from(self):
  File "/usr/local/lib/python2.7/dist-packages/pathlib2.py", line 686, in _select_from
    for x in _try_except_permissionerror_iter(try_iter, except_iter):
  File "/usr/local/lib/python2.7/dist-packages/pathlib2.py", line 97, in _try_except_permissionerror_iter
    for x in except_iter(exc):
TypeError: except_iter() takes no arguments (1 given)

[self-tests] failures against Python 3.10.0

2 tests of pathlib2 fail with Python3.10.0:

============================= test session starts ==============================
platform linux -- Python 3.10.0, pytest-6.2.5, py-1.10.0, pluggy-1.0.0 -- /usr/src/RPM/BUILD/python3-module-pathlib2-2.3.6/.tox/py3/bin/python
cachedir: .tox/py3/.pytest_cache
rootdir: /usr/src/RPM/BUILD/python3-module-pathlib2-2.3.6, configfile: pytest.ini, testpaths: tests
collecting ... collected 0 items / 2 errors

==================================== ERRORS ====================================
___________________ ERROR collecting tests/test_pathlib2.py ____________________
tests/test_pathlib2.py:57: in <module>
    TESTFN = support.TESTFN
E   AttributeError: module 'test.support' has no attribute 'TESTFN'
____________________ ERROR collecting tests/test_unicode.py ____________________
tests/test_unicode.py:11: in <module>
    from test_pathlib2 import support_skip_unless_symlink
<frozen importlib._bootstrap>:1027: in _find_and_load
    ???
<frozen importlib._bootstrap>:1006: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:688: in _load_unlocked
    ???
/usr/lib/python3/site-packages/_pytest/assertion/rewrite.py:170: in exec_module
    exec(co, module.__dict__)
tests/test_pathlib2.py:57: in <module>
    TESTFN = support.TESTFN
E   AttributeError: module 'test.support' has no attribute 'TESTFN'
=========================== short test summary info ============================
ERROR tests/test_pathlib2.py - AttributeError: module 'test.support' has no a...
ERROR tests/test_unicode.py - AttributeError: module 'test.support' has no at...
!!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!!!
============================== 2 errors in 0.27s ===============================

with https://bugs.python.org/issue40275 support.TESTFN is no longer alias for os_helper.TESTFN.

https://docs.python.org/3/library/test.html#module-test.support.os_helper

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.