Commit Graph

5728 Commits

Author SHA1 Message Date
Florian Bruhin
cbc0721906 tox: Update coverage.py to 4.0.0.
Changelog:

Backward incompatibilities:

- Python versions supported are now:
  - CPython 2.6, 2.7, 3.3, 3.4 and 3.5
  - PyPy2 2.4, 2.6
  - PyPy3 2.4
- The original command line switches (-x to run a program, etc) are no longer
  supported.
- The COVERAGE_OPTIONS environment variable is no longer supported. It was a
  hack for --timid before configuration files were available.
- The original module-level function interface to coverage.py is no longer
  supported. You must now create a coverage.Coverage object, and use methods on
  it.
- The Coverage.use_cache method is no longer supported.
- The private method Coverage._harvest_data is now called Coverage.get_data(),
  and returns the CoverageData containing the collected data.
- Coverage.py is now licensed under the Apache 2.0 license. See NOTICE.txt for
  details.
- Coverage.py kits no longer include tests and docs. If you were using them,
  get in touch and let me know how.

Major new features:

- Plugins: third parties can write plugins to add file support for non-Python
  files, such as web application templating engines, or languages that compile
  down to Python. See Plugins for how to use plugins, and Plugin classes for
  details of how to write them. A plugin for measuring Django template coverage
  is available: django_coverage_plugin
- Gevent, eventlet, and greenlet are now supported. The [run] concurrency
  setting, or the --concurrency command line switch, specifies the concurrency
  library in use. Huge thanks to Peter Portante for initial implementation, and
  to Joe Jevnik for the final insight that completed the work.
- The data storage has been re-written, using JSON instead of pickle. The
  CoverageData class is a new supported API to the contents of the data file.
  Data files from older versions of coverage.py can be converted to the new
  format with python -m coverage.pickle2json.
- Wildly experimental: support for measuring processes started by the
  multiprocessing module. To use, set --concurrency=multiprocessing, either on
  the command line or in the .coveragerc file. Thanks, Eduardo Schettino.
  Currently, this does not work on Windows.

New features:

- Options are now also read from a setup.cfg file, if any. Sections are
  prefixed with “coverage:”, so the [run] options will be read from the
  [coverage:run] section of setup.cfg.
- The HTML report now has filtering. Type text into the Filter box on the index
  page, and only modules with that text in the name will be shown. Thanks,
  Danny Allen.
- A new option: coverage report --skip-covered (or [report] skip_covered) will
  reduce the number of files reported by skipping files with 100% coverage.
  Thanks, Krystian Kichewko. This means that empty __init__.py files will be
  skipped, since they are 100% covered.
- You can now specify the --fail-under option in the .coveragerc file as the
  [report] fail_under option.
- The report -m command now shows missing branches when reporting on branch
  coverage. Thanks, Steve Leonard.
- The coverage combine command now accepts any number of directories or files
  as arguments, and will combine all the data from them. This means you don’t
  have to copy the files to one directory before combining. Thanks, Christine
  Lytwynec.
- A new configuration option for the XML report: [xml] package_depth controls
  which directories are identified as packages in the report. Directories
  deeper than this depth are not reported as packages. The default is that all
  directories are reported as packages. Thanks, Lex Berezhny.
- A new configuration option, [run] note, lets you set a note that will be
  stored in the runs section of the data file. You can use this to annotate the
  data file with any information you like.
- The COVERAGE_DEBUG environment variable can be used to set the [run] debug
  configuration option to control what internal operations are logged.
- A new version identifier is available, coverage.version_info, a plain tuple
  of values similar to sys.version_info.

Improvements:

- Coverage.py now always adds the current directory to sys.path, so that
  plugins can import files in the current directory.
- Coverage.py now accepts a directory name for coverage run and will run a
  __main__.py found there, just like Python will. Thanks, Dmitry Trofimov.
- The --debug switch can now be used on any command.
- Reports now use file names with extensions. Previously, a report would
  describe a/b/c.py as “a/b/c”. Now it is shown as “a/b/c.py”. This allows for
  better support of non-Python files.
- Missing branches in the HTML report now have a bit more information in the
  right-hand annotations. Hopefully this will make their meaning clearer.
- The XML report now contains a <source> element. Thanks Stan Hu.
- The XML report now includes a missing-branches attribute. Thanks, Steve Peak.
  This is not a part of the Cobertura DTD, so the XML report no longer
  references the DTD.
- The XML report now reports each directory as a package again. This was a bad
  regression, I apologize.
- In parallel mode, coverage erase will now delete all of the data files.
- A new warning is possible, if a desired file isn’t measured because it was
  imported before coverage.py was started.
- The coverage.process_startup() function now will start coverage measurement
  only once, no matter how many times it is called. This fixes problems due to
  unusual virtualenv configurations.
- Unrecognized configuration options will now print an error message and stop
  coverage.py. This should help prevent configuration mistakes from passing
  silently.

API changes:

- The class defined in the coverage module is now called Coverage instead of
  coverage, though the old name still works, for backward compatibility.
- You can now programmatically adjust the configuration of coverage.py by
  calling Coverage.set_option() after construction. Coverage.get_option() reads
  the configuration values.
- If the config_file argument to the Coverage constructor is specified as
  ”.coveragerc”, it is treated as if it were True. This means setup.cfg is also
  examined, and a missing file is not considered an error.

Bug fixes:

- The textual report and the HTML report used to report partial branches
  differently for no good reason. Now the text report’s “missing branches”
  column is a “partial branches” column so that both reports show the same
  numbers. This closes issue 342.
- The fail-under value is now rounded the same as reported results, preventing
  paradoxical results, fixing issue 284.
- Branch coverage couldn’t properly handle certain extremely long files. This
  is now fixed, closing issue 359.
- Branch coverage didn’t understand yield statements properly. Mickie Betz
  persisted in pursuing this despite Ned’s pessimism. Fixes issue 308 and issue
  324.
- Files with incorrect encoding declaration comments are no longer ignored by
  the reporting commands.
- Empty files are now reported as 100% covered in the XML report, not 0%
  covered.
- The XML report will now create the output directory if need be. Thanks, Chris
  Rose.
- HTML reports no longer raise UnicodeDecodeError if a Python file has
  undecodable characters.
- The annotate command will now annotate all files, not just ones relative to
  the current directory.
2015-09-21 07:16:37 +02:00
Florian Bruhin
6a8c1e62b7 tox: Update pyflakes to 1.0.0.
Changes:

- Don't mark shadowing variable as 'used'.
- Test that used variable in loop is considered used
- Don't report UnusedImport when binding global name
- Support Python 3.5 async/await statements for Pyflakes.
- Use os.linesep for Windows compatibility
- os.chmod() supports only read-only flag operations on Windows
2015-09-21 07:15:48 +02:00
Florian Bruhin
977bfb4c73 tox: Filter pytest to <2.8.0 for requires.io.
We'll have to wait for hypothesis-pytest and pytest-capturelog/catchlog to be
fixed first.
2015-09-21 07:14:37 +02:00
Florian Bruhin
5ba7b5cf0f Fix lint. 2015-09-19 22:03:56 +02:00
Florian Bruhin
64a6b518dc Regenerate docs. 2015-09-19 21:50:06 +02:00
Florian Bruhin
f96de5a598 Add config for tab colors for odd/even sel. tabs. 2015-09-19 21:45:57 +02:00
Florian Bruhin
957116658d Clean up freeze.py. 2015-09-18 22:33:50 +02:00
Florian Bruhin
7d6c39d64b Run frozen smoke test via pytest. 2015-09-18 22:23:18 +02:00
Florian Bruhin
ae07e00038 Move httpbin stuff out of integration/conftest.py. 2015-09-18 20:20:06 +02:00
Florian Bruhin
a8a2fd2e7d Rename webserver.py to webserver_sub.py. 2015-09-18 20:08:31 +02:00
Florian Bruhin
34f8e9ef18 Merge branch 't-wissmann-open_download' 2015-09-18 07:40:09 +02:00
Florian Bruhin
fd2855f800 Update authors. 2015-09-18 07:40:02 +02:00
Florian Bruhin
8dbc1cd1ed Merge branch 'open_download' of https://github.com/t-wissmann/qutebrowser into t-wissmann-open_download 2015-09-18 07:39:37 +02:00
Florian Bruhin
54ff8d2c0e Merge branch 'Carpetsmoker-issue-940' 2015-09-18 07:02:10 +02:00
Florian Bruhin
841e8fbbd1 Save search parameters in tabbed_browser. 2015-09-18 07:01:51 +02:00
Florian Bruhin
f62bf099a0 Also re-highlight text when restarting search. 2015-09-18 06:58:05 +02:00
Florian Bruhin
72cddb290b Cleanups 2015-09-18 06:55:17 +02:00
Martin Tournoij
a80c61e78a Use a single search term per-window
Previously, every tab had its own search term. This sets single search term per
window. using `/hello`, `gt`, and `n` will search for `hello` in the 2nd tab.

This fixes issue #940
2015-09-18 02:18:54 +02:00
Florian Bruhin
a4569b11ad tests: Skip test_stale_legacy_server when frozen. 2015-09-17 22:02:12 +02:00
Florian Bruhin
2cb1f9226a Make httpbin tests run when frozen. 2015-09-17 21:51:09 +02:00
Florian Bruhin
fbf9c74752 tests: Increase some timeouts for OS X. 2015-09-17 21:22:35 +02:00
Florian Bruhin
20e5c4cbe9 Update changelog. 2015-09-17 21:01:30 +02:00
Florian Bruhin
d9bad853e7 Merge branch 'wayland-deco' of ssh://tonks/qutebrowser 2015-09-17 21:00:17 +02:00
Florian Bruhin
4adce826b0 tox: Fix substitution. 2015-09-17 20:03:47 +02:00
Florian Bruhin
7e84a1a5b8 Fix lint. 2015-09-17 20:02:39 +02:00
Florian Bruhin
7eeabb2467 Fix integration tests with CRLF. 2015-09-17 19:52:56 +02:00
Florian Bruhin
0f69487f22 Adjust pylint ignores for py.path.
Since db513aa pylint can now import py, but fails because it can't infer that
there's a py.path.
2015-09-17 19:12:28 +02:00
Florian Bruhin
a6f113375c Add missing integration test data dir. 2015-09-17 19:10:16 +02:00
Florian Bruhin
01f424fdb0 tox: Update pytest-flakes to 1.0.1.
Changelog:

- make the data json clean so we can support modern pytest
2015-09-17 19:03:43 +02:00
Florian Bruhin
c195ee225d Add missing docs and fix lint. 2015-09-17 19:02:03 +02:00
Florian Bruhin
929957c4fb tox: Update dependencies for httpbin tests. 2015-09-17 19:02:03 +02:00
Florian Bruhin
c530312aca httpbin: Improve request parsing/logging. 2015-09-17 19:02:03 +02:00
Florian Bruhin
fd264631c4 Move httpbin data to data/ instead of html/. 2015-09-17 19:02:03 +02:00
Florian Bruhin
2bfb7609ac Show data in test_httpbin. 2015-09-17 19:02:03 +02:00
Florian Bruhin
48b599a774 Start work on httpbin integration tests. 2015-09-17 19:02:03 +02:00
Florian Bruhin
db513aa956 tox: Require all testenv deps for pylint. 2015-09-17 19:00:49 +02:00
Thorsten Wißmann
855f8402c6 open_download: Warn if download dir is empty 2015-09-17 10:32:26 +02:00
Thorsten Wißmann
9e25e3b96b open_download: Allow download dir to be a symlink 2015-09-17 10:32:26 +02:00
Thorsten Wißmann
b8f200b370 Add open_download userscript 2015-09-17 10:32:17 +02:00
Florian Bruhin
bb224a9d39 Regenerate docs. 2015-09-17 06:53:28 +02:00
Florian Bruhin
ee2b9adce4 Move checking if an URL is blocked to adblock.py. 2015-09-17 06:46:27 +02:00
Florian Bruhin
accbf157e0 Merge branch 'Kingdread-whitelist-hosts' 2015-09-17 06:39:17 +02:00
Florian Bruhin
ac27f46170 Add piwik.org to default whitelist. 2015-09-17 06:38:24 +02:00
Florian Bruhin
f9645d608b Update authors. 2015-09-17 06:37:53 +02:00
Florian Bruhin
a589ddab4a Merge branch 'whitelist-hosts' of https://github.com/Kingdread/qutebrowser into Kingdread-whitelist-hosts 2015-09-17 06:37:44 +02:00
Florian Bruhin
731a86ce33 Merge branch 'acogneau-cookies_tests' 2015-09-16 23:01:26 +02:00
Florian Bruhin
7f573616c8 Remove unused import. 2015-09-16 23:01:14 +02:00
Florian Bruhin
57242e925c Fix names of constants. 2015-09-16 23:00:02 +02:00
Florian Bruhin
375b7c8ab2 Update authors. 2015-09-16 22:58:46 +02:00
Florian Bruhin
d5baed5e83 Merge branch 'cookies_tests' of https://github.com/acogneau/qutebrowser into acogneau-cookies_tests 2015-09-16 22:58:28 +02:00