[issue12344] Add **kwargs to get_reinitialized_command

2011-10-14 Thread Thomas Holmes

Thomas Holmes tho...@devminded.com added the comment:

It's quite alright. Thanks for finishing it up. I realize I ended up a by out 
of my depth with regards to packaging's internals and the nuance involved in 
this fix. Thanks for all the help.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12344
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12344] Add **kwargs to get_reinitialized_command

2011-10-12 Thread Thomas Holmes

Changes by Thomas Holmes tho...@devminded.com:


Added file: http://bugs.python.org/file23388/7db732ac6796.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12344
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12344] Add **kwargs to get_reinitialized_command

2011-10-12 Thread Thomas Holmes

Changes by Thomas Holmes tho...@devminded.com:


Added file: http://bugs.python.org/file23390/1bb1132840e6.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12344
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12344] Add **kwargs to get_reinitialized_command

2011-10-12 Thread Thomas Holmes

Thomas Holmes tho...@devminded.com added the comment:

Still working with Éric to determine the proper behavior of 
get_reinitialized_commands. Latest patch is known incorrect but a step closer 
to our destination.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12344
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12344] Add **kwargs to get_reinitialized_command

2011-09-19 Thread Thomas Holmes

Thomas Holmes tho...@devminded.com added the comment:

I got a bit distracted and I think had some questions on the review. I will go 
back over the state of this patch and get some feedback to you tonight or 
tomorrow evening.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12344
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12449] Add accelerator F to button Finish in all MSI installers made by bdist_msi

2011-07-12 Thread Thomas Holmes

Thomas Holmes tho...@devminded.com added the comment:

  It also creates an exe installer, not an MSI.
 Why would you think it creates an MSI?  bdist_wininst is not bdist_msi.

My concern for MSI is that this issue is referencing a change to MSI 
generation. I never had any expectation for wininst to generate an MSI.

If I remember correctly from trying the other day --formats=msi fails because 
bdist_msi is set as a valid format.

I have begun work on fixing these problems, as I've encountered them, and will 
be writing up issues for them soon.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12449
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12449] Add accelerator F to button Finish in all MSI installers made by bdist_msi

2011-07-12 Thread Thomas Holmes

Thomas Holmes tho...@devminded.com added the comment:

I mean that msi is _not_ set as a valid format. I will verify this evening.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12449
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12449] Add accelerator F to button Finish in all MSI installers made by bdist_msi

2011-07-11 Thread Thomas Holmes

Thomas Holmes tho...@devminded.com added the comment:

I was having a separate difficulty with bdist. Apparently -m packaging.run and 
pysetup3 run don't perform identically, but that isn't relevant for this bug.

Regarding bdist, I got bdist_wininst to work but I had to modify the code in 
place, it did not work by default. It also creates an exe installer, not an MSI.

bdist_msi is not set as a valid command to run inside the commands package 
__init__.py.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12449
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12344] Add **kwargs to get_reinitialized_command

2011-07-11 Thread Thomas Holmes

Thomas Holmes tho...@devminded.com added the comment:

 See also three comments about style on 
 http://bugs.python.org/review/8668/diff2/2845:3011/7845

I'm not sure I follow? The patch I attached does not violate the style 
guidelines that you indicate in the comments. The only failing I see is that 
get_reinitialized_command inside cmd.py does not have a doc string. I was 
following the path of minimal change, but I will be happy to add one.


Unless I am misunderstanding something about the other style comments I will 
work up another version with subcommand kwargs, docstring, and tests.

Thanks again Éric

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12344
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12537] mailbox's _become_message is very fragile

2011-07-11 Thread Thomas Holmes

Changes by Thomas Holmes tho...@devminded.com:


--
nosy: +thomas.holmes

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12537
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12344] Add **kwargs to get_reinitialized_command

2011-07-11 Thread Thomas Holmes

Thomas Holmes tho...@devminded.com added the comment:

I have added a test and made some additional modifications. I had to modify the 
very simple MyCmd object in test_command_cmd.py so that it would have some user 
options with default values and support finalization.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12344
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12344] Add **kwargs to get_reinitialized_command

2011-07-11 Thread Thomas Holmes

Changes by Thomas Holmes tho...@devminded.com:


Added file: http://bugs.python.org/file22624/7c61eba07f3f.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12344
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12344] Add **kwargs to get_reinitialized_command

2011-07-11 Thread Thomas Holmes

Changes by Thomas Holmes tho...@devminded.com:


Removed file: http://bugs.python.org/file22624/7c61eba07f3f.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12344
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12344] Add **kwargs to get_reinitialized_command

2011-07-11 Thread Thomas Holmes

Changes by Thomas Holmes tho...@devminded.com:


Added file: http://bugs.python.org/file22625/115c0c10b3ba.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12344
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12449] Add accelerator F to button Finish in all MSI installers made by bdist_msi

2011-07-08 Thread Thomas Holmes

Thomas Holmes tho...@devminded.com added the comment:

bdist does not appear to be enabled in 3.3 development branch, is this correct?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12449
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12344] Add **kwargs to get_reinitialized_command

2011-07-08 Thread Thomas Holmes

Thomas Holmes tho...@devminded.com added the comment:

I have made a patch based on your suggestions made to higery, Éric. I have two 
questions:

1) In Distributions.get_reinitialized_command should the reinitialization of 
the subcommands also get passed the kwargs? Unfortunately my understanding of 
the (sub)command flow is not rock solid.

2) What are your thoughts on an effective test for this? This command does not 
currently have one. I believe I know a simple way to test the new kwargs 
functionality but if one were to write a test for get_reinitialized_command I 
think it should probably test the rest of the function as well.

Thoughts?

--
hgrepos: +39
nosy: +thomas.holmes

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12344
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12344] Add **kwargs to get_reinitialized_command

2011-07-08 Thread Thomas Holmes

Changes by Thomas Holmes tho...@devminded.com:


Added file: http://bugs.python.org/file22615/d863f392c094.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12344
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12504] packaging: fix uninstall and stop skipping its tests

2011-07-07 Thread Thomas Holmes

Thomas Holmes tho...@devminded.com added the comment:

The output in my initial message is the output of the tests with them enabled 
but pre database.py patch. Once the patch is applied all packaging tests that 
run on my system pass.

I was 50/50 on whether or not to use the internal function and I just sort of 
ended up with it. I had started out writing some more complex map/list 
comprehension stuff and the function made sense at the time.

Regarding the use of yield, at least one of the other functions that uses the 
_get_records function yields the result of _get_records. I figured those could 
be altered to just return the list directly but I decided to opt for the path 
of least modification prior to getting input.

If you think it is a good idea I will modify the patch to remove the 
unnecessary yields and insert the nested function code directly in _get_records 
instead.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12504
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12504] packaging: fix uninstall and stop skipping its tests

2011-07-07 Thread Thomas Holmes

Thomas Holmes tho...@devminded.com added the comment:

Oh and thank you very much for your input. My apologies for the initial 9 
e-mail spam when I created the issue, I bumbled the remote HG repository patch 
generation :)

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12504
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12504] packaging: fix uninstall and stop skipping its tests

2011-07-07 Thread Thomas Holmes

Thomas Holmes tho...@devminded.com added the comment:

I have made the change you suggested, creating a new list and simply amending 
to minimize the diff. This new patch has been attached.

I looked through the rest of database.py and did not see any other generators 
that appeared to erroneously hold a file handle open. If you are able to 
identify one that actually is a problem I would be happy to change it.

In addition there is one generator function (list_distinfo_files) which feeds 
off of the generator I have changed but I didn't see a need to alter them as 
they work fine as generators.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12504
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12504] packaging: fix uninstall and stop skipping its tests

2011-07-07 Thread Thomas Holmes

Changes by Thomas Holmes tho...@devminded.com:


Added file: http://bugs.python.org/file22612/6e15ba060803.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12504
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5342] packaging: add tests for old versions cleanup on update

2011-07-05 Thread Thomas Holmes

Changes by Thomas Holmes tho...@devminded.com:


--
nosy: +thomas.holmes

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5342
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12504] Uninstall has disabled windows tests

2011-07-05 Thread Thomas Holmes

Changes by Thomas Holmes tho...@devminded.com:


--
assignee: tarek
components: Distutils2
nosy: alexis, eric.araujo, tarek, thomas.holmes
priority: normal
severity: normal
status: open
title: Uninstall has disabled windows tests
versions: Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12504
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12504] Uninstall has disabled windows tests

2011-07-05 Thread Thomas Holmes

New submission from Thomas Holmes tho...@devminded.com:

Functions test_uninstall.test_uninstall and test_uninstall.test_remove_issue 
were disabled for win32. Upon enabling them they generated failures.

I have worked up a patch that refactors a packaging.Distribution function 
_get_records from using a generator to returning a list. The generator function 
was holding open the RECORD file that it is trying to delete, resulting in 
failure.

I've tried to follow the protocol for a distutils2 patch as shown here 
(http://wiki.python.org/moin/Distutils/Contributing) so hopefully I've got this 
remote repository pointing correct.

 packaging.tests.test_uninstall -v
test_remove_issue (__main__.UninstallTestCase) ... ERROR
FAIL
test_uninstall (__main__.UninstallTestCase) ... ERROR
FAIL
test_uninstall_unknow_distribution (__main__.UninstallTestCase) ... ok

==
ERROR: test_remove_issue (__main__.UninstallTestCase)
--
Traceback (most recent call last):
  File D:\python\dev\cpython\lib\packaging\tests\test_uninstall.py, line 48, 
in tearDown
super(UninstallTestCase, self).tearDown()
  File D:\python\dev\cpython\lib\packaging\tests\support.py, line 134, in 
tearDown
shutil.rmtree(self._basetempdir)
  File D:\python\dev\cpython\lib\shutil.py, line 279, in rmtree
rmtree(fullname, ignore_errors, onerror)
  File D:\python\dev\cpython\lib\shutil.py, line 279, in rmtree
rmtree(fullname, ignore_errors, onerror)
  File D:\python\dev\cpython\lib\shutil.py, line 279, in rmtree
rmtree(fullname, ignore_errors, onerror)
  File D:\python\dev\cpython\lib\shutil.py, line 279, in rmtree
rmtree(fullname, ignore_errors, onerror)
  File D:\python\dev\cpython\lib\shutil.py, line 284, in rmtree
onerror(os.remove, fullname, sys.exc_info())
  File D:\python\dev\cpython\lib\shutil.py, line 282, in rmtree
os.remove(fullname)
WindowsError: [Error 32] The process cannot access the file because it is being 
used by another process: 'd:\\temp\\tmpy
6drm5\\tmp6htvi1\\Lib\\site-packages\\Meh-0.1.dist-info\\RECORD'

==
ERROR: test_uninstall (__main__.UninstallTestCase)
--
Traceback (most recent call last):
  File D:\python\dev\cpython\lib\packaging\tests\test_uninstall.py, line 48, 
in tearDown
super(UninstallTestCase, self).tearDown()
  File D:\python\dev\cpython\lib\packaging\tests\support.py, line 134, in 
tearDown
shutil.rmtree(self._basetempdir)
  File D:\python\dev\cpython\lib\shutil.py, line 279, in rmtree
rmtree(fullname, ignore_errors, onerror)
  File D:\python\dev\cpython\lib\shutil.py, line 279, in rmtree
rmtree(fullname, ignore_errors, onerror)
  File D:\python\dev\cpython\lib\shutil.py, line 279, in rmtree
rmtree(fullname, ignore_errors, onerror)
  File D:\python\dev\cpython\lib\shutil.py, line 279, in rmtree
rmtree(fullname, ignore_errors, onerror)
  File D:\python\dev\cpython\lib\shutil.py, line 284, in rmtree
onerror(os.remove, fullname, sys.exc_info())
  File D:\python\dev\cpython\lib\shutil.py, line 282, in rmtree
os.remove(fullname)
WindowsError: [Error 32] The process cannot access the file because it is being 
used by another process: 'd:\\temp\\tmp4
23fq4\\tmpp2v6uq\\Lib\\site-packages\\Foo-0.1.dist-info\\RECORD'

==
FAIL: test_remove_issue (__main__.UninstallTestCase)
--
Traceback (most recent call last):
  File D:\python\dev\cpython\lib\packaging\tests\test_uninstall.py, line 124, 
in test_remove_issue
self.assertTrue(remove('Meh', paths=[install_lib]))
AssertionError: False is not true

==
FAIL: test_uninstall (__main__.UninstallTestCase)
--
Traceback (most recent call last):
  File D:\python\dev\cpython\lib\packaging\tests\test_uninstall.py, line 102, 
in test_uninstall
self.assertTrue(remove('Foo', paths=[install_lib]))
AssertionError: False is not true

--
Ran 3 tests in 0.120s

FAILED (failures=2, errors=2)
[145911 refs]

D:\python\dev\cpython\PCbuild

--
hgrepos: +37

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12504
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12504] Uninstall has disabled windows tests

2011-07-05 Thread Thomas Holmes

Changes by Thomas Holmes tho...@devminded.com:


--
keywords: +patch
Added file: http://bugs.python.org/file22588/f333cd40cd56.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12504
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12504] Uninstall has disabled windows tests

2011-07-05 Thread Thomas Holmes

Changes by Thomas Holmes tho...@devminded.com:


Removed file: http://bugs.python.org/file22588/f333cd40cd56.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12504
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12504] Uninstall has disabled windows tests

2011-07-05 Thread Thomas Holmes

Changes by Thomas Holmes tho...@devminded.com:


Added file: http://bugs.python.org/file22589/dd470b122f32.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12504
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12504] Uninstall has disabled windows tests

2011-07-05 Thread Thomas Holmes

Changes by Thomas Holmes tho...@devminded.com:


Removed file: http://bugs.python.org/file22589/dd470b122f32.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12504
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12504] Uninstall has disabled windows tests

2011-07-05 Thread Thomas Holmes

Changes by Thomas Holmes tho...@devminded.com:


Added file: http://bugs.python.org/file22590/dcd66ae649b1.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12504
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12504] Uninstall has disabled windows tests

2011-07-05 Thread Thomas Holmes

Changes by Thomas Holmes tho...@devminded.com:


Removed file: http://bugs.python.org/file22590/dcd66ae649b1.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12504
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12504] Uninstall has disabled windows tests

2011-07-05 Thread Thomas Holmes

Changes by Thomas Holmes tho...@devminded.com:


Added file: http://bugs.python.org/file22591/dcd66ae649b1-2.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12504
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12480] urllib2 doesn't use proxy (fieddler2), configed the proxy with ProxyHandler

2011-07-03 Thread Thomas Holmes

Thomas Holmes tho...@devminded.com added the comment:

I setup a proxy and it seems to be working properly. This is on win7 x64 
professional using Python 2.7.1

I didn't using any sniffing software but if I broke the proxy the code broke. 
When I enabled the proxy it started working again. My proxy log also shows 
record of the access.

--
nosy: +thomas.holmes

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12480
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11873] test_regexp() of test_compileall fails occassionally

2011-06-30 Thread Thomas Holmes

Changes by Thomas Holmes tho...@devminded.com:


--
nosy: +Thomas.Holmes

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11873
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12449] Add accelerator F to button Finish in all MSI installers made by bdist_msi

2011-06-30 Thread Thomas Holmes

Changes by Thomas Holmes tho...@devminded.com:


--
nosy: +thomas.holmes

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12449
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8501] --dry-run option doesn't work

2011-06-30 Thread Thomas Holmes

Changes by Thomas Holmes tho...@devminded.com:


--
nosy: +thomas.holmes

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8501
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue828450] sdist generates bad MANIFEST on Windows

2011-06-30 Thread Thomas Holmes

Changes by Thomas Holmes tho...@devminded.com:


--
nosy: +thomas.holmes

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue828450
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7325] tempfile.mkdtemp() does not return absolute pathname when dir is specified

2010-01-27 Thread Thomas Holmes

Thomas Holmes sha...@gmail.com added the comment:

I made a new patch off of the 2.7 trunk version.  I think I have handled some 
of the issues more cleanly.

Please see Py(27)7325.diff

I addressed the issue of using a relative path in the tempdir to achieve the 
'guaranteed' ability to write rather than assuming the location of the python 
executable was writable.

--
Added file: http://bugs.python.org/file16028/Py(27)7325.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7325
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1752919] Exception in HTMLParser for special JavaScript code

2010-01-26 Thread Thomas Holmes

Thomas Holmes sha...@gmail.com added the comment:

I agree, I do not feel like the precise changes to the tests feel completely 
ideal.  I feel that this problem stems from the fact that the nameCheck 
function as originally written doesn't seem to completely serve its originally 
intended purpose.

The original issue that caused the modifications of the tests were as follows:

* After adding test_abs_path() namecheck would pass the test when it should 
actually fail due to the original assert performing os.path.abspath() on both 
paths.  The obviously solution to this seemed to be to take the abspath of the 
user supplied path (the variable dir in this function) relative or otherwise 
and compare to ndir which is derived from the passed in name variable, 
populated by the mkdtemp call.

* The second issue is a somewhat complex case of those asserts passing the 
atypical odd calls of nameCheck from the test__RandomNameSequence suite.  
Without absolute pathing of both parameters in the new first assert this test 
began to fail.  This is because the original call was self.namecheck(file 
name, '', '', '').  These empty parameters when called with os.path.abspath() 
would return valid paths and these asserts would succeed.  As a result, the 
abspath(join()) call built a proper path into the name parameter allowing the 
tests to pass in this case.

* For the sake of cleanliness I decided it made more sense to split the two 
apart.  Make one assert that specifically verifies the path the file/folder is 
being placed in is both absolute and matching and one that will pass the file 
name.  Perhaps the old first assert (or second assert in the patch) can 
actually be removed but I think it may be getting properly tested against in 
one of the other test classes.

I am quite confident there is a much better way to accomplish this but I did 
not wish to change _too_ much of the test on my first stab at this.

I appreciate your feedback very much.  I will work on setting up the 2.7 
environment for working on issues that span the 2x/3x gap.

--
nosy: +Thomas.Holmes

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1752919
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1752919] Exception in HTMLParser for special JavaScript code

2010-01-26 Thread Thomas Holmes

Thomas Holmes sha...@gmail.com added the comment:

Please disregard, I commented on the wrong issue.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1752919
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1752919] Exception in HTMLParser for special JavaScript code

2010-01-26 Thread Thomas Holmes

Changes by Thomas Holmes sha...@gmail.com:


--
nosy:  -Thomas.Holmes

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1752919
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7325] tempfile.mkdtemp() does not return absolute pathname when dir is specified

2010-01-26 Thread Thomas Holmes

Thomas Holmes sha...@gmail.com added the comment:

I agree, I do not feel like the precise changes to the tests feel completely 
ideal.  I feel that this problem stems from the fact that the nameCheck 
function as originally written doesn't seem to completely serve its originally 
intended purpose.

The original issue that caused the modifications of the tests were as follows:

* After adding test_abs_path() namecheck would pass the test when it should 
actually fail due to the original assert performing os.path.abspath() on both 
paths.  The obviously solution to this seemed to be to take the abspath of the 
user supplied path (the variable dir in this function) relative or otherwise 
and compare to ndir which is derived from the passed in name variable, 
populated by the mkdtemp call.

* The second issue is a somewhat complex case of those asserts passing the 
atypical odd calls of nameCheck from the test__RandomNameSequence suite.  
Without absolute pathing of both parameters in the new first assert this test 
began to fail.  This is because the original call was self.namecheck(file 
name, '', '', '').  These empty parameters when called with os.path.abspath() 
would return valid paths and these asserts would succeed.  As a result, the 
abspath(join()) call built a proper path into the name parameter allowing the 
tests to pass in this case.

* For the sake of cleanliness I decided it made more sense to split the two 
apart.  Make one assert that specifically verifies the path the file/folder is 
being placed in is both absolute and matching and one that will pass the file 
name.  Perhaps the old first assert (or second assert in the patch) can 
actually be removed but I think it may be getting properly tested against in 
one of the other test classes.

I am quite confident there is a much better way to accomplish this but I did 
not wish to change _too_ much of the test on my first stab at this.

I appreciate your feedback very much.  I will work on setting up the 2.7 
environment for working on issues that span the 2x/3x gap.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7325
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7325] tempfile.mkdtemp() does not return absolute pathname when dir is specified

2010-01-26 Thread Thomas Holmes

Thomas Holmes sha...@gmail.com added the comment:

One other thing that crossed my mind while I was thinking over this today.  
Instead of just relative pathing to '.' I should probably change my path to 
gettempdir() and then relative path to it since the location of the python 
executable may not be writable.

Any thoughts on how to go about testing this in a way that is most likely to 
succeed in all cases and respect OS permissions?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7325
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7325] tempfile.mkdtemp() does not return absolute pathname when dir is specified

2010-01-25 Thread Thomas Holmes

Thomas Holmes sha...@gmail.com added the comment:

I have created a patch for this for Python 3.1 and included an update to the 
unit tests.  The tests were never checking for a relative path and if they did 
would pas it even when it would have failed due to liberal use of 
os.path.abspath()

The test fix is probably not as clean as it could be by I did not want to 
severely alter its state.  The change to tempfile.mkdtemp() was clear and 
followed the current method tempfile.mkstemp() uses.

--
keywords: +patch
nosy: +Thomas.Holmes
Added file: http://bugs.python.org/file16005/Py7325.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7325
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7325] tempfile.mkdtemp() does not return absolute pathname when dir is specified

2010-01-25 Thread Thomas Holmes

Thomas Holmes sha...@gmail.com added the comment:

As a side note, this was done mostly as an exercise for myself and as a 
learning experience.  Any feedback would be appreciated regardless of any 
decision on the status of this bug.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7325
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com