diff --git a/MANIFEST.in b/MANIFEST.in index c421a7bd4..79f4e2adb 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -14,7 +14,6 @@ graft src graft depends graft winbuild graft docs -prune docs/_static # build/src control detritus exclude .appveyor.yml diff --git a/Tests/test_imagefont.py b/Tests/test_imagefont.py index ace3b7d33..eb0be4a04 100644 --- a/Tests/test_imagefont.py +++ b/Tests/test_imagefont.py @@ -53,8 +53,7 @@ class TestImageFont(PillowTestCase): # (and, other things, but first things first) METRICS = { (">=2.3", "<2.4"): {"multiline": 30, "textsize": 12, "getters": (13, 16)}, - (">=2.7", "<2.10"): {"multiline": 6.2, "textsize": 2.5, "getters": (12, 16)}, - (">=2.10",): {"multiline": 14.8, "textsize": 2.5, "getters": (12, 16)}, + (">=2.7",): {"multiline": 6.2, "textsize": 2.5, "getters": (12, 16)}, "Default": {"multiline": 0.5, "textsize": 0.5, "getters": (12, 16)}, } @@ -465,9 +464,8 @@ class TestImageFont(PillowTestCase): font.getsize(u"’") @unittest.skipIf( - sys.platform.startswith("win32") - and (sys.version.startswith("2") or hasattr(sys, "pypy_translation_info")), - "requires CPython 3.x on Windows", + sys.version.startswith("2") or hasattr(sys, "pypy_translation_info"), + "requires CPython 3.3+", ) def test_unicode_extended(self): # issue #3777 diff --git a/docs/Guardfile b/docs/Guardfile index 2bbb2ef91..9493f6453 100755 --- a/docs/Guardfile +++ b/docs/Guardfile @@ -4,6 +4,5 @@ from livereload.compiler import shell Task.add('*.rst', shell('make html')) Task.add('*/*.rst', shell('make html')) -Task.add('_static/*.css', shell('make clean html')) Task.add('Makefile', shell('make html')) Task.add('conf.py', shell('make html')) diff --git a/docs/_static/.gitignore b/docs/_static/.gitignore deleted file mode 100644 index b1f9a2ade..000000000 --- a/docs/_static/.gitignore +++ /dev/null @@ -1 +0,0 @@ -# Empty file, to make the directory available in the repository diff --git a/docs/conf.py b/docs/conf.py index 2c0431e0f..f91b3746e 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -136,7 +136,7 @@ html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ["_static", "resources"] +html_static_path = ["resources"] # Add any extra paths that contain custom files (such as robots.txt or # .htaccess) here, relative to this directory. These files are copied diff --git a/docs/reference/ImageDraw.rst b/docs/reference/ImageDraw.rst index cd44cd6e9..5fac7914b 100644 --- a/docs/reference/ImageDraw.rst +++ b/docs/reference/ImageDraw.rst @@ -132,11 +132,11 @@ Methods Draws an arc (a portion of a circle outline) between the start and end angles, inside the given bounding box. - :param xy: Two points to define the bounding box. Sequence of - ``[(x0, y0), (x1, y1)]`` or ``[x0, y0, x1, y1]``, - where ``x1 >= x0`` and ``y1 >= y0``. - :param start: Starting angle, in degrees. Angles are measured from - 3 o'clock, increasing clockwise. + :param xy: Two points to define the bounding box. Sequence of ``[(x0, y0), + (x1, y1)]`` or ``[x0, y0, x1, y1]``, where ``x1 >= x0`` and ``y1 >= + y0``. + :param start: Starting angle, in degrees. Angles are measured from 3 + o'clock, increasing clockwise. :param end: Ending angle, in degrees. :param fill: Color to use for the arc. :param width: The line width, in pixels. @@ -159,9 +159,9 @@ Methods Same as :py:meth:`~PIL.ImageDraw.ImageDraw.arc`, but connects the end points with a straight line. - :param xy: Two points to define the bounding box. Sequence of - ``[(x0, y0), (x1, y1)]`` or ``[x0, y0, x1, y1]``, - where ``x1 >= x0`` and ``y1 >= y0``. + :param xy: Two points to define the bounding box. Sequence of ``[(x0, y0), + (x1, y1)]`` or ``[x0, y0, x1, y1]``, where ``x1 >= x0`` and ``y1 >= + y0``. :param outline: Color to use for the outline. :param fill: Color to use for the fill. :param width: The line width, in pixels. @@ -173,8 +173,8 @@ Methods Draws an ellipse inside the given bounding box. :param xy: Two points to define the bounding box. Sequence of either - ``[(x0, y0), (x1, y1)]`` or ``[x0, y0, x1, y1]``, - where ``x1 >= x0`` and ``y1 >= y0``. + ``[(x0, y0), (x1, y1)]`` or ``[x0, y0, x1, y1]``, where ``x1 >= x0`` + and ``y1 >= y0``. :param outline: Color to use for the outline. :param fill: Color to use for the fill. :param width: The line width, in pixels. @@ -203,11 +203,11 @@ Methods Same as arc, but also draws straight lines between the end points and the center of the bounding box. - :param xy: Two points to define the bounding box. Sequence of - ``[(x0, y0), (x1, y1)]`` or ``[x0, y0, x1, y1]``, - where ``x1 >= x0`` and ``y1 >= y0``. - :param start: Starting angle, in degrees. Angles are measured from - 3 o'clock, increasing clockwise. + :param xy: Two points to define the bounding box. Sequence of ``[(x0, y0), + (x1, y1)]`` or ``[x0, y0, x1, y1]``, where ``x1 >= x0`` and ``y1 >= + y0``. + :param start: Starting angle, in degrees. Angles are measured from 3 + o'clock, increasing clockwise. :param end: Ending angle, in degrees. :param fill: Color to use for the fill. :param outline: Color to use for the outline. diff --git a/docs/reference/ImageStat.rst b/docs/reference/ImageStat.rst index 28a884d05..d79006190 100644 --- a/docs/reference/ImageStat.rst +++ b/docs/reference/ImageStat.rst @@ -20,12 +20,13 @@ for a region of an image. Min/max values for each band in the image. - .. Note:: This relies on the :py:meth:`~PIL.Image.histogram` method, and simply - returns the low and high bins used. This is correct for images with 8 bits per - channel, but fails for other modes such as ``I`` or ``F``. Instead, use - :py:meth:`~PIL.Image.getextrema` to return per-band extrema for the image. - This is more correct and efficient because, for non-8-bit modes, the histogram - method uses :py:meth:`~PIL.Image.getextrema` to determine the bins used. + .. Note:: This relies on the :py:meth:`~PIL.Image.histogram` method, + and simply returns the low and high bins used. This is correct for + images with 8 bits per channel, but fails for other modes such as + ``I`` or ``F``. Instead, use :py:meth:`~PIL.Image.getextrema` to + return per-band extrema for the image. This is more correct and + efficient because, for non-8-bit modes, the histogram method uses + :py:meth:`~PIL.Image.getextrema` to determine the bins used. .. py:attribute:: count