Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
683c7ba
Inline GrepText.options initialization
rsalmaso Aug 6, 2020
6659209
Always use Options class
rsalmaso Aug 7, 2020
14ba4d5
Move EMPTY_DATABLOCK definition
rsalmaso Aug 6, 2020
83234a4
Rework GrepText match context data structure
rsalmaso Feb 17, 2021
b5817ad
Add mypy config
rsalmaso Feb 17, 2021
2caaae4
Add mypy check to tox.ini
rsalmaso Feb 17, 2021
1589059
Require kwargs params for FileRecognizer.__init__
rsalmaso Feb 17, 2021
7f209de
Rework color management
rsalmaso Feb 16, 2021
9ac7fb6
Add typing to codebase
rsalmaso Feb 18, 2021
2e59957
Modernize project configuration (removed setup.{cfg,py})
rsalmaso Jun 25, 2026
5289498
Drop vagrant support
rsalmaso Jun 25, 2026
3da5cc8
Python minimum supported version set to 3.10
rsalmaso Jun 25, 2026
55be49f
Converted .txt and .rst files to .md
rsalmaso Jun 25, 2026
17385fd
Switch from black/flake8/isort to ruff check/format
rsalmaso Jun 25, 2026
0c780ba
Rename is_binary_string param from bytes to data
rsalmaso Feb 17, 2021
ebc6987
Convert Options to dataclass
rsalmaso Jun 25, 2026
41eddae
Convert FileRecognizer to dataclass
rsalmaso Feb 18, 2021
bef34a9
Skip more VCS dirs by default: .git, .jj, .sl, .pijul, _darcs, SCCS
rsalmaso Jun 25, 2026
920f27e
Single open per file: classify binary/gzip while grepping (grep_path)
rsalmaso Jun 25, 2026
6c3c622
Honor .gitignore/.ignore/.hgignore by default
rsalmaso Jun 25, 2026
fc78523
Speed up walk: thread relative path instead of per-entry relpath
rsalmaso Jun 25, 2026
83be763
Fix grind --sys-path: search the directories on sys.path again (the e…
rsalmaso Jun 26, 2026
7af9591
Fix grin -x/--encoding: thread the requested encoding through to the …
rsalmaso Jun 26, 2026
57368d1
Fix grinpython example: forward the regex, files, and file-discovery …
rsalmaso Jun 26, 2026
7e5022c
Fix GrepText.grep_a_file: stop closing sys.stdin when grepping "-"
rsalmaso Jun 26, 2026
4fc39e7
Speed up matching
rsalmaso Jun 27, 2026
2daac63
Speed up large (multi-block, >16 MB) files
rsalmaso Jun 27, 2026
5bbdbeb
Lazily import where possible for faster startup
rsalmaso Jun 27, 2026
12a073c
Much faster -l/--files-with-matches
rsalmaso Jun 27, 2026
1807128
Faster --no-line-number searches (no context, no --emacs)
rsalmaso Jun 27, 2026
914ad89
Faster default (line-numbered, no-context) searches
rsalmaso Jun 27, 2026
0d8dce1
Expand the test suite and add a coverage tox env
rsalmaso Jun 27, 2026
8db98d3
Fix force_color option management
rsalmaso Jun 26, 2026
7d9518f
Search files in parallel by default
rsalmaso Jun 27, 2026
e94345d
Skip paths with an embedded NUL while walking
rsalmaso Jun 25, 2026
2cacc98
Faster ignore matching while walking
rsalmaso Jun 27, 2026
3e0ef36
Add an optional `re2` extra
rsalmaso Jun 28, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
.tox/
.vagrant/
build/
dist/
grin3.egg-info/
pip-wheel-metadata/
.venv/
.idea/
__pycache__
.mypy_cache
*~
*-
*.swp
*.bak
*.pyc
*.orig
.coverage
.coverage.*
5 changes: 4 additions & 1 deletion .hgignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
syntax: regexp
.ruff_cache/
.tox/
.vagrant/
build/
dist/
grin3.egg-info/
pip-wheel-metadata/
^\.venv/
^\.idea
__pycache__
.mypy_cache

syntax: glob
*~
Expand All @@ -17,3 +18,5 @@ syntax: glob
*.pyc
*.kpf
*.orig
.coverage
.coverage.*
106 changes: 0 additions & 106 deletions ANNOUNCE.txt

This file was deleted.

116 changes: 116 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
# Changelog

## dev

* modernize project setup/configuration
* drop vagrant support
* require Python >= 3.10
* switch to ruff (replaces black/isort/flake8)
* add mypy config and tox env
* add type hints (mypy strict)
* port grinimports example from compiler (py2) to ast (py3)
* skip .git and more VCS dirs by default (.git, .jj, .sl, .pijul, _darcs, SCCS)
* honor .gitignore/.ignore/.hgignore by default (--no-ignore to disable)
also honor per-repo and user-global VCS excludes: git .git/info/exclude and core.excludesFile, hg .hg/hgrc and global hgrc [ui] ignore
* speed up walking: one open per file (classify while grepping) and no per-entry path resolution
* search files in parallel by default (-j/--jobs, 1 to disable); processes on standard CPython, threads on free-threaded builds
* skip (instead of crashing on) paths with an embedded NUL while walking
* expand the test suite (grind, colors, datablock, utils, CLI) and add a coverage tox env

## 2.6.1

* detect bad gzip files (thanks Charles Cazabon)

## 2.6.0

* add support for Python 3.10
* add support for Python 3.11

## 2.5.0

* add -a/--ascii option (thanks Charles Cazabon)
* add -w/--word-regexp option (thanks Charles Cazabon)

## 2.4.1

* minor code tweaks

## 2.4.0

grin 2.4.X will be a deprecation release(s) where many options and code will be
deprecated and hidden by default (their usage will be under --help-verbose cli
flag)

* remove deprecated grin.default_options, use grin.Options() instead
* deprecate --[no-]skip-backup-files options, use --skip-exts instead
* deprecate --with-filename option (as it is the default option)
* deprecate --without-filename option as an alias for --no-filename option
* deprecate --line-number option (as it is the default option)
* deprecate --skip-hidden-dirs option (as it is the default option)
* deprecate --no-follow option (as it is the default option)
* deprecate --skip-hidden-files option (as it is the default option)
* add --color {auto,no,always} option
* deprecate --no-color, --force-color and --use-color options, use --color option instead

## 2.3.1

* correct default Options.re_flags value

## 2.3.0

* add -F/--fixed-string option (thanks Charles Cazabon)

## 2.2.1

* fix missing grind argument

## 2.2.0

* support for python3.9
* support for pypy3
* add -x, --encoding option (defaults to terminal output encoding)

## 2.1.0

* speedup file access
* default_options is now an object
* exclude by default node_modules,.class,target directories
* support for stable python3.8

## 2.0.2

* fix encoding

## 2.0.1

* fix setup and wheel build
* update docs

## 2.0.0

* refactor code into a module
* refactor test code from nose to unittest
* add Vagrant configuration
* add tox support
* adopt black formatter
* removed TypeError
* drop python3.4 support
* added support for python3.7 and python3.8 (dev)

## 1.2.3

* removed UnicodeDecodeError

## 1.2.2

python3 only port.

* python3 support added.
* python2 support dropped.

## 1.2.1

* Windows defaults to not coloring the output. (Paul Pelzl)
* Fix the reading of gzip files. (Brandon Craig Rhodes)
* Quit gracefully when piping to a program that exits prematurely. (Brandon Craig Rhodes)
* Sort the basenames of files during traversal in order to maintain a repeatable ordering. (Brandon Craig Rhodes)
File renamed without changes.
7 changes: 0 additions & 7 deletions MANIFEST.in

This file was deleted.

Loading