[PATCH] patch: remove email import workaround for Python 2.4

Augie Fackler raf at durin42.com
Mon Jun 22 17:50:39 CDT 2015


On Mon, Jun 22, 2015 at 10:09:43AM -0700, Gregory Szorc wrote:
> # HG changeset patch
> # User Gregory Szorc <gregory.szorc at gmail.com>
> # Date 1434992948 25200
> #      Mon Jun 22 10:09:08 2015 -0700
> # Node ID 2af150f19ecdc93659d81a644b5aa1f417167647
> # Parent  7fdd1782fc4ee9da87d8af13e806dc9055db2c38
> patch: remove email import workaround for Python 2.4

Queued, many thanks.

>
> Python 2.6 provides access to the sub-modules just fine. This workaround
> is no longer needed since we no longer support Python 2.4.
>
> diff --git a/mercurial/patch.py b/mercurial/patch.py
> --- a/mercurial/patch.py
> +++ b/mercurial/patch.py
> @@ -8,12 +8,8 @@
>
>  import collections
>  import cStringIO, email, os, errno, re, posixpath, copy
>  import tempfile, zlib, shutil
> -# On python2.4 you have to import these by name or they fail to
> -# load. This was not a problem on Python 2.7.
> -import email.Generator
> -import email.Parser
>
>  from i18n import _
>  from node import hex, short
>  import base85, mdiff, scmutil, util, diffhelpers, copies, encoding, error
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> https://selenic.com/mailman/listinfo/mercurial-devel


More information about the Mercurial-devel mailing list