Skip to content
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

check-python-versions --add 3.8 --drop 3.4 to update packages automatically. #3

Merged
merged 76 commits into from
Apr 18, 2019
Merged
Changes from 1 commit
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
6d74d92
Re-do version range parsing for --expect
mgedmin Apr 12, 2019
825c939
Refactoring: split check() into two functions
mgedmin Apr 12, 2019
2321747
Experimental update support
mgedmin Apr 12, 2019
fe708f5
Preserve file mode please
mgedmin Apr 12, 2019
3eae4b1
Testing on ~/projects/* and fixes
mgedmin Apr 12, 2019
5200c40
Make sure update_call_arg_in_source() can handle all classifiers
mgedmin Apr 12, 2019
8cb7983
Allow half-open ranges like --expect 3.5-
mgedmin Apr 12, 2019
ec3228f
Preserve major Python version classifiers
mgedmin Apr 12, 2019
ffc8e51
Fix update when classifiers cannot be parsed
mgedmin Apr 12, 2019
85392f3
Treat EOF as a blank answer in confirm()
mgedmin Apr 12, 2019
004d02a
Suppress the traceback on ^C
mgedmin Apr 12, 2019
8146097
Allow half-open ranges like --drop -3.4
mgedmin Apr 12, 2019
4a2593f
Fix updating classifiers when ] is on the same line
mgedmin Apr 12, 2019
71f1f9c
Disable coverage enforcement for now
mgedmin Apr 12, 2019
fa3981a
Handle another list literal style
mgedmin Apr 12, 2019
c39b71f
Refactoring: move the code into a package
mgedmin Apr 13, 2019
18022c7
Move the code to cli.py
mgedmin Apr 13, 2019
a97a6ee
Allow python -m check_python_versions
mgedmin Apr 13, 2019
0150cd5
Add 'make flake8'
mgedmin Apr 13, 2019
1f9610a
Split cli.py and tests.py into several modules
mgedmin Apr 13, 2019
2912c94
Back to 100% test coverage
mgedmin Apr 13, 2019
8e775da
Fix wrapper script
mgedmin Apr 13, 2019
aa332b8
Add rudimentary support for updating .travis.yml
mgedmin Apr 13, 2019
32fd42b
distutils does NOT like trailing slashes
mgedmin Apr 14, 2019
1282460
Update MANIFEST.in
mgedmin Apr 14, 2019
098f610
Add some tests for the YAML update logic
mgedmin Apr 16, 2019
5998e5d
Deal with old matrix.include way of enabling 3.7
mgedmin Apr 16, 2019
09f0a4b
Refactoring: pass filename to all extractors & updaters
mgedmin Apr 16, 2019
f1cd242
Refactoring: call confirm_and_update_file() externally
mgedmin Apr 16, 2019
9baab7c
Implement --diff
mgedmin Apr 16, 2019
4ce7bfb
Experiment with dynamic classifiers
mgedmin Apr 16, 2019
5c08906
Revert "Experiment with dynamic classifiers"
mgedmin Apr 16, 2019
bf0c58c
Hack for fetchimports
mgedmin Apr 16, 2019
c4771ac
Update Python versions in appveyor.yml
mgedmin Apr 16, 2019
83d94bd
Drop sudo: false in .travis.yml files
mgedmin Apr 16, 2019
3c66966
Drop coverage failures on Travis
mgedmin Apr 17, 2019
fa39537
Fix flake8 on Travis
mgedmin Apr 17, 2019
9763140
Windows does not have fchmod???
mgedmin Apr 17, 2019
4713b42
More Windows pain
mgedmin Apr 17, 2019
75fd112
Implement --dry-run
mgedmin Apr 17, 2019
a10b2dd
Fix tests
mgedmin Apr 17, 2019
d327ffd
Rudimentary tox.ini updater
mgedmin Apr 17, 2019
7120ceb
Preserve other tox environments
mgedmin Apr 17, 2019
cf763d8
Preserve tox environments with dashes
mgedmin Apr 17, 2019
08588bd
Code to update python_requires in setup.py
mgedmin Apr 17, 2019
32e1429
Show directory names when using --dry-run --diff
mgedmin Apr 17, 2019
cb3a7db
Fix crash in get_travis_yml_python_versions
mgedmin Apr 17, 2019
74fafa7
Implement --only
mgedmin Apr 17, 2019
d54bf5c
Allow spaces around = in setup.py
mgedmin Apr 17, 2019
eb8049f
Clean up Python source update logic a bit
mgedmin Apr 17, 2019
3d54845
Handle classifiers=[] (an empty list on one line)
mgedmin Apr 17, 2019
de190c2
Handle space before opening parenthesis
mgedmin Apr 17, 2019
8acef05
Add a manylinux-install.sh updater
mgedmin Apr 17, 2019
b3b7834
Handle comments in tox.ini
mgedmin Apr 17, 2019
2b799ae
More robust appveyor.yml updates
mgedmin Apr 17, 2019
9dabc60
Upgrade pypy versions in .travis.yml
mgedmin Apr 17, 2019
304e527
Handle duplicate keys in YAML files
mgedmin Apr 17, 2019
18e78e0
Handle more complicated appveyor environments
mgedmin Apr 17, 2019
e17525f
Test coverage and a bugfix for the Travis parser
mgedmin Apr 17, 2019
7d034a1
Handle non-list python: when updating .travis.yml
mgedmin Apr 17, 2019
28d92b0
Fix manylinux updater error handling
mgedmin Apr 17, 2019
cd59ec7
Better appveyor error handling
mgedmin Apr 17, 2019
02f7c13
Better tox error handling and tests
mgedmin Apr 17, 2019
c2b1f5b
Exclude Windows-only code paths from coverage
mgedmin Apr 17, 2019
ee3a334
Tests and smarter python_requires for only one version
mgedmin Apr 17, 2019
303da0b
Tests for the python_requires updater
mgedmin Apr 17, 2019
8942dde
Back to 100% test coverage
mgedmin Apr 17, 2019
b2dc0f7
Update documentation
mgedmin Apr 17, 2019
31d79fa
--expect with --diff makes no sense without --dry-run
mgedmin Apr 17, 2019
ba723bf
Handle matrix.include better in .travis.yml
mgedmin Apr 17, 2019
e7c1783
Better dist: xenial positioning in .travis.yml
mgedmin Apr 17, 2019
50391bc
Keep pypy jobs in matrix.include in .travis.yml
mgedmin Apr 17, 2019
e50f9e2
Keep non-Python jobs
mgedmin Apr 17, 2019
8b679aa
Keep Travis jobs entire, not just the 1st line
mgedmin Apr 17, 2019
16ba194
More travis.yml correctness fixes
mgedmin Apr 17, 2019
6d4fd3d
Windows is special, as usual
mgedmin Apr 17, 2019
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
Prev Previous commit
Next Next commit
Exclude Windows-only code paths from coverage
  • Loading branch information
mgedmin committed Apr 17, 2019
commit c2b1f5b1ad5f3ff1015f98c69b8b6f2658002eea
1 change: 1 addition & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -6,4 +6,5 @@ branch = True
[report]
exclude_lines =
pragma: nocover
pragma: windows
if __name__ == .__main__.:
4 changes: 2 additions & 2 deletions src/check_python_versions/utils.py
Original file line number Diff line number Diff line change
@@ -48,13 +48,13 @@ def confirm_and_update_file(filename, new_lines):
with open(tempfile, 'w') as f:
if hasattr(os, 'fchmod'):
os.fchmod(f.fileno(), mode)
else:
else: # pragma: windows
# Windows, what else?
os.chmod(tempfile, mode)
f.writelines(new_lines)
try:
os.rename(tempfile, filename)
except FileExistsError:
except FileExistsError: # pragma: windows
# No atomic replace on Windows
os.unlink(filename)
os.rename(tempfile, filename)