Commit Graph

111 Commits

Author SHA1 Message Date
Florian Bruhin
f8301b185e flake8 requirements: Update flake8 to 2.5.5
- Fix setuptools integration when parsing config files
- Don't pass the user's config path as the config_file when creating a
  StyleGuide
2016-06-15 09:02:15 +02:00
Florian Bruhin
b099f64efa flake8 requirements: Update pyparsing to 2.1.5
- Added ParserElement.split() generator method, similar to re.split().
  Includes optional arguments maxsplit (to limit the number of splits),
  and includeSeparators (to include the separating matched text in the
  returned output, default=False).

- Added a new parse action construction helper tokenMap, which will
  apply a function and optional arguments to each element in a
  ParseResults. So this parse action:

      def lowercase_all(tokens):
          return [str(t).lower() for t in tokens]
      OneOrMore(Word(alphas)).setParseAction(lowercase_all)

  can now be written:

      OneOrMore(Word(alphas)).setParseAction(tokenMap(str.lower))

  Also simplifies writing conversion parse actions like:

      integer = Word(nums).setParseAction(lambda t: int(t[0]))

  to just:

      integer = Word(nums).setParseAction(tokenMap(int))

  If additional arguments are necessary, they can be included in the
  call to tokenMap, as in:

      hex_integer = Word(hexnums).setParseAction(tokenMap(int, 16))

- Added more expressions to pyparsing_common:
  . IPv4 and IPv6 addresses (including long, short, and mixed forms
    of IPv6)
  . MAC address
  . ISO8601 date and date time strings (with named fields for year, month, etc.)
  . UUID (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)
  . hex integer (returned as int)
  . fraction (integer '/' integer, returned as float)
  . mixed integer (integer '-' fraction, or just fraction, returned as float)
  . stripHTMLTags (parse action to remove tags from HTML source)
  . parse action helpers convertToDate and convertToDatetime to do custom parse
    time conversions of parsed ISO8601 strings

- runTests now returns a two-tuple: success if all tests succeed,
  and an output list of each test and its output lines.

- Added failureTests argument (default=False) to runTests, so that
  tests can be run that are expected failures, and runTests' success
  value will return True only if all tests *fail* as expected. Also,
  parseAll now defaults to True.

- New example numerics.py, shows samples of parsing integer and real
  numbers using locale-dependent formats:

    4.294.967.295,000
    4 294 967 295,000
    4,294,967,295.000
2016-06-14 09:48:14 +02:00
Florian Bruhin
278093afae Add requirements-qutebrowser.txt-raw 2016-06-08 00:03:07 +02:00
Florian Bruhin
4bae659fbe Re-add requests to pylint envs
This is needed because there's a script using requests
2016-06-08 00:02:43 +02:00
Florian Bruhin
cfb4ebb312 Add missing replace to requirements-pylint.txt-raw 2016-06-07 23:47:10 +02:00
Florian Bruhin
164d7bea4b recompile_requirements: Add replace command 2016-06-07 23:40:00 +02:00
Florian Bruhin
19037e8b75 Remove old .in requirements file 2016-06-07 23:32:35 +02:00
Florian Bruhin
81ccaff9c6 requirements: Update filter for Flask 2016-06-07 23:26:04 +02:00
Florian Bruhin
0819ed36f0 Update requirements README.md 2016-06-07 23:21:50 +02:00
Florian Bruhin
1c6b4da706 Use #@ as chars 2016-06-07 23:21:50 +02:00
Florian Bruhin
6249436bde Rename raw-requirements files
This hopefully means they're not picked up on requires.io.
2016-06-07 23:21:50 +02:00
Florian Bruhin
7571040316 Also ignore MarkupSafe dependency 2016-06-07 23:10:33 +02:00
Florian Bruhin
34a6451806 Add special #! commands to recompile_requirements 2016-06-07 23:08:14 +02:00
Florian Bruhin
136cb19814 reqs: Comment out ignored dependencies 2016-06-07 22:53:17 +02:00
Florian Bruhin
1a26c8c61f Add a script to compile requirement files 2016-06-07 22:45:59 +02:00
Florian Bruhin
b759f481c4 test requirements: Update decorator to 4.0.10
- Improved the documentation thanks to Tony Goodchild (zearin) who also
  provided a much better CSS than the one I was using.
2016-06-07 08:24:53 +02:00
Florian Bruhin
5004a571c4 test requirements: Update CherryPy to 6.0.1
* Correct typos in ``@cherrypy.expose`` decorators.
2016-06-07 08:24:12 +02:00
Florian Bruhin
64fc1a3277 Revert "test requirements: Add pdbpp"
This reverts commit c43bfffd5c.
It uses setuptools_scm which causes... problems.
2016-06-07 06:21:54 +02:00
Florian Bruhin
9787e54238 Revert "test requirements: Also add pdbpp dependencies"
This reverts commit d77b9bff49.
2016-06-07 06:21:50 +02:00
Florian Bruhin
d77b9bff49 test requirements: Also add pdbpp dependencies 2016-06-06 23:22:28 +02:00
Florian Bruhin
c43bfffd5c test requirements: Add pdbpp
pdb sometimes segfaults for some reason - pdbpp works fine and gives us
nicer debugging.
2016-06-06 23:20:44 +02:00
Florian Bruhin
a5f12430ad pylint reqs: Update pylint/astroid to 1.4.6/1.5.6
pylint:

* config files with BOM markers can now be read.
* epylint.py_run does not crash on big files, using .communicate()
  instead of .wait()

astroid:

* Fix a crash which occurred when the class of a namedtuple could not be
  inferred.
* Functional form of enums support accessing values through __call__.
* Brain tips for the ssl library.
2016-06-06 17:14:59 +02:00
Florian Bruhin
753036067d test requirements: Update CherryPy to 6.0.0
* Setuptools is now required to build CherryPy. Pure distutils installs
  are no longer supported. This change allows CherryPy to depend on
  other packages and re-use code from them. It's still possible to
  install pre-built CherryPy packages (wheels) using pip without
  Setuptools.
* Back out changes attempting to fix redirects with Unicode URLs, as it
  also had the unintended consequence of causing the 'Location' to be
  ``bytes`` on Python 3.
* ``cherrypy.expose`` now works on classes.
* ``cherrypy.config`` decorator is now used throughout the code
  internally.
2016-06-06 08:25:41 +02:00
Florian Bruhin
2df85e75cb test requirements: Update CherryPy to 5.6.0
* ``@cherrypy.expose`` now will also set the exposed
  attribute on a class.
* Rewrote all tutorials and internal usage to prefer
  the decorator usage of ``expose`` rather than setting
  the attribute explicitly.
* Removed test-specific code from tutorials.
2016-06-05 23:15:29 +02:00
Florian Bruhin
546c172e5e test requirements: Update CherryPy to 5.5.0
* Fix for filenames with semicolons and quote characters in filenames
  found in headers.
* Added decorator for registering tools.
* Use simpler encoding rules for SCRIPT_NAME and PATH_INFO environment
  variables in CherryPy Tree allowing non-latin characters to pass even
  when ``wsgi.version`` is not ``u.0``.
* Ensure that multipart fields are decoded even when cached in a file.
2016-06-05 20:44:04 +02:00
Florian Bruhin
24db93f3eb test req: Update pytest-mock to 1.1
- From this version onward, pytest-mock is licensed under the MIT
  license.
- Now the plugin also adds introspection information on differing call
  arguments when calling helper methods such as assert_called_once_with.
  The extra introspection information is similar to pytest's and can be
  disabled with the mock_traceback_monkeypatch option.
- mocker.stub() now allows passing in the name for the constructed Mock
  object instead of having to set it using the internal _mock_name
  attribute directly. This is useful for debugging as the name is used
  in the mock's repr string as well as related assertion failure
  messages.
- Monkey patching mock module for friendlier tracebacks is automatically
  disabled with the --tb=native option. The underlying mechanism used to
  suppress traceback entries from mock module does not work with that
  option anyway plus it generates confusing messages on Python 3.5 due
  to exception chaining.
- mock.call is now aliased as mocker.call for convenience.
2016-06-02 11:19:22 +02:00
Florian Bruhin
1b9a0367e7 flake8 req: Update sortedcontainers to 1.5.3 2016-06-02 11:18:49 +02:00
Florian Bruhin
a19bb40b50 requirements: Update codecov to 2.0.5
- fix detecting merge commits on all CI, not just Travis
- Use %20 for encoding spaces [appveyor]
2016-06-02 11:16:52 +02:00
Florian Bruhin
b3c91d4b81 tox: Update pytest to 2.9.2
* skip tests where one parameterize dimension was empty
* Fix Xfail does not work with condition keyword argument.
* Fix win32 path issue when puttinging custom config file with absolute
  path in ``pytest.main("-c your_absolute_path")``.
* Fix maximum recursion depth detection when raised error class is not
  aware of unicode/encoded bytes.
* Fix ``pytest.mark.skip`` mark when used in strict mode.
* Minor improvements and fixes to the documentation.
* Fix ``--fixtures`` to show all fixture definitions as opposed to just
  one per fixture name.
2016-05-31 23:41:24 +02:00
Florian Bruhin
5c02f3655a requirements: Also update mccabe for pylint-master 2016-05-31 07:57:53 +02:00
Florian Bruhin
100d284cdd requirements: Update mccabe to 0.5.0
- PyCon 2016 PDX release
- Add support for Flake8 3.0
2016-05-30 23:50:11 +02:00
Florian Bruhin
0c611d4d85 requirements: Update flake8-future-import to 0.4.1
- Do not ignore imports which are present and have been added after the
  minimum version
- Ignore imports which became mandatory with the minimum version
2016-05-30 23:47:35 +02:00
Florian Bruhin
afb88a9560 requirements: Update flake8-future-import to 0.4.0
- Add two older future imports
- Issue an error when a future import does not exist
- Define which is the oldest Python version to be supported so that
  already mandatory features can be ignored and not yet supported
  features default to forbidden (ignoring the lower error code).
- Use return code of 1 if errors occurred
2016-05-30 12:57:57 +02:00
Florian Bruhin
424efec8a9 travis: Use Python 3.5 on Ubuntu Xenial 2016-05-30 00:03:40 +02:00
Florian Bruhin
3a0a30597e Dockerfile: Install dbus 2016-05-29 23:25:46 +02:00
Florian Bruhin
e3556f8fe0 Add a Ubuntu Xenial Dockerfile 2016-05-29 23:14:54 +02:00
Florian Bruhin
2e4c0c6599 Run dbus-uuidgen in Ubuntu Wily Dockerfile
Otherwise the tests will fail with:

  INVALID: process 975: D-Bus library appears to be incorrectly set up; failed to read machine uuid: UUID file '/etc/machine-id' should contain a hex string of length 32, not length 0, with no other text
  INVALID: See the manual page for dbus-uuidgen to correct this issue.
2016-05-29 23:14:10 +02:00
Florian Bruhin
800d069764 requirements: Blacklist Flask 0.11.0
See https://github.com/pallets/flask/issues/1825
2016-05-29 18:20:48 +02:00
Florian Bruhin
f10754fa77 Remove MarkupSafe pin in requirements-tests.txt
We already have that pinned in requirements.txt
2016-05-29 17:50:13 +02:00
Florian Bruhin
7180a6df0b requirements: Update pytest dependency pins
This adds MarkupSafe and removes termcolor and wheel.
2016-05-29 17:34:19 +02:00
Florian Bruhin
d008b2a86c requirements: Pin all pylint dependencies 2016-05-29 17:34:16 +02:00
Florian Bruhin
6f6303e0a6 Use requirements files for tox dependencies
While this makes things a little more complicated and means we'll need to use
`-r` to recreate tox environments, it has several advantages:

- Full support from requires.io (including PRs)
- Workaround for https://bitbucket.org/hpk42/tox/issues/332/ so we can update
  virtualenv/pip
2016-05-29 16:53:54 +02:00
Florian Bruhin
9529d55649 Remove misc/qt_menu.nib
This was needed for cx_Freeze on OS X which we don't use anymore.
2016-05-29 16:24:16 +02:00
Florian Bruhin
1e55db0630 Follow the American way(tm) of spelling things 2016-05-29 10:57:41 +02:00
Florian Bruhin
b065d8efcd pyinstaller: Set NSHighResolutionCapable = True
This means qutebrowser will show up correctly on HiDPI/Retina screens
without being pixelated.
2016-05-28 23:20:00 +02:00
Florian Bruhin
90fa2a50ce pyinstaller: Use qutebrowser/__main__.py
When we use qutebrowser.py, PyInstaller 3.2 gets confused
somehow (because of the name conflict with qutebrowser/ maybe?) and
doesn't do anything when running the bundled app.

With qutebrowser/__main__.py the generated filename is still correct and
it actually works.
2016-05-28 23:18:29 +02:00
Florian Bruhin
afcb018ee2 Fix some spelling mistakes
Found via http://jwilk.net/software/mwic
2016-05-27 12:07:00 +02:00
Florian Bruhin
a7ece80d34 Merge branch 'pyinstaller' 2016-05-13 06:21:28 +02:00
Florian Bruhin
cd5591040e Move qutebrowser.rcc to misc/ 2016-04-14 17:59:45 +02:00
Florian Bruhin
b3dfa5757e Docker: Install libjs-pdf on Debian/Ubuntu 2016-04-10 18:09:17 +02:00