From: "Ivan A. Melnikov" <iv@altlinux.org>
To: devel@lists.altlinux.org
Subject: Re: [devel] python3.x(qwe) vs python3(qwe)
Date: Wed, 3 Feb 2010 11:50:35 +0300
Message-ID: <20100203115035.20e2e80a@deimos.localdomain> (raw)
In-Reply-To: <8d778a621002022349p685cdefka80ab266d9cdb64f@mail.gmail.com>
В Wed, 3 Feb 2010 14:49:39 +0700
Евгений Ростовцев <real.altlinux.org@gmail.com> пишет:
>
> Дело не в халяве. Дело в разработке механизма выявления таких
> изменений magic bytes на этапе тестовой пересборки сизифа или
> наприсания соответствующего теста репокопа.
>
Если я правильно понимаю, эти magic bytes есть нечто, возвращаемое
imp.get_magic(). Оно действительно меняется только при изменениях
байт-кода, см. комментарий, например, тут:
http://git.altlinux.org/people/real/packages/python3.git?p=python3.git;a=blob;f=Python/Python/import.c;h=cbfb7615e2551356ccfdad4684f2cbb70dfe2cf8;hb=9453d77099036baa2461e3ddd2f01701a8aa0549#l33
или, что то же самое, http://tinyurl.com/python3-MAGIC .
Есть идея делать питоновские зависимости вида
python3.${MAGIC}(qwe)
где MAGIC получается, например, так (пример для текущего python 2.6):
>>> import imp
>>> ''.join("%02x" % ord(i) for i in imp.get_magic())
'd1f20d0a'
Правда, механизм требует уточнения -- говорят, magic зависит от опций
компилятора и чего-то ещё...
--
WBR,
Ivan A. Melnikov
linux, c++, argentine tango -- in no particular order
next prev parent reply other threads:[~2010-02-03 8:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-03 7:49 Евгений Ростовцев
2010-02-03 8:50 ` Ivan A. Melnikov [this message]
2010-02-03 9:04 ` Alexey I. Froloff
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100203115035.20e2e80a@deimos.localdomain \
--to=iv@altlinux.org \
--cc=devel@lists.altlinux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
ALT Linux Team development discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
public-inbox-index devel
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.devel
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git