Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Bugs

[issue12428] functools test coverage

 

 

Python bugs RSS feed   Index | Next | Previous | View Threaded


report at bugs

Jul 16, 2012, 12:08 AM

Post #1 of 5 (42 views)
Permalink
[issue12428] functools test coverage

Changes by Brian Thorne <hardbyte [at] gmail>:


----------
nosy: +jackdied

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue12428>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Jul 23, 2012, 4:44 PM

Post #2 of 5 (36 views)
Permalink
[issue12428] functools test coverage [In reply to]

Antoine Pitrou <pitrou [at] free> added the comment:

Why does the pure Python version of partial have to be so complicated?
I don't think the __class__, __setattr__ and __delattr__ are useful. As Raymond said, only the core, documented functionality needs to be preserved, not implementation details.

Something else:

- from _thread import allocate_lock as Lock
+ from thread import allocate_lock as Lock

The module is named _thread in 3.x, so this shouldn't have been changed (but admittedly it's thread in 2.x).

----------

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue12428>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Jul 23, 2012, 11:00 PM

Post #3 of 5 (36 views)
Permalink
[issue12428] functools test coverage [In reply to]

Brian Thorne <hardbyte [at] gmail> added the comment:

Thanks Antoine, the __class__ attribute wasn't useful, I've removed that. Overriding the __setattr__ and __delattr__ gives consistent behaviour with the both versions - allowing the unittest reuse. Also I've changed thread back to _thread.

Isn't more compatibility between the Python and C implementations desired? Is it an aim to document more of the functionality? An earlier version of this patch had a closure implementation of partial; I'm happy to revert to that if simplicity is preferred to compatibility?

Should the caching decorators be tested from multiple threads?

----------
Added file: http://bugs.python.org/file26495/issue12428.patch

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue12428>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Jul 24, 2012, 10:33 AM

Post #4 of 5 (36 views)
Permalink
[issue12428] functools test coverage [In reply to]

Antoine Pitrou <pitrou [at] free> added the comment:

Le mardi 24 juillet 2012 à 06:00 +0000, Brian Thorne a écrit :
> Isn't more compatibility between the Python and C implementations
> desired?

IMHO, not when compatibility regards obscure details such as whether
setting an attribute is allowed or not. I don't know why this was
codified in the unit tests in the first place, perhaps Nick can shed
some light.

> Should the caching decorators be tested from multiple threads?

Why not, if there's an easy way to do so.

----------

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue12428>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Aug 5, 2012, 12:45 AM

Post #5 of 5 (32 views)
Permalink
[issue12428] functools test coverage [In reply to]

Brian Thorne added the comment:

Back to a simpler closure implementation of partial and skip the repr test for python implementation.

----------
Added file: http://bugs.python.org/file26697/functools.patch

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue12428>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com

Python bugs RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.