Commit Graph

138 Commits

Author SHA1 Message Date
Robert Stanca
3fe2accfd7 py3: use print_function in hypothesishelpers.py 2016-04-02 18:15:04 +03:00
Robert Stanca
929a6451ae tests: use absolute_import in hypothesishelpers.py 2016-04-02 18:14:10 +03:00
Robert Stanca
f151e77de8 py3: use print_function in get-with-headers.py 2016-04-02 18:12:33 +03:00
Robert Stanca
26872f1dfd py3: use print_function in generate-working-copy-states.py 2016-04-02 17:36:59 +03:00
Robert Stanca
a51cbf4e77 py3: use print_function in filterpyflakes.py 2016-04-02 17:35:02 +03:00
Robert Stanca
3ab964e343 py3: use print_function in test-ancestor.py 2016-04-02 17:33:11 +03:00
Robert Stanca
118adb331f py3: use print_function in seq.py 2016-04-02 17:29:38 +03:00
Robert Stanca
e8ea25819f py3: use absolute_import in seq.py 2016-04-02 17:28:35 +03:00
timeless
14b03acded py3: use print_function in import-checker 2016-03-30 04:55:16 +00:00
timeless
9580d303e6 py3: use absolute_import in import-checker 2016-03-30 04:50:19 +00:00
FUJIWARA Katsunori
15ff9ca52f templatefilters: use templatefilter to mark a function as template filter
Using decorator can localize changes for adding (or removing) a
template filter function in source code.

This patch also removes leading ":FILTER:" part in help document of
each filters, because using templatefilter makes it useless.

This patch uses not 'filter' but 'templatefilter' as a decorator name,
because the former name hides Python built-in one, even though the
latter is a little redundant in 'templatefilters.py'.
2016-03-30 02:10:44 +09:00
Pulkit Goyal
b34b7bcc64 py3: make test-ui-color use print_function 2016-03-29 16:41:32 +05:30
Pulkit Goyal
45549ce716 py3: make test-ui-config use print_function 2016-03-29 16:38:27 +05:30
Pulkit Goyal
71fccc06f3 py3: make test-ui-config use absolute_import 2016-03-29 16:33:09 +05:30
Pulkit Goyal
de0aaa7281 py3: make test-ui-verbosity use absolute_import 2016-03-29 16:29:21 +05:30
Pulkit Goyal
c93c7768eb py3: make test-ui-verbosity use print_function 2016-03-29 16:27:01 +05:30
Pulkit Goyal
3bf3d96968 py3: make test-url use print_function 2016-03-29 16:23:40 +05:30
Pulkit Goyal
cc4d4c5afe py3: make test-walkrepo use print_function 2016-03-29 16:21:31 +05:30
Pulkit Goyal
74462a15a9 py3: make test-wireproto use print_function 2016-03-29 16:14:58 +05:30
timeless
00f06c8c06 py3: glob line numbers in test-check-py3-compat 2016-03-28 22:30:23 +00:00
Pulkit Goyal
9473cc11a7 tests: make tinyproxy.py use print_function 2016-03-28 01:57:44 +05:30
timeless
54523ab07e tests: glob py3 line numbers
Since not everyone is running py3.5 and code changes periodically,
avoid pinning line numbers for invalid syntax errors.
2016-03-28 03:40:30 +00:00
timeless
97d7b5a27f tests: update py3.5 output
745eb6bf6abd removed one item...
2016-03-28 03:35:08 +00:00
Gregory Szorc
ec4984dfe0 node: use byte literals to construct nullid and wdirid
Python 3's hex() insists on operating on bytes. This patch gives
it what it wants.

'' and b'' in Python 2 are equivalent, so this has no impact on
Python 2.
2016-03-12 14:04:57 -08:00
Gregory Szorc
671d581fbd tests: try to import modules with Python 3
All of mercurial.* is now using absolute_import. Most of
mercurial.* is able to ast parse with Python 3. The next big
hurdle is being able to import modules using Python 3.

This patch adds testing of hgext.* and mercurial.* module imports
in Python 3. As the new test output shows, most modules can't
import under Python 3. However, many of the failures are due
to a common problem in a highly imported module (e.g. the bytes vs
str issue in node.py).
2016-03-12 14:05:23 -08:00
Gregory Szorc
06a84c707a tests: perform an ast parse with Python 3
Previously, test-check-py3-compat.t parsed Python files with Python 2
and looked for known patterns that are incompatible with Python 3.

Now that we have a mechanism for invoking Python 3 interpreters from
tests, we can expand check-py3-compat.py and its corresponding .t
test to perform an additional AST parse using Python 3.

As the test output shows, we identify a number of new parse failures
on Python 3. There are some redundant warnings for missing parentheses
for the print function. Given the recent influx of patches around
fixing these, the redundancy shouldn't last for too long.
2016-03-18 16:15:12 -07:00
Pulkit Goyal
4650b402b2 contrib: revsetbenchmarks use absolute_import and print_function 2016-03-16 04:35:03 +05:30
Pulkit Goyal
ec9a9da094 contrib: synthrepo use absolute_import 2016-03-16 04:23:58 +05:30
Pulkit Goyal
5cf3296f5c contrib: python-hook-examples use absolute_import 2016-03-16 04:13:28 +05:30
Pulkit Goyal
17d5faaa79 contrib: make perf.py use absolute_import 2016-03-16 04:12:16 +05:30
Pulkit Goyal
37b8e88ad9 showstack: use absolute_import 2016-03-13 01:59:18 +05:30
Pulkit Goyal
edde19dc54 contrib: use absolute_import in win32/hgwebdir_wsgi.py 2016-03-14 14:12:13 +05:30
Pulkit Goyal
dd1cc9fd24 contrib: make memory.py use absolute_import 2016-03-13 01:32:42 +05:30
Pulkit Goyal
590ab61e6f check-code: use absolute_import and print_function 2016-03-13 01:08:39 +05:30
timeless
c63b17c586 transplant: use absolute_import 2016-03-01 04:53:43 +00:00
Pulkit Goyal
6eac74ace4 debugshell: use absolute_import 2016-03-06 03:19:08 +05:30
Pierre-Yves David
cc59112ca7 hgext: officially turn 'hgext' into a namespace package
Actually since Python 2.3, there is some way to turn top level package into
"namespace package" so that multiple subpackage installed in different part of
the path can still be imported transparently. This feature was previously
thought (at least by myself) to be only provided by some setuptool black magic.

Turning hgext into such namespace package allows third extensions to install
themselves inside the "hgext" namespace package to avoid polluting the global
python module namespace. They will now be able to do so without making it a pain
to use a Mercurial "installed" in a different way/location than these
extensions.

The only constrains is that the extension ship a 'hgext/__init__.py' containing
the same call to 'pkgutil.extend_path' and nothing else. This seems realistic.

The main question that remains is: should we introduce a dedicated namespace for
third party extension (hgext3rd?) to make a clearer distinction between what is
officially supported and what is not? If so, this will be introduced in a follow
up patch.
2016-02-27 12:56:26 +01:00
Martijn Pieters
64a4b2e8cf fsmonitor: dependencies for new experimental extension
In preparation for the filesystem monitor extension, include the pywatchman
library. The fbmonitor extension relies on this library to communicate with
the Watchman service. The library is BSD licensed and is taken from
https://github.com/facebook/watchman/tree/master/python.

This package has not been updated to mercurial code standards.
2016-03-02 16:25:12 +00:00
timeless
2194aed867 win32mbcs: use absolute_import 2016-03-02 21:50:35 +00:00
timeless
78f32a823b notify: use absolute_import 2016-03-02 21:48:08 +00:00
timeless
3d3cc1c01c patchbomb: use absolute_import 2016-03-02 21:42:42 +00:00
timeless
0d9e787fe4 convert: __init__ use absolute_import 2016-03-02 16:34:43 +00:00
timeless
798be7b824 convert: cvs use absolute_import 2016-03-02 16:41:35 +00:00
timeless
2ac9193926 convert: transport use absolute_import 2016-03-02 16:37:50 +00:00
timeless
4bcfa639ac convert: bzr use absolute_import 2016-03-02 16:32:52 +00:00
timeless
d982b75f31 convert: common use absolute_import 2016-03-02 16:26:35 +00:00
timeless
d9aed31d36 convert: convcmd use absolute_import 2016-03-02 16:23:28 +00:00
timeless
d35bed319b convert: subversion use absolute_import 2016-03-02 16:13:05 +00:00
timeless
8a88474c92 tests: test-dispatch use print_function 2016-03-08 20:57:40 +00:00
timeless
e113808b95 tests: test-dispatch use absolute_import 2016-03-08 20:57:15 +00:00