You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Jim Jagielski <ji...@jaguNET.com> on 2009/09/22 18:09:41 UTC

unix/tempdir.c

While looking at a different codebase, I was made (re)aware that the
ordering for APR to find the temp directory uses the following ordering
in env-vars:

           $TMP
           $TEMP
           $TMPDIR

with the rationale that "this is how Python 2.2 does it"

But really, the canonical var to use is $TMPDIR, and looking
over Python 2.6 (at least) does revise the ordering to be what
"should" be expected....

     for envname in 'TMPDIR', 'TEMP', 'TMP':
         dirname = _os.getenv(envname)
         if dirname: dirlist.append(dirname)


Anyone have heartburn if I "fix" tempdir.c ? 

Re: unix/tempdir.c

Posted by Graham Leggett <mi...@sharp.fm>.
William A. Rowe, Jr. wrote:

>> Anyone have heartburn if I "fix" tempdir.c ?
> 
> In 1.3, hmmm... Sounds like a big leap around expectations.  For future
> release minor or major only, it sounds like a good fix.

+1.

Regards,
Graham
--

Re: unix/tempdir.c

Posted by Ruediger Pluem <rp...@apache.org>.

On 09/22/2009 06:59 PM, William A. Rowe, Jr. wrote:
> Jim Jagielski wrote:
>> I'm looking over the docs to see if we actually document this
>> anyplace... Although Python 2.2 may have used that order, 1.5
>> didn't nor does 2.6... But agree that the change requires
>> documenting.
> 
> As a developer library, in this case, the source code and existing
> behavior is the documentation :)
> 
> The point being, developers concerned with this or users who had
> researched an issue with this had already compensated for the
> existing behavior, and a footnote in 1.3.x is unlikely to be
> noticed.  An application developer expects such changes to occur
> in a minor bump, and must expect radical changes in major bumps.
> 
> Docs will be good, of the previous and new behaviors, yes.
> 
> 

+1 to change it on trunk and 1.4.x, -0.5 for 1.3.x for the reasons
Bill stated above.

Regards

RĂ¼diger

Re: unix/tempdir.c

Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
Jim Jagielski wrote:
> 
> I'm looking over the docs to see if we actually document this
> anyplace... Although Python 2.2 may have used that order, 1.5
> didn't nor does 2.6... But agree that the change requires
> documenting.

As a developer library, in this case, the source code and existing
behavior is the documentation :)

The point being, developers concerned with this or users who had
researched an issue with this had already compensated for the
existing behavior, and a footnote in 1.3.x is unlikely to be
noticed.  An application developer expects such changes to occur
in a minor bump, and must expect radical changes in major bumps.

Docs will be good, of the previous and new behaviors, yes.

Re: unix/tempdir.c

Posted by Jim Jagielski <ji...@jagunet.com>.
On Sep 22, 2009, at 12:25 PM, William A. Rowe, Jr. wrote:

> Jim Jagielski wrote:
>> While looking at a different codebase, I was made (re)aware that the
>> ordering for APR to find the temp directory uses the following  
>> ordering
>> in env-vars:
>>
>>          $TMP
>>          $TEMP
>>          $TMPDIR
>>
>> with the rationale that "this is how Python 2.2 does it"
>>
>> But really, the canonical var to use is $TMPDIR, and looking
>> over Python 2.6 (at least) does revise the ordering to be what
>> "should" be expected....
>>
>>    for envname in 'TMPDIR', 'TEMP', 'TMP':
>>        dirname = _os.getenv(envname)
>>        if dirname: dirlist.append(dirname)
>>
>>
>> Anyone have heartburn if I "fix" tempdir.c ?
>
> In 1.3, hmmm... Sounds like a big leap around expectations.  For  
> future
> release minor or major only, it sounds like a good fix.
>

I'm looking over the docs to see if we actually document this
anyplace... Although Python 2.2 may have used that order, 1.5
didn't nor does 2.6... But agree that the change requires
documenting.

Re: unix/tempdir.c

Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
Jim Jagielski wrote:
> While looking at a different codebase, I was made (re)aware that the
> ordering for APR to find the temp directory uses the following ordering
> in env-vars:
> 
>           $TMP
>           $TEMP
>           $TMPDIR
> 
> with the rationale that "this is how Python 2.2 does it"
> 
> But really, the canonical var to use is $TMPDIR, and looking
> over Python 2.6 (at least) does revise the ordering to be what
> "should" be expected....
> 
>     for envname in 'TMPDIR', 'TEMP', 'TMP':
>         dirname = _os.getenv(envname)
>         if dirname: dirlist.append(dirname)
> 
> 
> Anyone have heartburn if I "fix" tempdir.c ?

In 1.3, hmmm... Sounds like a big leap around expectations.  For future
release minor or major only, it sounds like a good fix.