git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: (unknown)

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 28, 2012, 19:33 UTC
Message-ID
<7vk3s2hsz8.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20121228164322.B102B4413A@snark.thyrsus.com>
esr@thyrsus.com (Eric S. Raymond) writes:
Show 21 quoted lines
> From: "Eric S. Raymond" <esr@thyrsus.com>
> Date: Fri, 28 Dec 2012 11:40:59 -0500
> Subject: [PATCH] Add checks to Python scripts for version dependencies.
>
> ---
>  contrib/ciabot/ciabot.py           | 8 +++++++-
> ...
> diff --git a/contrib/fast-import/import-zips.py b/contrib/fast-import/import-zips.py
> index 82f5ed3..b989941 100755
> --- a/contrib/fast-import/import-zips.py
> +++ b/contrib/fast-import/import-zips.py
> @@ -9,10 +9,15 @@
>  ##  git log --stat import-zips
>  
>  from os import popen, path
> -from sys import argv, exit
> +from sys import argv, exit, hexversion
>  from time import mktime
>  from zipfile import ZipFile
>  
> +if hexversion < 0x01060000:

I am assuming that you are carefully limiting what you import from "sys" by adding only hexversion to the import above, but then can we refer to sys.stderr below?

> +	# The limiter is the zipfile module
> +        sys.stderr.write("import-zips.py: requires Python 1.6.0 or later.\n")
> +        sys.exit(1)
> +
Previous: Eric S. Raymond
Message 2 of 2 in “(unknown)”
  1. Eric S. RaymondDec 28, 2012
  2. Junio C HamanoDec 28, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.