[issue4926] putenv() accepts names containing '=', return value of unsetenv() not checked

2020-03-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: posix_putenv_garbage no longer used on Windows. -- resolution: -> fixed stage: patch review -> resolved status: pending -> closed ___ Python tracker

[issue4926] putenv() accepts names containing '=', return value of unsetenv() not checked

2019-01-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The original issues seem fixed. As for leaks in posix_putenv_garbage on Windows, it is better to open a new issue for this. -- status: open -> pending ___ Python tracker

[issue4926] putenv() accepts names containing '=', return value of unsetenv() not checked

2017-06-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The part of this issue ('=' in putenv()) is fixed in issue30746. -- nosy: +serhiy.storchaka ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/

[issue4926] putenv() accepts names containing '=', return value of unsetenv() not checked

2017-06-24 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +2432 ___ Python tracker ___ ___

[issue4926] putenv() accepts names containing '=', return value of unsetenv() not checked

2015-10-05 Thread Peter Funk
Changes by Peter Funk : -- nosy: +pefu ___ Python tracker ___ ___ Python-bugs-list

[issue1159] os.getenv() not updated after external module uses C putenv()

2014-09-21 Thread Martin Panter
Changes by Martin Panter vadmium...@gmail.com: -- nosy: +vadmium ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1159 ___ ___ Python-bugs-list

[issue1159] os.getenv() not updated after external module uses C putenv()

2014-02-03 Thread Mark Lawrence
Changes by Mark Lawrence breamore...@yahoo.co.uk: -- nosy: -BreamoreBoy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1159 ___ ___

[issue4926] putenv() accepts names containing '=', return value of unsetenv() not checked

2014-02-03 Thread Mark Lawrence
Changes by Mark Lawrence breamore...@yahoo.co.uk: -- nosy: -BreamoreBoy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4926 ___ ___

[issue1159] os.getenv() not updated after external module uses C putenv()

2014-02-03 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1159 ___

[issue1159] os.getenv() not updated after external module uses C putenv()

2013-06-19 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: FYI, PyPy recently got bitten by this: https://bugs.pypy.org/issue1518 A posix.libc_getenv() function could be a solution. -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org

[issue1159] os.getenv() not updated after external module uses C putenv()

2013-06-18 Thread Terry J. Reedy
Terry J. Reedy added the comment: The problem is the 'putenv' and 'getenv' appear to be parallel, and seem to be documented as being parallel Set the environment variable named key to the string value. Return the value of the environment variable key if it exists, but they are not. Getenv

[issue1159] os.getenv() not updated after external module uses C putenv()

2010-09-18 Thread Mark Lawrence
Mark Lawrence breamore...@yahoo.co.uk added the comment: Can someone please comment on whether or not this issue is still valid. -- nosy: +BreamoreBoy resolution: postponed - ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1159

[issue4926] putenv() accepts names containing '=', return value of unsetenv() not checked

2010-07-25 Thread Mark Lawrence
Mark Lawrence breamore...@yahoo.co.uk added the comment: @David: I couldn't apply the patches directly with tortoisesvn cos of the git format so tried to do them manually but failed. E.g. in test_os I couldn't find PYTHONTESTVAROS to insert the two new lines after and in test_posix couldn't

[issue4926] putenv() accepts names containing '=', return value of unsetenv() not checked

2010-07-25 Thread David Watson
David Watson bai...@users.sourceforge.net added the comment: You're having a bad day at the office :) Just use patch -p1. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4926 ___

[issue4926] putenv() accepts names containing '=', return value of unsetenv() not checked

2010-07-24 Thread David Watson
as putenv() can't set a name that unsetenv() can fail to remove. I did however find one more case where that can happen, which is with an environment variable that has an empty name. Linux at least allows such variables to be set and passed to new processes, but its unsetenv() will not remove them

[issue4926] putenv() accepts names containing '=', return value of unsetenv() not checked

2010-07-24 Thread David Watson
Changes by David Watson bai...@users.sourceforge.net: Added file: http://bugs.python.org/file18186/putenv-empty-2.x.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4926

[issue4926] putenv() accepts names containing '=', return value of unsetenv() not checked

2010-07-24 Thread David Watson
Changes by David Watson bai...@users.sourceforge.net: Added file: http://bugs.python.org/file18187/putenv-equals-3.x.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4926

[issue4926] putenv() accepts names containing '=', return value of unsetenv() not checked

2010-07-24 Thread David Watson
Changes by David Watson bai...@users.sourceforge.net: Added file: http://bugs.python.org/file18188/putenv-empty-3.x.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4926

[issue4926] putenv() accepts names containing '=', return value of unsetenv() not checked

2010-07-24 Thread David Watson
Changes by David Watson bai...@users.sourceforge.net: Added file: http://bugs.python.org/file18189/visibility-2.x.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4926 ___

[issue4926] putenv() accepts names containing '=', return value of unsetenv() not checked

2010-07-24 Thread David Watson
Changes by David Watson bai...@users.sourceforge.net: Added file: http://bugs.python.org/file18190/visibility-3.x.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4926 ___

[issue4926] putenv() accepts names containing '=', return value of unsetenv() not checked

2010-07-21 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: The patch actually does 2 things: - it prevents the usage of '=' in putenv, which is is good because the putenv() system call handles this badly. - it will raise an error when unsetting a nonexistent variable. This is a change

[issue4926] putenv() accepts names containing '=', return value of unsetenv() not checked

2010-07-08 Thread Mark Lawrence
Mark Lawrence breamore...@yahoo.co.uk added the comment: As patches were originally provided would someone kindly review them. -- nosy: +BreamoreBoy, loewis stage: - patch review versions: +Python 2.7, Python 3.1, Python 3.2 ___ Python tracker

[issue1159] os.getenv() not updated after external module uses C putenv()

2009-02-11 Thread Jason R. Coombs
Jason R. Coombs jar...@jaraco.com added the comment: As a workaround, could you use ctypes to pull the environment back into the python context? For example: http://paste.turbogears.org/paste/34734 -- nosy: +jaraco ___ Python tracker

[issue4926] putenv() accepts names containing '=', return value of unsetenv() not checked

2009-01-12 Thread David Watson
New submission from David Watson bai...@users.sourceforge.net: One of these problems interacts with the other, and can cause os.unsetenv() to free memory that's still in use. Firstly, calling os.putenv(FOO=BAR, value) causes putenv(3) to be called with the string FOO=BAR=value, which sets

[issue4926] putenv() accepts names containing '=', return value of unsetenv() not checked

2009-01-12 Thread David Watson
Changes by David Watson bai...@users.sourceforge.net: Added file: http://bugs.python.org/file12709/2.x.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4926 ___

[issue4926] putenv() accepts names containing '=', return value of unsetenv() not checked

2009-01-12 Thread David Watson
Changes by David Watson bai...@users.sourceforge.net: Added file: http://bugs.python.org/file12710/3.x.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4926 ___

[issue4926] putenv() accepts names containing '=', return value of unsetenv() not checked

2009-01-12 Thread Gabriel Genellina
Changes by Gabriel Genellina gagsl-...@yahoo.com.ar: -- nosy: +gagenellina ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4926 ___ ___

[issue1159] os.getenv() not updated after external module uses C putenv()

2007-09-18 Thread Sean Reifschneider
Changes by Sean Reifschneider: -- priority: - normal resolution: - postponed __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1159 __ ___ Python-bugs-list mailing list

[issue1159] os.getenv() not updated after external module uses C putenv()

2007-09-14 Thread Raghuram Devarakonda
Raghuram Devarakonda added the comment: Robert Ancell added the comment: draghuram, unfortunately while os.putenv() can be fixed to be symmetrical any putenv call from a C module cannot, for example: Hi Robert, I understood the problem from your very first report. I brought up putenv

[issue1159] os.getenv() not updated after external module uses C putenv()

2007-09-13 Thread Robert Ancell
imports an extension module that uses the system putenv() then the changes cannot be accessed using the Python standard library. This has been a problem for us as we have created Python bindings to an existing C based library that modifies the environment dynamically (not the best design decision

[issue1159] os.getenv() not updated after external module uses C putenv()

2007-09-13 Thread Martin v. Löwis
Martin v. Löwis added the comment: I can't see a bug here. If you want the current C library value of the environment variable, just use os.getenv, not os.environ. -- nosy: +loewis __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1159

[issue1159] os.getenv() not updated after external module uses C putenv()

2007-09-13 Thread Martin v. Löwis
Martin v. Löwis added the comment: Ignore my comment - I see now that you are talking about os.getenv. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1159 __ ___

[issue1159] os.getenv() not updated after external module uses C putenv()

2007-09-13 Thread Raghuram Devarakonda
Raghuram Devarakonda added the comment: On 9/13/07, Robert Ancell [EMAIL PROTECTED] wrote: The Python os.getenv() function accesses an Python dictionary which is mirroring the process environment. This dictionary is populated when the interpreter starts and updated when

[issue1159] os.getenv() not updated after external module uses C putenv()

2007-09-13 Thread Stefan Sonnenberg-Carstens
Stefan Sonnenberg-Carstens added the comment: As per the document and my simple test (on Linux), os.putenv() does not update os.environ. I think, it should update it. What would be the benefit ? -- nosy: +pythonmeister __ Tracker [EMAIL PROTECTED]

[issue1159] os.getenv() not updated after external module uses C putenv()

2007-09-13 Thread Raghuram Devarakonda
. Perhaps, because putenv is supposedly not available on all platforms? Any way, I think the OP was asking to always get the value dynamically when ever os.environ['VAR'] or os.getenv['VAR'] is done. I don't see any problem with that approach. How ever, if it is considered backwards incompatible, I

[issue1159] os.getenv() not updated after external module uses C putenv()

2007-09-13 Thread Stefan Sonnenberg-Carstens
Stefan Sonnenberg-Carstens added the comment: I'd like to see perl/ruby behaviour: an dict (os.environ), nothing more (perl %ENV,ruby $ENV). Get rid of setenv/putenv at all. 3.0a1 has even more: There is os.environ (a dict), os.[put|get]env() and os.environ.putenv

[issue1159] os.getenv() not updated after external module uses C putenv()

2007-09-13 Thread Robert Ancell
Robert Ancell added the comment: draghuram, unfortunately while os.putenv() can be fixed to be symmetrical any putenv call from a C module cannot, for example: If you make an extension: #include stdlib.h PyObject *putenvC(PyObject *module, PyObject *args) { int result

[issue1159] os.getenv() not updated after external module uses C putenv()

2007-09-13 Thread Robert Ancell
Robert Ancell added the comment: I've attached proof-of-concept showing how os.environ would ideally work. It'll only work in Posix, etc etc. Reading into it more there are a lot of general issues with environments and memory allocation which is why I suspect Python doesn't use putenv... See

Re: putenv

2005-12-20 Thread Peter Hansen
Terry Hancock wrote: source `my_script.py` It's ugly, but it does work -- I have had to use this before in a production environment. Well, it's not really any less advisable than scripting in csh to begin with. ;-) It can even be made no-so-ugly with an alias. alias my_script='source

Re: putenv

2005-12-20 Thread Mike Meyer
Terry Hancock [EMAIL PROTECTED] writes: On Tue, 20 Dec 2005 05:35:48 - Grant Edwards [EMAIL PROTECTED] wrote: On 2005-12-20, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I have csh script that calls a bunch of python programs and I'd like to use env variables as kind of a global

Re: putenv

2005-12-20 Thread Steve Holden
Mike Meyer wrote: Terry Hancock [EMAIL PROTECTED] writes: On Tue, 20 Dec 2005 05:35:48 - Grant Edwards [EMAIL PROTECTED] wrote: On 2005-12-20, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I have csh script that calls a bunch of python programs and I'd like to use env variables as kind of a

Re: putenv

2005-12-20 Thread Christophe
Mike Meyer a écrit : Terry Hancock [EMAIL PROTECTED] writes: On Tue, 20 Dec 2005 05:35:48 - Grant Edwards [EMAIL PROTECTED] wrote: On 2005-12-20, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I have csh script that calls a bunch of python programs and I'd like to use env variables as kind of

Re: putenv

2005-12-20 Thread Tom Anderson
On Tue, 20 Dec 2005, Steve Holden wrote: Mike Meyer wrote: Terry Hancock [EMAIL PROTECTED] writes: On Tue, 20 Dec 2005 05:35:48 - Grant Edwards [EMAIL PROTECTED] wrote: On 2005-12-20, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I have csh script that calls a bunch of python

putenv

2005-12-19 Thread [EMAIL PROTECTED]
Is there a trick to getting putenv/getenv to work? I have csh script that calls a bunch of python programs and I'd like to use env variables as kind of a global variable that I can pass around to the pythong scripts. Thanks, Dave -- http://mail.python.org/mailman/listinfo/python-list

Re: putenv

2005-12-19 Thread Grant Edwards
On 2005-12-20, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Is there a trick to getting putenv/getenv to work? No. I have csh script that calls a bunch of python programs and I'd like to use env variables as kind of a global variable that I can pass around to the pythong scripts. You can't

Re: putenv

2005-12-19 Thread Terry Hancock
On Tue, 20 Dec 2005 05:35:48 - Grant Edwards [EMAIL PROTECTED] wrote: On 2005-12-20, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I have csh script that calls a bunch of python programs and I'd like to use env variables as kind of a global variable that I can pass around to the pythong