From: "Nikolaj Sjujskij" <sterkrig@myopera.com>
To: gentoo-python@lists.gentoo.org, "IAN DELANEY" <della5@iinet.com.au>
Subject: Re: [gentoo-python] recent trend of django-foo tests
Date: Tue, 21 May 2013 14:42:55 +0400 [thread overview]
Message-ID: <op.wxfj1tn2h7emz2@verkdatorn.npdb> (raw)
In-Reply-To: <20130522013524.6a288215@archtester.homenetwork>
Den 2013-05-21 21:35:24 skrev IAN DELANEY <della5@iinet.com.au>:
> On Tue, 21 May 2013 12:56:50 +0400
> "Nikolaj Sjujskij" <sterkrig@myopera.com> wrote:
>
>> Den 2013-05-20 20:37:53 skrev IAN DELANEY <della5@iinet.com.au>:
>>
>>> Ja, tack tack for att forsoka, med nej. (Please add the grammatical
>>> nice-ities to the vowel o).
>> I've got bad news for you: actually my native language is Russian :)
>>
> Oh dear, more bad news, this isn't a good week. Header read;
> "Den 2013-05-20 20:37:53 skrev"
> Den is 'the', skrev is wrote in swedish.
Yep, my email client speaks Swedish :)
>>> I got a fix from #django on the second
>>> attempt. I was close on the first attempt, so for the benefit of
>>> all,
>>>
>>> first export SECRET_KEY='green', followed by
>>>
>>> - "from django.conf import \
>>> global_settings;global_settings.SECRET_KEY='green'" ${test}
>>> + "from django.conf import \
>>> global_settings;global_settings.SECRET_KEY='$SECRET_KEY'" ${test}
> well I'm open to an explanation too, but in brief, he said set the key
> in bash, then on a second attempt on re-reading my query more closely,
> he corrected it to the above. An alternate was SECRET_KEY="green"
> python -c ..., that is pre-pending the setting of the secret key to the
> call to python, which should work if you try. I settled for the above.
I mean, python should ignore (and it does for me) arguments after -c
option, however you do that in bash:
% python global_settings.py
<module 'django.conf.global_settings' from
'/usr/lib64/python2.7/site-packages/django/conf/global_settings.pyc'>
% python -c "print('$LANG')" global_settings.py
ru_RU.UTF-8
I'm not sure you understand my code snippets correctly. I demonstrate how
python ignores "global_settings.py" argument and doesn't run the script
whose name was passed after `-c <python code>` option.
>> I positively fail to see how that change could fix anything.
>> % python global_settings.py
>> <module 'django.conf.global_settings' from
>> '/usr/lib64/python2.7/site-packages/django/conf/global_settings.pyc'>
>>
> I'm guessing here the manufactured global_settings.py could be used
> effectively, I'd have to go back and try some more to do so. But hey
> thx for the effort.
>> % python -c 'import sys; print sys.platform' global_settings.py
>> linux2
>>
>>> and presto.
>>>
>>> * python2_7: running distutils-r1_run_phase python_test
>>> * test test_compiler.py passed under python2.7
>>> * test test_compressor.py passed under python2.7
>>> another bug bites the dust.
>> Well, if that somehow had worked, it's all right, I guess.
>>
> a good news snippet to offset the bad. What can I say?
I'm just pointing out that I for one can't understand what's happening
there and why it seems to work while it shouldn't. Therefore it may break
again unexpectedly, so just keep that in mind :)
next prev parent reply other threads:[~2013-05-21 10:43 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-20 9:05 [gentoo-python] recent trend of django-foo tests IAN DELANEY
2013-05-20 9:18 ` Nikolaj Sjujskij
2013-05-20 17:36 ` IAN DELANEY
2013-05-21 8:56 ` Nikolaj Sjujskij
2013-05-21 17:35 ` IAN DELANEY
2013-05-21 10:42 ` Nikolaj Sjujskij [this message]
2013-05-30 19:34 ` Mike Gilbert
2013-06-03 7:05 ` Arfrever Frehtes Taifersar Arahesis
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=op.wxfj1tn2h7emz2@verkdatorn.npdb \
--to=sterkrig@myopera.com \
--cc=della5@iinet.com.au \
--cc=gentoo-python@lists.gentoo.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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox