Comments (4)
@ichard26 I have no problem with pulling down v0.10.0 because it broke a very common pattern.
from python-pathspec.
Hi @cpburnz, looks like this has the potential to cause some serious usability problems for downstream users. Black just received a bug report (psf/black#3256) where Black is now reformatting virtual environments (!) named env
with pathspec==0.10.0
. This is because virtual environments (only those created by virtualenv
, not venv
) contain a .gitignore
file that simply excludes everything.
$ virtualenv env
created virtual environment CPython3.8.5.final.0-64 in 2959ms
creator CPython3Posix(dest=/home/ichard26/programming/oss/dir/env, clear=False, no_vcs_ignore=False, global=False)
seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/ichard26/.local/share/virtualenv)
added seed packages: pip==22.2.2, setuptools==63.4.3, wheel==0.37.1
activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator
$ cat env/.gitignore
# created by virtualenv automatically
*
Black doesn't have env
as part of its default excludes so our safeguard that usually prevents virtual environments from being reformatted is useless here. I know that naming virtual environments env
isn't particularly common, but when it does happen, this issue can make Black unusable (since virtual environments can often have an insane amount of code to reformat). Yes it's easy to fix (put env
in your --extend-exclude
configuration), but it's better if this isn't necessary in the first place.
Would you be open to yanking pathspec 0.10.0 on PyPI? It will prevent most users from getting the broken version, but won't break people who are already locked on 0.10.0. It's a bit like a "strongly discouraged for use" marker but for pip 🙂 This post explains it well (see the "The whole release is bad" header).
Thanks in advance!
from python-pathspec.
Hi @bzakdd, thanks for the bug report. This was a regression from fixing #19. This is now fixed and will be in the v0.10.1 release.
from python-pathspec.
@cpburnz Thank you!)
from python-pathspec.
Related Issues (20)
- `match_files()` is not a pure generator function, and it impacts `tree_*()` gravely HOT 1
- Symlink pathspec_meta.py breaks Windows HOT 1
- test_util.py uses os.symlink which can fail on Windows HOT 1
- Backslashes at start of pattern not handled correctly HOT 1
- `!` doesn't exclude files in directories if the pattern doesn't have a trailing slash HOT 1
- Dist failure for Fedora, CentOS, EPEL HOT 11
- The pattern_to_regex method does not seem to work correctly on windows. HOT 4
- IndexError with my .gitignore file when trying to build a Python package HOT 4
- Checking directories via match_file() does not work on Path objects HOT 5
- Package not marked as `py.typed` HOT 1
- Exports are considered private HOT 1
- `'Self'` string literal type is `Unknown` in pyright HOT 1
- Please consider switching the build-system to flit_core to ease setuptools bootstrap HOT 5
- Include directory should override exclude file HOT 3
- On bracket expression negation HOT 2
- match_files with negated path spec HOT 5
- `GitIgnoreSpec` behaviors differ from git HOT 2
- PathSpec.match_file() returns None since 0.12.0 HOT 3
- Exclusions not working HOT 2
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 python-pathspec.