[issue21820] unittest: unhelpful truncating of long strings.

2014-06-21 Thread Chris Withers

New submission from Chris Withers:

This code, prior to 3.4:

from testfixtures import Comparison as C

class AClass:
def __init__(self,x,y=None):
self.x = x
if y:
self.y = y
def __repr__(self):
return ''+self.__class__.__name__+''

...

self.assertEqual(
C('testfixtures.tests.test_comparison.AClass',
  y=5, z='missing'),
  AClass(1, 2))

Would give the following output in the failure message:


C(failed):testfixtures.tests.test_comparison.AClass
  x:1 not in Comparison
  y:5 != 2
  z:'missing' not in other
/C != AClass


Now, in 3.4, you get the (rather unhelpful):


C(failed):testfixtures.tests.test_com[79 chars] /C != AClass


It's particularly disappointing that there's no API (class attribute, etc) to 
control whether or not this new behaviour is enabled.

I believe the change that introduced this behaviour was in [issue18996]

--
components: Tests
keywords: 3.4regression
messages: 221167
nosy: cjw296
priority: normal
severity: normal
status: open
title: unittest: unhelpful truncating of long strings.
type: behavior
versions: Python 3.4

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



[issue18996] unittest: more helpful truncating long strings

2014-06-21 Thread Chris Withers

Chris Withers added the comment:

Okay, opened [issue21820].

--

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



[issue21820] unittest: unhelpful truncating of long strings.

2014-06-21 Thread Chris Withers

Chris Withers added the comment:

Agreed, but even for strings, there really should be an API to control this...

--

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



[issue21820] unittest: unhelpful truncating of long strings.

2014-06-22 Thread Chris Withers

Chris Withers added the comment:

If I worked up a patch that:

- made sure this truncation wasn't used for non-strings

- added a class-attribute control for the truncation

Would it be well received?

--

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



[issue21820] unittest: unhelpful truncating of long strings.

2014-06-24 Thread Chris Withers

Chris Withers added the comment:

No, it would not be enough.

Please see the report above, the repr of non-strings may be large, but 
it's often intended that way and all of the string should be displayed.

It really is a shame that no API was provided to control this behaviour. 
I actually consider that a bug, Michael, could it be considered as such 
so that we can fix it in 3.4 rather than having to wait until 3.5 to fix 
the problem?

--

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



testfixtures 4.1.2 Released!

2015-01-30 Thread Chris Withers

Hi All,

I'm pleased to announce the release of testfixtures 4.1.2. This is a 
bugfix release that fixes the following:


- Clarify documentation for name parameter to LogCapture.

- ShouldRaise now shows different output when two exceptions have
  the same representation but stiff differ.

- Fix bug that could result in a dict comparing equal to a
  list.

Thanks to Daniel Fortunov for the documentation clarification.

The package is on PyPI and a full list of all the links to docs, issue 
trackers and the like can be found here:


http://www.simplistix.co.uk/software/python/testfixtures

Any questions, please do ask on the Testing in Python list or on the 
Simplistix open source mailing list...


cheers,

Chris

--
Simplistix - Content Management, Batch Processing  Python Consulting
   - http://www.simplistix.co.uk
--
https://mail.python.org/mailman/listinfo/python-list


xlwt 1.0.0 released!

2015-04-15 Thread Chris Withers

Hi All,

I'm pleased to announce the release of xlwt 1.0.0.

This release contains the following:

- Python 3 support.

- An initial set of unit tests.

- An initial set of Sphinx documentation.

- Move to setuptools for packaging.

- Wire up Travis, Coveralls and ReadTheDocs.

- Allow longs as row indexes.

Big thanks to Thomas Kluyver for his work on Python 3 support, Manfred 
Moitzi

for donating his unit tests.

Belated thanks to Landon Jurgens for his help on converting the 
documentation

to Sphinx.

If you find any problems, please ask about them on the 
python-ex...@googlegroups.com list, or submit an issue on GitHub:


https://github.com/python-excel/xlwt/issues

There's also details of all things Python and Excel related here:

http://www.python-excel.org/

NB: This is likely the last new feature release of xlwt. If there are 
bugs, we will try and fix them, but it may be a slow process. If you're 
starting a new project, you should probably consider openpyxl or 
xlsxwriter instead.


cheers,

Chris

--
Simplistix - Content Management, Batch Processing  Python Consulting
- http://www.simplistix.co.uk
--
https://mail.python.org/mailman/listinfo/python-list


testfixtures 4.2.0 Released!

2015-08-11 Thread Chris Withers

Hi All,

I'm pleased to announce the release of testfixtures 4.2.0. This is a 
feature release that fixes the following:


- A new MockPopen mock for use when testing code that uses
  subprocess.Popen.

- ShouldRaiss now subclasses object, so that subclasses of it
  may use super().

- Support for Python 3.2 has been officially dropped.

Thanks to BATS Global Markets for donating the code for MockPopen.

The package is on PyPI and a full list of all the links to docs, issue 
trackers and the like can be found here:


http://www.simplistix.co.uk/software/python/testfixtures

Any questions, please do ask on the Testing in Python list or on the 
Simplistix open source mailing list...


cheers,

Chris

--
Simplistix - Content Management, Batch Processing  Python Consulting
   - http://www.simplistix.co.uk
--
https://mail.python.org/mailman/listinfo/python-list


xlrd 0.9.4 released!

2015-07-15 Thread Chris Withers

Hi All,

I'm pleased to announce the release of xlrd 0.9.4:

http://pypi.python.org/pypi/xlrd/0.9.4

This release includes the following changes:

- Automated tests are now run on Python 3.4

- Use ElementTree.iter() if available, not deprecated getiterator()
  when parsing xlsx files.

- Fix #106 : Exception Value: unorderable types: Name()  Name()

- Create row generator expression with Sheet.get_rows()

- Fix for forward slash file separator and lowercase names within xlsx
  internals.

Thanks to the following for their contributions to this release:

- Corey Farwell
- Jonathan Kamens
- Deepak N
- Brandon R. Stoner
- John McNamara

If you find any problems, please ask about them on the 
python-ex...@googlegroups.com list, or submit an issue on GitHub:


https://github.com/python-excel/xlrd/issues

Full details of all things Python and Excel related can be found here:

http://www.python-excel.org/

cheers,

Chris

--
Simplistix - Content Management, Batch Processing  Python Consulting
- http://www.simplistix.co.uk
--
https://mail.python.org/mailman/listinfo/python-list


[issue25532] infinite loop when running inspect.unwrap over unittest.mock.call

2015-11-03 Thread Chris Withers

Chris Withers added the comment:

Indeed, I guess Venusian will get confused, but not sure thats solvable as 
there will be obvious bugs indicating that call shouldn't be imported at 
module-level.

This does feel like the problem is actually with inspect.unwrap: there's 
evidence of an attempt to catch infinite loops like this and blow up with a 
ValueError, it just doesn't appear those checks are good enough. How many 
levels of unwrapping are reasonable? 1? 5? 100? It feels like the loop 
detection should be count, not set-of-ids based...

The other optional we be for _Call instances to be generative only in the right 
context, or only to a certain depth (10? how deep can one set of calls 
realistically be?)

I suspect both should probably happen... Thoughts?

--

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



[issue25532] infinite loop when running inspect.unwrap over unittest.mock.call

2015-11-01 Thread Chris Withers

New submission from Chris Withers:

The following results in an infinite loop:

>>> from inspect import unwrap
>>> from unittest.mock import call
>>> unwrap(call)

This can occur when you use doctest.DocTestSuite to load doc tests from a 
module where unittest.mock.call has been imported.

--
components: Library (Lib)
keywords: 3.5regression
messages: 253885
nosy: cjw296, michael.foord, ncoghlan, yselivanov
priority: normal
severity: normal
status: open
title: infinite loop when running inspect.unwrap over unittest.mock.call
versions: Python 3.5, Python 3.6

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



testfixtures 4.4.0 Released!

2015-11-01 Thread Chris Withers

Hi All,

I'm pleased to announce the release of testfixtures 4.4.0. This is a 
feature release that adds the following:


- Add support for labelling the arguments passed to compare().

- Allow expected and actual keyword parameters to be passed to
  compare().

- Fix "TypeError: unorderable types" when compare() found multiple
  differences in sets and dictionaries on Python 3.

- Add official support for Python 3.5.

- Drop official support for Python 2.6.

Thanks to Daniel Fortunov for the initial ideas for explicit expected 
and actual support in compare().


The package is on PyPI and a full list of all the links to docs, issue 
trackers and the like can be found here:


https://github.com/Simplistix/testfixtures

Any questions, please do ask on the Testing in Python list or on the 
Simplistix open source mailing list...


cheers,

Chris

--
Simplistix - Content Management, Batch Processing & Python Consulting
   - http://www.simplistix.co.uk
--
https://mail.python.org/mailman/listinfo/python-list


[issue25532] infinite loop when running inspect.unwrap over unittest.mock.call

2015-11-01 Thread Chris Withers

Chris Withers added the comment:

A naive solution is to chat unittest.mock._Call's __getattr__ to be as follows:

def __getattr__(self, attr):
if attr == '__wrapped__':
raise AttributeError('__wrapped__')
if self.name is None:
return _Call(name=attr, from_kall=False)
name = '%s.%s' % (self.name, attr)
return _Call(name=name, parent=self, from_kall=False)

...but I'm not sure that's the right thing to do.

inspect.unwrap is trying to catch this loop, but the implementation fails for 
cases where f.__wrapped__ is generative, as in the case of Mock and _Call.

I suspect both modules need a fix, but not sure what best to suggest.

--

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



[issue25532] infinite loop when running inspect.unwrap over unittest.mock.call

2015-11-02 Thread Chris Withers

Chris Withers added the comment:

Ah yes, I can see how Venusian would get confused.

How about making the check a more generic:

if attr.startswith('__'):
raise AttributeError(attr)

?

That said, why does call have a __getattr__? Where is that intended to be used?

--

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



testfixtures 4.3.3 Released!

2015-09-15 Thread Chris Withers
Sorry, the move to using Travis CI was not without bumps, and we're now 
on 4.3.3, which should be correctly built, including docs up on 
http://testfixtures.readthedocs.org/.


Apologies for the noise...

Chris

On 15/09/2015 14:54, Chris Withers wrote:

Hi All,

I'm pleased to announce the release of testfixtures 4.3.0. This is a 
feature release that adds the following:


- Add TempDirectory.compare with a cleaner, more explicit API that
  allows comparison of only the files in a temporary directory.

- Deprecate TempDirectory.check, TempDirectory.check_dir
  and TempDirectory.check_all

- Relax absolute-path rules so that if it's inside the TempDirectory,
  it's allowed.

- Allow OutputCapture to separately check output to stdout and
  stderr.

The package is on PyPI and a full list of all the links to docs, issue 
trackers and the like can be found here:


https://github.com/Simplistix/testfixtures

Any questions, please do ask on the Testing in Python list or on the 
Simplistix open source mailing list...


cheers,

Chris



--
https://mail.python.org/mailman/listinfo/python-list


testfixtures 4.3.0 Released!

2015-09-15 Thread Chris Withers

Hi All,

I'm pleased to announce the release of testfixtures 4.3.0. This is a 
feature release that adds the following:


- Add TempDirectory.compare with a cleaner, more explicit API that
  allows comparison of only the files in a temporary directory.

- Deprecate TempDirectory.check, TempDirectory.check_dir
  and TempDirectory.check_all

- Relax absolute-path rules so that if it's inside the TempDirectory,
  it's allowed.

- Allow OutputCapture to separately check output to stdout and
  stderr.

The package is on PyPI and a full list of all the links to docs, issue 
trackers and the like can be found here:


https://github.com/Simplistix/testfixtures

Any questions, please do ask on the Testing in Python list or on the 
Simplistix open source mailing list...


cheers,

Chris

--
Simplistix - Content Management, Batch Processing & Python Consulting
   - http://www.simplistix.co.uk
--
https://mail.python.org/mailman/listinfo/python-list


mush 2.0 released! - Type-based dependency injection for scripts

2015-12-11 Thread Chris Withers

Hi All,

I'm very happy to announce a new release of Mush, a light weight 
dependency injection framework aimed at enabling the easy testing and 
re-use of chunks of code that make up scripts.


This release is a re-write dropping all the heuristic callable ordering 
in favour of building up defined sequences of callables with labelled 
insertion points.


For a worked example of how to use Mush to reduce the copy'n'paste in 
your scripts, please see here:


http://mush.readthedocs.org/en/latest/examples.html

Full docs are here:

http://mush.readthedocs.org/

Downloads are here:

https://pypi.python.org/pypi/mush

Compatible with Python 2.7, 3.3+:

https://travis-ci.org/Simplistix/mush

Any problems, please give me a shout on the simplis...@googlegroups.com 
list!


cheers,

Chris

--
Simplistix - Content Management, Batch Processing & Python Consulting
- http://www.simplistix.co.uk
--
https://mail.python.org/mailman/listinfo/python-list


testfixtures 4.7.0 Released!

2015-12-10 Thread Chris Withers

Hi All,

I'm pleased to announce the release of testfixtures 4.7.0. Since 4.5.1, 
the following have been added:


- Add the ability to pass raises=False to compare() to just get
  the resulting message back rather than having an exception raised.

- Fix a bug that mean symlinked directories would never show up when
  using TempDirectory.compare() and friends.

- Add the `followlinks` parameter to TempDirectory.compare() to
  indicate that symlinked or hard linked directories should be recursed
  into when using `recursive=True`.

The package is on PyPI and a full list of all the links to docs, issue 
trackers and the like can be found here:


https://github.com/Simplistix/testfixtures

Any questions, please do ask on the Testing in Python list or on the 
Simplistix open source mailing list...


cheers,

Chris

--
Simplistix - Content Management, Batch Processing & Python Consulting
   - http://www.simplistix.co.uk
--
https://mail.python.org/mailman/listinfo/python-list


[issue25532] infinite loop when running inspect.unwrap over unittest.mock.call

2015-11-18 Thread Chris Withers

Chris Withers added the comment:

Cool, what needs to happen for __wrapped__ in to be blacklisted in call?

Separately, inspect.unwrap probably needs to use something less fragile than a 
set of ids to track whether it's stuck in a loop. What is the actual usecase 
for __wrapped__ how deeply nested can those realistically expected to be?

--

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



testfixtures 4.5.1 Released!

2015-11-22 Thread Chris Withers

Hi All,

I'm pleased to announce the release of testfixtures 4.5.1. This release 
that contains:


- LogCapture, OutputCapture and TempDirectory
  explicitly show what is expected versus actual when reporting
  differences as of 4.5.0.

- The 4.5.1 release contains a bugfix where OutputCapture couldn't
  handle capturing unicode.

Thanks to Daniel Fortunov for the expected vs actual changes.

Thanks to "tell-k" for the bugfix.

The package is on PyPI and a full list of all the links to docs, issue 
trackers and the like can be found here:


https://github.com/Simplistix/testfixtures

Any questions, please do ask on the Testing in Python list or on the 
Simplistix open source mailing list...


cheers,

Chris

--
Simplistix - Content Management, Batch Processing & Python Consulting
   - http://www.simplistix.co.uk
--
https://mail.python.org/mailman/listinfo/python-list


xlrd 1.0.0 released!

2016-06-02 Thread Chris Withers

Ugh, and once again, this time with a corrected title...


On 02/06/2016 18:56, Chris Withers wrote:

Hi All,

Well, I've finally called it and tagged current master of xlrd as 1.0.0:

http://pypi.python.org/pypi/xlrd/1.0.0

This release includes the following changes since the last release:

- Official support, such as it is, is now for 2.6, 2.7, 3.3+

- Fixes a bug in looking up non-lowercase sheet filenames by ensuring 
that the sheet targets are transformed the same way as the 
component_names dict keys.


- Fixes a bug for ragged_rows=False when merged cells increases the 
number of columns in the sheet. This requires all rows to be extended 
to ensure equal row lengths that match the number of columns in the 
sheet.


- Fixes to enable reading of SAP-generated .xls files.

- support BIFF4 files with missing FORMAT records.

- support files with missing WINDOW2 record.

- Empty cells are now always unicode strings, they were a bytestring 
on Python2 and a unicode string on Python3.


- Fix for  inlineStr attribute without  child.

- Fix for a zoom of None causes problems on Python 3.

- Fix parsing of bad dimensions.

- Fix xlsx sheet->comments relationship.

Thanks to the following for their contributions to this release:

- Lars-Erik Hannelius
- Deshi Xiao
- Stratos Moro
- Volker Diels-Grabsch
- John McNamara
- Ville Skyttä
- Patrick Fuller
- Dragon Dave McKee
- Gunnlaugur Þór Briem

If you find any problems, please ask about them on the 
python-ex...@googlegroups.com list, or submit an issue on GitHub:


https://github.com/python-excel/xlrd/issues

Full details of all things Python and Excel related can be found here:

http://www.python-excel.org/

NB: If you would like to become the maintainer of xlwt, please get in 
touch! Neither myself nor John Machin have much time to drive things 
forward nowadays, hence the year or so between each release...


cheers,

Chris



--
https://mail.python.org/mailman/listinfo/python-list


xlrd 0.9.4 released!

2016-06-02 Thread Chris Withers

Hi All,

Well, I've finally called it and tagged current master of xlrd as 1.0.0:

http://pypi.python.org/pypi/xlrd/1.0.0

This release includes the following changes since the last release:

- Official support, such as it is, is now for 2.6, 2.7, 3.3+

- Fixes a bug in looking up non-lowercase sheet filenames by ensuring 
that the sheet targets are transformed the same way as the 
component_names dict keys.


- Fixes a bug for ragged_rows=False when merged cells increases the 
number of columns in the sheet. This requires all rows to be extended to 
ensure equal row lengths that match the number of columns in the sheet.


- Fixes to enable reading of SAP-generated .xls files.

- support BIFF4 files with missing FORMAT records.

- support files with missing WINDOW2 record.

- Empty cells are now always unicode strings, they were a bytestring on 
Python2 and a unicode string on Python3.


- Fix for  inlineStr attribute without  child.

- Fix for a zoom of None causes problems on Python 3.

- Fix parsing of bad dimensions.

- Fix xlsx sheet->comments relationship.

Thanks to the following for their contributions to this release:

- Lars-Erik Hannelius
- Deshi Xiao
- Stratos Moro
- Volker Diels-Grabsch
- John McNamara
- Ville Skyttä
- Patrick Fuller
- Dragon Dave McKee
- Gunnlaugur Þór Briem

If you find any problems, please ask about them on the 
python-ex...@googlegroups.com list, or submit an issue on GitHub:


https://github.com/python-excel/xlrd/issues

Full details of all things Python and Excel related can be found here:

http://www.python-excel.org/

NB: If you would like to become the maintainer of xlwt, please get in 
touch! Neither myself nor John Machin have much time to drive things 
forward nowadays, hence the year or so between each release...


cheers,

Chris

--
Simplistix - Content Management, Batch Processing & Python Consulting
 - http://www.simplistix.co.uk
--
https://mail.python.org/mailman/listinfo/python-list


xlwt 1.1.1 released!

2016-06-02 Thread Chris Withers

Hi All,

I'm pleased to announce the release of xlwt 1.1.1.

This release contains the following:

- Fix SST BIFF record in Python 3.

- Fix for writing ExternSheetRecord in Python 3.

- Add the ability to insert bitmap images from buffers as well as files.

- Official support for Python 3.5.

Thanks to "thektulu" and Lele Gaifax for the Python 3 fixes.
Thanks to Ross Golder for the support for inserting images from buffers.

If you find any problems, please ask about them on the 
python-ex...@googlegroups.com list, or submit an issue on GitHub:


https://github.com/python-excel/xlwt/issues

There's also details of all things Python and Excel related here:

http://www.python-excel.org/

NB: If you would like to become the maintainer of xlwt, please get in 
touch! Neither myself nor John Machin have much time to drive things 
forward nowadays, hence the year or so between each release...


cheers,

Chris

--
Simplistix - Content Management, Batch Processing & Python Consulting
 - http://www.simplistix.co.uk
--
https://mail.python.org/mailman/listinfo/python-list


errorhandler 2.0.0 Released!

2016-06-06 Thread Chris Withers

Hi All,

errorhandler is a tiny but useful logging handler for the python logging 
framework. It lets you tell when logging above a certain level has 
occurred, even if it's not in code you can control.


I'm pleased to announce the release of errorhandler 2.0.0 featuring the 
following:


- Support for Python 3

- Documentation on Read The Docs

- Continuous testing using Travis CI

- Code coverage reporting through Coveralls

The package is on PyPI and a full list of all the links to docs, issue 
trackers and the like can be found here:


https://github.com/Simplistix/errorhandler

Any questions, please do ask on the Testing in Python list or on the 
Simplistix open source mailing list...


cheers,

Chris

--
Simplistix - Content Management, Batch Processing & Python Consulting
- http://www.simplistix.co.uk
--
https://mail.python.org/mailman/listinfo/python-list


[issue27244] print(';;') fails in pdb with SyntaxError

2016-06-06 Thread Chris Withers

New submission from Chris Withers:

This doesn't seem right:

(Pdb) ';;'
*** SyntaxError: EOL while scanning string literal
*** SyntaxError: EOL while scanning string literal
(Pdb) p ';;'
*** SyntaxError: EOL while scanning string literal
*** SyntaxError: EOL while scanning string literal
(Pdb) !print(';;')
*** SyntaxError: EOL while scanning string literal
*** SyntaxError: EOL while scanning string literal

--
components: Library (Lib)
messages: 267549
nosy: cjw296
priority: normal
severity: normal
status: open
title: print(';;') fails in pdb with SyntaxError
versions: Python 3.4

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



xlwt 1.1.2 released!

2016-06-08 Thread Chris Withers

Hi All,

I'm pleased to announce the release of xlwt 1.1.2.

This release contains the following:

- Fix failure in style compression under Python 3.

- Documentation tweaks.

If you find any problems, please ask about them on the 
python-ex...@googlegroups.com list, or submit an issue on GitHub:


https://github.com/python-excel/xlwt/issues

There's also details of all things Python and Excel related here:

http://www.python-excel.org/

NB: If you would like to become the maintainer of xlwt, please get in 
touch! Neither myself nor John Machin have much time to drive things 
forward nowadays, hence the year or so between each release...


cheers,

Chris

--
Simplistix - Content Management, Batch Processing & Python Consulting
  - http://www.simplistix.co.uk
--
https://mail.python.org/mailman/listinfo/python-list


xlutils 2.0.0 released!

2016-06-08 Thread Chris Withers

Hi All,

I'm pleased to announce the release of xlutils 2.0.0:

http://pypi.python.org/pypi/xlutils/2.0.0

This release has a couple of small changes:

- Updated documentation.

- Move to virtualenv/pip based development.

- Move to Read The Docs for documentation.

- Use Travis CI for testing and releases.

- Use features of newer testfixtures in
  xlutils.view.CheckerView.

- Python 3 compatibility.

Full docs here:

http://xlutils.readthedocs.org/

Details of all things Python and Excel related can be found here:

http://www.python-excel.org/

cheers,

Chris

--
Simplistix - Content Management, Batch Processing & Python Consulting
 - http://www.simplistix.co.uk
--
https://mail.python.org/mailman/listinfo/python-list


testfixtures 4.8.0 Released!

2016-02-02 Thread Chris Withers

Hi All,

I'm pleased to announce the release of testfixtures 4.8.0 featuring the 
following:


- More succinct mocking with Replacer:

For setUp usage:

class MyTests(TestCase):

def setUp(self):
replace = Replacer()
replace('x.y.z', Mock())
self.addCleanup(replace.restore)

For one-shot context manager usage:

with Replace('x.y.z', Mock()) as the_mock:
...

Multi-replace context manager usage:

with Replacer() as replace:
dt = replace('x.y.z.datetime', test_datetime())
mock = replace('x.y.do_it', Mock())

- Two context managers for testing warnings:

with ShouldWarn(UserWarning("foo")):
warnings.warn('foo')

with ShouldNotWarn():
... code that should raise no warnings ...

The package is on PyPI and a full list of all the links to docs, issue 
trackers and the like can be found here:


https://github.com/Simplistix/testfixtures

Any questions, please do ask on the Testing in Python list or on the 
Simplistix open source mailing list...


cheers,

Chris

--
Simplistix - Content Management, Batch Processing & Python Consulting
   - http://www.simplistix.co.uk
--
https://mail.python.org/mailman/listinfo/python-list


testfixtures 4.8.0 Released!

2016-02-18 Thread Chris Withers

Hi All,

I'm pleased to announce the release of testfixtures 4.9.0 featuring the 
following:


- Suffixes and well as prefixes for compare() assertion errors.

- Appropriate metadata to indicate official support for Python 3.5.

Thanks for Felix Yan for the metadata patch.

Thanks to Wim Glenn for the suffix patch.

The package is on PyPI and a full list of all the links to docs, issue 
trackers and the like can be found here:


https://github.com/Simplistix/testfixtures

Any questions, please do ask on the Testing in Python list or on the 
Simplistix open source mailing list...


cheers,

Chris

--
Simplistix - Content Management, Batch Processing & Python Consulting
   - http://www.simplistix.co.uk
--
https://mail.python.org/mailman/listinfo/python-list


Re: [TIP] testfixtures 4.8.0 Released!

2016-02-19 Thread Chris Withers

On 18/02/2016 22:35, Mark Lawrence wrote:

On 18/02/2016 22:27, Chris Withers wrote:

Hi All,

I'm pleased to announce the release of testfixtures 4.9.0 featuring the
following:



4.8.0 or 4.9.0, that is the question, or should it be just how good is 
your version control? :)


Gah, I really need to automate the release emails to stop stupidity like 
that :-S


It's 4.9.0...

Chris
--
https://mail.python.org/mailman/listinfo/python-list


testfixtures 4.10.0 Released!

2016-05-17 Thread Chris Withers

Hi All,

I'm pleased to announce the release of testfixtures 4.10.0 featuring the 
following:


- Fixed examples in documentation broken in 4.5.1.

- Add RangeComparison for comparing against values that fall in a
  range.

- Add MockPopen.set_default().

Thanks to Asaf Peleg for the RangeComparison implementation.

The package is on PyPI and a full list of all the links to docs, issue 
trackers and the like can be found here:


https://github.com/Simplistix/testfixtures

Any questions, please do ask on the Testing in Python list or on the 
Simplistix open source mailing list...


cheers,

Chris

--
Simplistix - Content Management, Batch Processing & Python Consulting
   - http://www.simplistix.co.uk
--
https://mail.python.org/mailman/listinfo/python-list


testfixtures 4.10.1 Released!

2016-09-05 Thread Chris Withers

Hi All,

I'm pleased to announce the release of testfixtures 4.10.1 featuring the 
following:


- Better docs for TempDirectory.compare().

- Remove the need for expected paths supplied to
  TempDirectory.compare() to be in sorted order.

- Document a good way of restoring stdout when in a debugger.

- Fix handling of trailing slashes in TempDirectory.compare().

Thanks to Maximilian Albert for the TempDirectory.compare() docs.

The package is on PyPI and a full list of all the links to docs, issue 
trackers and the like can be found here:


https://github.com/Simplistix/testfixtures

Any questions, please do ask on the Testing in Python list or on the 
Simplistix open source mailing list...


cheers,

Chris
--
https://mail.python.org/mailman/listinfo/python-list


testfixtures 4.12.0 Released!

2016-10-18 Thread Chris Withers

Hi All,

I'm pleased to announce the release of testfixtures 4.12.0 featuring the 
following:


- Add support for specifying a callable to extract rows from log records
  when using LogCapture().

- Add support for recursive comparison of log messages with
  LogCapture().

The package is on PyPI and a full list of all the links to docs, issue 
trackers and the like can be found here:


https://github.com/Simplistix/testfixtures

Any questions, please do ask on the Testing in Python list or on the 
Simplistix open source mailing list...


cheers,

Chris
--
https://mail.python.org/mailman/listinfo/python-list


mush 2.4.0 released! - Type-based dependency injection for scripts

2016-11-17 Thread Chris Withers

Hi All,

I'm very happy to announce the a new release of Mush, a light weight 
dependency injection framework aimed at enabling the easy testing and 
re-use of chunks of code that make up scripts.


This release includes:

- Add support for cloning depending on what label was used to add
  callables.

- Add Runner.add_label() helper to just add a label at the end of the
  runner.

- Document and flesh out Plugs.

- Switch to full Semantic Versioning.

For a worked example of how to use Mush to reduce the copy'n'paste in 
your scripts, please see here:


http://mush.readthedocs.io/en/latest/examples.html

Full docs are here:

http://mush.readthedocs.io/en/latest/index.html

Downloads are here:

https://pypi.python.org/pypi/mush

Compatible with Python 2.7, 3.3+ on Linux, Mac OS X and Windows.

Any problems, please give me a shout on the simplis...@googlegroups.com 
list!


cheers,

Chris
--
https://mail.python.org/mailman/listinfo/python-list


testfixtures 4.13.0 Released!

2016-11-02 Thread Chris Withers

Hi All,

I'm pleased to announce the release of testfixtures 4.13.0 featuring the 
following:


- Add support to compare() for ignoring broken __eq__
  implementations, such as that found in the Django ORM!

The package is on PyPI and a full list of all the links to docs, issue 
trackers and the like can be found here:


https://github.com/Simplistix/testfixtures

Any questions, please do ask on the Testing in Python list or on the 
Simplistix open source mailing list...


cheers,

Chris
--
https://mail.python.org/mailman/listinfo/python-list


testfixtures 4.11.0 Released!

2016-10-12 Thread Chris Withers

Hi All,

I'm pleased to announce the release of testfixtures 4.10.1 featuring the 
following:


- Allow the attributes returned in LogCapture.actual() rows to be
  specified.

- Allow a default to be specified for encoding in TempDirectory.read() 
and TempDirectory.write().


The package is on PyPI and a full list of all the links to docs, issue 
trackers and the like can be found here:


https://github.com/Simplistix/testfixtures

Any questions, please do ask on the Testing in Python list or on the 
Simplistix open source mailing list...


cheers,

Chris
--
https://mail.python.org/mailman/listinfo/python-list


Re: [TIP] testfixtures 4.11.0 Released!

2016-10-12 Thread Chris Withers

*sigh*, it's 4.11.0 that was released with these changes...

On 12/10/2016 17:06, Chris Withers wrote:

Hi All,

I'm pleased to announce the release of testfixtures 4.10.1 featuring 
the following:


- Allow the attributes returned in LogCapture.actual() rows to be
  specified.

- Allow a default to be specified for encoding in TempDirectory.read() 
and TempDirectory.write().


The package is on PyPI and a full list of all the links to docs, issue 
trackers and the like can be found here:


https://github.com/Simplistix/testfixtures

Any questions, please do ask on the Testing in Python list or on the 
Simplistix open source mailing list...


cheers,

Chris

___
testing-in-python mailing list
testing-in-pyt...@lists.idyll.org
http://lists.idyll.org/listinfo/testing-in-python


--
https://mail.python.org/mailman/listinfo/python-list


testfixtures 5.1.0 released!

2017-06-08 Thread Chris Withers

Hi All,

I'm pleased to announce the release of testfixtures 5.1.0 featuring the 
following:


 * Added support for including non-editable fields to the|comparer|used
   by|compare()|when comparing/django/|Model|instances.

The package is on PyPI and a full list of all the links to docs, issue 
trackers and the like can be found here:


https://github.com/Simplistix/testfixtures

Any questions, please do ask on the Testing in Python list or on the 
Simplistix open source mailing list...


cheers,

Chris
--
https://mail.python.org/mailman/listinfo/python-list


Sybil 1.0.0 Released!

2017-05-26 Thread Chris Withers

Hi All,

I'm pleased to announce the first release of Sybil, a library to help 
you test the examples in your documents.


For example, given the following Sphinx source file:

Sample Documentation


Let's put something in the Sybil document's namespace:

.. invisible-code-block: python

  remember_me = b'see how namespaces work?'

Suppose we define a function, convoluted and pointless but shows
stuff nicely:

.. code-block:: python

  import sys

  def prefix_and_print(message):
  print('prefix:', message.decode('ascii'))

Now we can use a doctest REPL to show it in action:

>>> prefix_and_print(remember_me)
prefix: see how namespaces work?

The namespace carries across from example to example, no matter
what parser:

>>> remember_me
b'see how namespaces work?'


All the examples can be tested when using pytest by putting the 
following in a conftest.py in your Sphinx source directory:


from doctest import ELLIPSIS
from sybil import Sybil
from sybil.parsers.codeblock import CodeBlockParser
from sybil.parsers.doctest import DocTestParser, FIX_BYTE_UNICODE_REPR

pytest_collect_file = Sybil(
parsers=[
DocTestParser(optionflags=ELLIPSIS|FIX_BYTE_UNICODE_REPR),
CodeBlockParser(future_imports=['print_function']),
],
pattern='*.rst',
).pytest()

The package is on PyPI and a full list of all the links to docs, issue 
trackers and the like can be found here:


https://github.com/cjw96/sybil

Any questions, please do ask on the Testing in Python list or on the 
Simplistix open source mailing list...


cheers,

Chris

PS: The name comes from Fawlty Towers, as this package is heavily 
inspired by Benji York's fantastic Manuel package, which also took it's 
name from the series!

--
https://mail.python.org/mailman/listinfo/python-list


Re: Sybil 1.0.0 Released!

2017-05-30 Thread Chris Withers

On 27/05/2017 00:56, Skip Montanaro wrote:


On Fri, May 26, 2017 at 2:34 AM, Chris Withers <ch...@simplistix.co.uk
<mailto:ch...@simplistix.co.uk>> wrote:

The package is on PyPI and a full list of all the links to docs,
issue trackers and the like can be found here:

https://github.com/cjw96/sybil

Chris,

The GitHub URL 404s for me.


Sorry, forgot to include the Python list:

Well that's embarrassing :'$

https://github.com/cjw296/sybil

My next package will be one for testing release notes...

Chris
--
https://mail.python.org/mailman/listinfo/python-list


Sybil 1.0.1 Released!

2017-05-30 Thread Chris Withers

Hi All,

I'm pleased to announce a new release of Sybil, a library to help you 
test the examples in your documentation.


This release fixes a bug where unicode and byte literals weren't 
corrected in doctest tracebacks, event when FIX_BYTE_UNICODE_REPR

was specified.

The package is on PyPI and a full list of all the links to docs, issue 
trackers and the like can be found here:


https://github.com/cjw296/sybil

Any questions, please do ask on the Testing in Python list or on the 
Simplistix open source mailing list...


cheers,

Chris
--
https://mail.python.org/mailman/listinfo/python-list


testfixtures 5.0.0 released!

2017-06-05 Thread Chris Withers

Hi All,

I'm pleased to announce the release of testfixtures 5.0.0 featuring the 
following:


 * Move fromnose topytest
   for running tests.
 * Switch frommanuel tosybil
   for checking examples in
   documentation. This introduces a backwards incompatible change in
   that|FileParser|replaces the Manuel plugin that is no longer included.
 * Add a ‘tick’ method to|test_datetime|,|test_date|and|test_time|, to
   advance the returned point in time, which is particularly helpful
   when|delta|is set to zero.

The package is on PyPI and a full list of all the links to docs, issue 
trackers and the like can be found here:


https://github.com/Simplistix/testfixtures

Any questions, please do ask on the Testing in Python list or on the 
Simplistix open source mailing list...


cheers,

Chris
--
https://mail.python.org/mailman/listinfo/python-list


mush 2.7 released! - Type-based dependency injection for scripts

2017-09-07 Thread Chris Withers

Hi All,

I'm very happy to announce the a new release of Mush, a light weight 
dependency injection framework aimed at enabling the easy testing and 
re-use of chunks of code that make up scripts.


This release includes:

- Add support for using Python 3 type annotations to specify 
requirements and returned resources.


- Add support for arg names being used as requirements when there is no 
other configuration.


- Add an explicit way of ignoring the return value of a callable.

- Add an update_wrapper() helper that extends the standard library 
version but also preserves Mush's annotations.


For a worked example of how to use Mush to reduce the copy'n'paste in 
your scripts, please see here:


http://mush.readthedocs.io/en/latest/examples.html

Full docs are here:

http://mush.readthedocs.io/en/latest/index.html

Downloads are here:

https://pypi.python.org/pypi/mush

Compatible with Python 2.7, 3.4+ on Linux, Mac OS X and Windows.

Any problems, please give me a shout on the simplis...@googlegroups.com 
list!


cheers,

Chris
--
https://mail.python.org/mailman/listinfo/python-list


xlrd 1.1.0 and xlwt 1.3.0 released!

2017-08-22 Thread Chris Withers

Hi All,

I'm pleased to announce the release of xlrd 1.1.0 and xlwt 1.3.0. Please 
consult their change logs on readthedocs.org to see what's new.


As before, I will be upfront  and say you should no longer be using 
these unless libraries unless you have a particular need to work with 
.xls files. If you only work with .xlsx files, and that's the only Excel 
format you should look to create nowadays, then

you should be using openpyxl instead.

This is open source, so none of xlrd, xlwt or xlutils are going away,
just be aware that if you have problems, you'll likely need to be the
one to do the work, read the specs, read the code, and propose fixes.
Until someone better comes forward, I'll still be gatekeeper for merging 
 pull requests along with John Machin, and I'll be looking for tests 
and descriptive code changes before doing so. Stability is of utmost 
importance in these now mature packages.


If you have a passion to maintain any of these libraries, please make
yourself known, and prove you're serious about it.

cheers,

Chris

--
Simplistix - Content Management, Batch Processing & Python Consulting
  - http://www.simplistix.co.uk
--
https://mail.python.org/mailman/listinfo/python-list


testfixtures 5.2.0 released!

2017-09-03 Thread Chris Withers
   Hi All,

   I'm pleased to announce the release of testfixtures 5.2.0 featuring the
   following:

 * test_datetime and test_time now  accept a [1]datetime instance  during
   instantiation to set the initial value.
 * test_date now accepts a  [2]date instance during instantiation to  set
   the initial value.
 *Relax the restriction on adding, setting or
   instantiatingtest_datetimewithtzinfosuchthatif
   the tzinfo matches  the one configured,  then it's okay  to add.  This
   means  that  you   can  now  instantiate   a  test_datetime  with   an
   existing [3]datetime instance that has tzinfo set.
 * testfixtures.django.compare_model() now ignores [4]many to many fields
   rather than blowing up on them.
 * Drop official support for Python 3.4, although things should  continue
   to work.

   The package is on PyPI and a full list of all the links to docs, issue
   trackers and the like can be found here:

   [5]https://github.com/Simplistix/testfixtures

   Any questions, please do ask on the Testing in Python list or on the
   Simplistix open source mailing list...

   cheers,

   Chris

References

   Visible links
   1. (in Python v2.7)
https://docs.python.org/2/library/datetime.html#datetime.datetime
   2. (in Python v2.7)
https://docs.python.org/2/library/datetime.html#datetime.date
   3. (in Python v2.7)
https://docs.python.org/2/library/datetime.html#datetime.datetime
   4. (in Django v2.0)

http://django.readthedocs.io/en/latest/ref/models/fields.html#django.db.models.ManyToManyField
   5. https://github.com/Simplistix/testfixtures
-- 
https://mail.python.org/mailman/listinfo/python-list


MailingLogger 5.0.0 Released!

2018-05-30 Thread Chris Withers

Hi All,

I'm pleased to announce the release of MailingLogger 5.0.0.

Mailinglogger provides two handlers for the standard python
logging framework that enable log entries to be emailed either as the
entries are logged or as a summary at the end of the running process.

The handlers have the following features:

- customisable and dynamic subject lines for emails sent

- emails sent with a configurable headers for easy filtering

- flood protection to ensure the number of emails sent is not excessive

- support for SMTP servers that require authentication

- fully documented and tested

This release primarily adds support for Python 3.

Thanks to Max Shepherd for breaking the back of the Python 3 work.

Full docs can be found here:

http://mailinglogger.readthedocs.io/en/latest/

For more information, please see:

https://github.com/Simplistix/mailinglogger/

cheers,

Chris
--
https://mail.python.org/mailman/listinfo/python-list


testfixtures 6.0.2 released - important bug fix!

2018-05-02 Thread Chris Withers

Hi All,

I'm afraid I've found quite a serious regression in the 6.x series of 
testfixtures releases:


Objects that had neither __dict__ nor __slots__ would always be 
considered equal by compare().
I hit this comparing datetimes, but this would also affect types 
provides by extensions in other languages such as C or C++.
This did not affect built-in types such as dict, set, tuple and list as 
they have specific comparers provided that were not affects.


I've released 6.0.2 to fix this and would urge anyone using 6.0.0 or 
6.0.1 to upgrade as soon as possible.


The package is on PyPI and a full list of all the links to docs, issue 
trackers and the like can be found here:


https://github.com/Simplistix/testfixtures

Any questions, please do ask on the Testing in Python list or on the 
Simplistix open source mailing list...


cheers,

Chris
--
https://mail.python.org/mailman/listinfo/python-list


testfixtures 5.3.0 released!

2017-10-28 Thread Chris Withers

Hi All,

I'm pleased to announce the release of testfixtures 5.3.0 featuring the 
following:


 * Add pytest traceback hiding for|TempDirectory.compare()|.
 * Add warnings that|log_capture()|,|tempdir()|and|replace()|are not
   currently compatible with pytest’s fixtures mechanism.
 * Better support for|stdout|or|stderr|/not/being set to|PIPE|when
   using|MockPopen|.
 * Add support to|MockPopen|for using|subprocess.Popen|
   as
   a context manager in Python 3.
 * Add support to|MockPopen|for|stderr=STDOUT|.

Thanks to Tim Davies for his work on|MockPopen|.

The package is on PyPI and a full list of all the links to docs, issue 
trackers and the like can be found here:


https://github.com/Simplistix/testfixtures

Any questions, please do ask on the Testing in Python list or on the 
Simplistix open source mailing list...


cheers,

Chris
--
https://mail.python.org/mailman/listinfo/python-list


MailingLogger 4.0.0 Released!

2018-01-26 Thread Chris Withers
Only 4 years later than planned, I'm pleased to announce a new release 
of MailingLogger...


Mailinglogger provides two handlers for the standard python
logging framework that enable log entries to be emailed either as the
entries are logged or as a summary at the end of the running process.

The handlers have the following features:

- customisable and dynamic subject lines for emails sent

- emails sent with a configurable headers for easy filtering

- flood protection to ensure the number of emails sent is not excessive

- support for SMTP servers that require authentication

- fully documented and tested

This release has a bunch of changes:

- Drop Zope and Plone support

- Drop ZConfig support

- Removed the deprecated "ignore" parameter to
  MailingLogger and SummarisingLogger.

- Move from zope.testrunner to pytest for running tests.

- Switch from manuel to sybil for checking examples in
  documentation.

- Moved from buildout to virtualenv for development.

- Gracefully handle bugs elsewhere that call SummarisingLogger.close()
  more than once in a multi-threaded or multi-process environment.

Full docs can be found here:

http://mailinglogger.readthedocs.io/en/latest/

For more information, please see:

https://github.com/Simplistix/mailinglogger/

cheers,

Chris
--
https://mail.python.org/mailman/listinfo/python-list


testfixtures 6.0.0 released!

2018-03-27 Thread Chris Withers

Hi All,

I'm pleased to announce the release of testfixtures 6.0.0 featuring the 
following:


 * |compare()|
   
will
   now handle objects that do not natively support equality or
   inequality and will treat these objects as equal if they are of the
   same type and have the same attributes as found using|vars()|
   or|__slots__|.
   This is a change in behaviour which, while it could conceivably
   cause tests that are currently failing to pass, should not cause any
   currently passing tests to start failing.
 * Add support for writing to the|stdin|of|MockPopen|
   
instances.
 * The default behaviour of|MockPopen|
   
can
   now be controlled by providing a callable.
 * |LogCapture.actual()|
   
is
   now part of the documented public interface.
 * Add|LogCapture.check_present()|
   
to
   help with assertions about a sub-set of messages logged along with
   those that are logged in a non-deterministic order.
 * |Comparison|
   
now
   supports objects with|__slots__|.
 * Added|ShouldAssert|
   
as
   a simpler tool for testing test helpers.
 * Changed the internals of the various decorators testfixtures
   provides such that they can be used in conjunction
   with|unittest.mock.patch()|
   on
   the same test method or function.
 * Changed the internals of|ShouldRaise|
   
and|Comparison|
   
to
   make use of|compare()|
   
and
   so provide nested comparisons with better feedback. This finally
   allows|ShouldRaise|
   
to
   deal with Django’s|ValidationError|
   
.
 * Added handling of self-referential structures to|compare()|
   
by
   treating all but the first occurence as equal. Another change needed
   to support Django’s insane|ValidationError|
   
.

Thanks to Hamish Downer and Tim Davies for their work on|MockPopen| 
.


Thanks to Wim Glenn and Daniel Fortunov for their help reviewing some of 
the more major changes.


The package is on PyPI and a full list of all the links to docs, issue 
trackers and the like can be found here:


https://github.com/Simplistix/testfixtures

Any questions, please do ask on the Testing in Python list or on the 
Simplistix open source mailing list...


cheers,

Chris
--
https://mail.python.org/mailman/listinfo/python-list


[issue35226] mock.call equality surprisingly broken

2018-11-13 Thread Chris Withers


New submission from Chris Withers :

$ python3
Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 26 2018, 23:26:24) 
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from unittest.mock import call
>>> call(x=1) == call(x=2)
False

Good so far?

>>> call(x=1).foo == call(x=2).foo
True

Eep, I think a lot of people might find that quite surprising!

--
assignee: michael.foord
components: Tests
messages: 329813
nosy: cjw296, michael.foord
priority: normal
severity: normal
status: open
title: mock.call equality surprisingly broken
type: behavior
versions: Python 2.7, Python 3.7, Python 3.8

___
Python tracker 
<https://bugs.python.org/issue35226>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35226] mock.call equality surprisingly broken

2018-11-13 Thread Chris Withers


Chris Withers  added the comment:

I don't think the getattr(self, 'parent', None) is necessary, the attribute is 
always there and None == None ;-)

I reckon this will work:

if self.parent != other.parent):
return True

...but obviously, we'd add some more tests to the suite to make sure this keeps 
working.

If this is the way to go, lemme know and I'll work up a PR.

--

___
Python tracker 
<https://bugs.python.org/issue35226>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35226] mock.call equality surprisingly broken

2018-11-13 Thread Chris Withers


Chris Withers  added the comment:

I'm chatting with Michael already (on Facebook of all places), and I use this 
feature heavily and deeply, being one of the people who originally requested it.

I'm both happy and capable of seeing this through, so no need for anyone else 
to dive in :-)

Hopefully Michael will follow up when he gets a chance...

--

___
Python tracker 
<https://bugs.python.org/issue35226>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35226] mock.call equality surprisingly broken

2018-11-14 Thread Chris Withers


Chris Withers  added the comment:

Assuming the PR is merged, what do I need to do for 3.7 and 3.6 backports?
There's no doubt a doc for this somewhere, so please just point me at it :-)

--

___
Python tracker 
<https://bugs.python.org/issue35226>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20239] Allow repeated deletion of unittest.mock.Mock attributes

2019-01-21 Thread Chris Withers


Chris Withers  added the comment:


New changeset 222d303ade8aadf0adcae5190fac603bdcafe3f0 by Chris Withers (Pablo 
Galindo) in branch 'master':
bpo-20239: Allow repeated deletion of unittest.mock.Mock attributes (#11057)
https://github.com/python/cpython/commit/222d303ade8aadf0adcae5190fac603bdcafe3f0


--

___
Python tracker 
<https://bugs.python.org/issue20239>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20239] Allow repeated deletion of unittest.mock.Mock attributes

2019-01-21 Thread Chris Withers


Chris Withers  added the comment:


New changeset d358a8cda75446a8e0b5d99149f709395d5eae19 by Chris Withers (Miss 
Islington (bot)) in branch '3.7':
bpo-20239: Allow repeated deletion of unittest.mock.Mock attributes (GH-11629)
https://github.com/python/cpython/commit/d358a8cda75446a8e0b5d99149f709395d5eae19


--

___
Python tracker 
<https://bugs.python.org/issue20239>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26704] unittest.mock.patch: Double patching instance method: AttributeError: Mock object has no attribute '__name__'

2018-12-10 Thread Chris Withers


Chris Withers  added the comment:

Before we get too far: what's the use case for this double patching?

--

___
Python tracker 
<https://bugs.python.org/issue26704>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24928] mock.patch.dict spoils order of items in collections.OrderedDict

2018-12-10 Thread Chris Withers


Chris Withers  added the comment:

More tests are generally a good thing, so go for it :-)

--

___
Python tracker 
<https://bugs.python.org/issue24928>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28054] Diff for visually comparing actual with expected in mock.assert_called_with.

2018-12-10 Thread Chris Withers


Chris Withers  added the comment:

This is a tricky one as there's plenty of prior art, with pytest's assertion 
rewriting [1], testfixtures compare [2] and the stuff that unittest already 
does [3].

I don't think any solution should rely on a TestCase being used as pytest, 
which is the most prevalent testing framework now, doesn't want to rely on them 
(they do come with a lot of baggage ;-)).

Can we make use of the pretty diffing stuff in unittest without explicitly 
making it a requirement?

[1] https://docs.pytest.org/en/latest/assert.html

[2] https://testfixtures.readthedocs.io/en/latest/comparing.html#dicts

[3] 
https://docs.python.org/3.8/library/unittest.html#unittest.TestCase.assertDictEqual

--

___
Python tracker 
<https://bugs.python.org/issue28054>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17185] unittest mock create_autospec doesn't correctly replace mocksignature

2018-12-11 Thread Chris Withers


Chris Withers  added the comment:


New changeset f7fa62ef4422c9deee050a794fd8504640d9f8f4 by Chris Withers 
(Xtreak) in branch 'master':
bpo-17185: Add __signature__ to mock that can be used by inspect for signature 
(GH11048)
https://github.com/python/cpython/commit/f7fa62ef4422c9deee050a794fd8504640d9f8f4


--

___
Python tracker 
<https://bugs.python.org/issue17185>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26704] unittest.mock.patch: Double patching instance method: AttributeError: Mock object has no attribute '__name__'

2018-12-12 Thread Chris Withers


Change by Chris Withers :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue26704>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17185] unittest mock create_autospec doesn't correctly replace mocksignature

2018-12-11 Thread Chris Withers


Change by Chris Withers :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue17185>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17185] unittest mock create_autospec doesn't correctly replace mocksignature

2018-12-12 Thread Chris Withers


Chris Withers  added the comment:


New changeset 6a12931c9cb5d472fe6370dbcd2bde72f34dddb4 by Chris Withers (Miss 
Islington (bot)) in branch '3.7':
bpo-17185: Add __signature__ to mock that can be used by inspect for signature 
(GH11125)
https://github.com/python/cpython/commit/6a12931c9cb5d472fe6370dbcd2bde72f34dddb4


--

___
Python tracker 
<https://bugs.python.org/issue17185>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32153] mock.create_autospec fails if an attribute is a partial function

2018-12-12 Thread Chris Withers


Chris Withers  added the comment:

Yep! Good catch :-)

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue32153>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26704] unittest.mock.patch: Double patching instance method: AttributeError: Mock object has no attribute '__name__'

2018-12-10 Thread Chris Withers


Chris Withers  added the comment:

Ah, yeah, I can see the blanket patch and a more local patch in a monorepo 
being a thing, cool, let's have a look!

--

___
Python tracker 
<https://bugs.python.org/issue26704>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35500] Align expected and actual calls on mock.assert_called_with error message

2018-12-24 Thread Chris Withers


Change by Chris Withers :


--
Removed message: https://bugs.python.org/msg332462

___
Python tracker 
<https://bugs.python.org/issue35500>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35500] Align expected and actual calls on mock.assert_called_with error message

2018-12-24 Thread Chris Withers


Change by Chris Withers :


--
Removed message: https://bugs.python.org/msg332464

___
Python tracker 
<https://bugs.python.org/issue35500>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35226] mock.call equality surprisingly broken

2018-11-27 Thread Chris Withers

Chris Withers  added the comment:

Éric, doesn't look like I can add labels, what needs to happen for me to do so? 
(I was/am a core developer, just an extremely inactive one ;-), but happy to 
jump through whatever hoops necessary... )

--

___
Python tracker 
<https://bugs.python.org/issue35226>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35357] unittest.mock.call can't represent calls to a method called 'parent'

2018-12-04 Thread Chris Withers


Chris Withers  added the comment:


New changeset 70ca3fce9fe2bdd7bf97d5fe1299cfa5e32b3ad4 by Chris Withers (Miss 
Islington (bot)) in branch '3.6':
bpo-35357: Add _mock_ prefix to name/parent/from_kall attributes of 
_Call/_MagicProxy. (GH-10873)
https://github.com/python/cpython/commit/70ca3fce9fe2bdd7bf97d5fe1299cfa5e32b3ad4


--

___
Python tracker 
<https://bugs.python.org/issue35357>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35357] unittest.mock.call can't represent calls to a method called 'parent'

2018-12-04 Thread Chris Withers


Chris Withers  added the comment:


New changeset 12735c14134082584b899308af8dd8fcc9f15696 by Chris Withers (Miss 
Islington (bot)) in branch '3.7':
bpo-35357: Add _mock_ prefix to name/parent/from_kall attributes of 
_Call/_MagicProxy. (GH-10873) (#10887)
https://github.com/python/cpython/commit/12735c14134082584b899308af8dd8fcc9f15696


--

___
Python tracker 
<https://bugs.python.org/issue35357>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35357] unittest.mock.call can't represent calls to a method called 'parent'

2018-12-04 Thread Chris Withers


Change by Chris Withers :


--
stage: patch review -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue35357>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35357] unittest.mock.call can't represent calls to a method called 'parent'

2018-12-04 Thread Chris Withers


Chris Withers  added the comment:


New changeset e63e617ebbe481c498bdf037a62e09f4f9f3963f by Chris Withers (Andrew 
Dunai) in branch 'master':
bpo-35357: Add _mock_ prefix to name/parent/from_kall attributes of 
_Call/_MagicProxy. (#10873)
https://github.com/python/cpython/commit/e63e617ebbe481c498bdf037a62e09f4f9f3963f


--

___
Python tracker 
<https://bugs.python.org/issue35357>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35330] When using mock to wrap an existing object, side_effect requires return_value

2018-12-08 Thread Chris Withers


Chris Withers  added the comment:


New changeset f05df0a4b679d0acfd0b1fe6187ba2d553b37afa by Chris Withers (Mario 
Corchero) in branch 'master':
bpo-35330:  Don't call the wrapped object if `side_effect` is set (GH10973)
https://github.com/python/cpython/commit/f05df0a4b679d0acfd0b1fe6187ba2d553b37afa


--

___
Python tracker 
<https://bugs.python.org/issue35330>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35330] When using mock to wrap an existing object, side_effect requires return_value

2018-12-08 Thread Chris Withers


Change by Chris Withers :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue35330>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35330] When using mock to wrap an existing object, side_effect requires return_value

2018-12-08 Thread Chris Withers


Chris Withers  added the comment:


New changeset ee2c5a8e2dcf662048dbcf4e49af9b4aaf81f7d3 by Chris Withers (Miss 
Islington (bot)) in branch '3.7':
bpo-35330:  Don't call the wrapped object if `side_effect` is set (GH11035)
https://github.com/python/cpython/commit/ee2c5a8e2dcf662048dbcf4e49af9b4aaf81f7d3


--

___
Python tracker 
<https://bugs.python.org/issue35330>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35330] When using mock to wrap an existing object, side_effect requires return_value

2018-12-08 Thread Chris Withers


Chris Withers  added the comment:


New changeset 12b9fb603eea9298c835bae5b8742db4fa52892e by Chris Withers (Miss 
Islington (bot)) in branch '3.6':
bpo-35330:  Don't call the wrapped object if `side_effect` is set (GH11034)
https://github.com/python/cpython/commit/12b9fb603eea9298c835bae5b8742db4fa52892e


--

___
Python tracker 
<https://bugs.python.org/issue35330>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35357] unittest.mock.call can't represent calls to a method called 'parent'

2018-12-03 Thread Chris Withers


Chris Withers  added the comment:

Not sure I follow the second option, I was thinking of just _mock_parent and 
_mock_name when I logged this.

Happy to see a PR for either though!

--

___
Python tracker 
<https://bugs.python.org/issue35357>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35357] unittest.mock.call can't represent calls to a method called 'parent'

2018-12-03 Thread Chris Withers


Chris Withers  added the comment:

Go for it! :-)

--

___
Python tracker 
<https://bugs.python.org/issue35357>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35226] mock.call equality surprisingly broken

2018-12-03 Thread Chris Withers


Chris Withers  added the comment:


New changeset 8ca0fa9d2f4de6e69f0902790432e0ab2f37ba68 by Chris Withers in 
branch 'master':
bpo-35226: Fix equality for nested unittest.mock.call objects. (#10555)
https://github.com/python/cpython/commit/8ca0fa9d2f4de6e69f0902790432e0ab2f37ba68


--

___
Python tracker 
<https://bugs.python.org/issue35226>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35357] unittest.mock.call can't represent calls to a method called 'parent'

2018-11-29 Thread Chris Withers


New submission from Chris Withers :

While working on https://bugs.python.org/issue35226, I stumbled upon this:

>>> from unittest.mock import call
>>> call.parent()
Traceback (most recent call last):
  File "", line 1, in 
TypeError: 'NoneType' object is not callable

Guess we need to make .parent and friends more uniquely named ;-)

--
assignee: cjw296
messages: 330757
nosy: cjw296, mariocj89, michael.foord
priority: normal
severity: normal
status: open
title: unittest.mock.call can't represent calls to a method called 'parent'

___
Python tracker 
<https://bugs.python.org/issue35357>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35226] mock.call equality surprisingly broken

2018-12-03 Thread Chris Withers


Chris Withers  added the comment:


New changeset e8f9e4785caeef8a68bb7859280e91a4cb424b79 by Chris Withers (Miss 
Islington (bot)) in branch '3.7':
bpo-35226: Fix equality for nested unittest.mock.call objects. (GH-10555)
https://github.com/python/cpython/commit/e8f9e4785caeef8a68bb7859280e91a4cb424b79


--

___
Python tracker 
<https://bugs.python.org/issue35226>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35226] mock.call equality surprisingly broken

2018-12-03 Thread Chris Withers


Chris Withers  added the comment:


New changeset 67e6136a6d5c07141d4dba820c450a70db7aedd5 by Chris Withers (Miss 
Islington (bot)) in branch '3.6':
bpo-35226: Fix equality for nested unittest.mock.call objects. (GH-10555)
https://github.com/python/cpython/commit/67e6136a6d5c07141d4dba820c450a70db7aedd5


--

___
Python tracker 
<https://bugs.python.org/issue35226>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35226] mock.call equality surprisingly broken

2018-12-03 Thread Chris Withers


Change by Chris Withers :


--
stage: patch review -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue35226>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17185] unittest mock create_autospec doesn't correctly replace mocksignature

2018-12-03 Thread Chris Withers


Chris Withers  added the comment:

xtreak - great to see action on this! First step would be to add a unit test 
for the failure case I reported. I like the tests you have too, but would be 
good to see the specific failure case covered too.

Beyond that, if we can get all the the new tests passing, then I'd say you're 
there!

--
versions: +Python 3.6, Python 3.7

___
Python tracker 
<https://bugs.python.org/issue17185>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32153] mock.create_autospec fails if an attribute is a partial function

2018-12-03 Thread Chris Withers


Chris Withers  added the comment:


New changeset 1ef06c62d3c05cbba6448c56af30a09c551c9ec2 by Chris Withers (Miss 
Islington (bot)) in branch '3.7':
bpo-32153: Add unit test for create_autospec with partial function returned in 
getattr (GH-10398) (#10855)
https://github.com/python/cpython/commit/1ef06c62d3c05cbba6448c56af30a09c551c9ec2


--

___
Python tracker 
<https://bugs.python.org/issue32153>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32153] mock.create_autospec fails if an attribute is a partial function

2018-12-02 Thread Chris Withers


Chris Withers  added the comment:


New changeset c667b094ae37799a7e42ba5cd2ad501cc7920888 by Chris Withers 
(Xtreak) in branch 'master':
bpo-32153: Add unit test for create_autospec with partial function returned in 
getattr (#10398)
https://github.com/python/cpython/commit/c667b094ae37799a7e42ba5cd2ad501cc7920888


--
nosy: +cjw296

___
Python tracker 
<https://bugs.python.org/issue32153>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



testfixtures 6.4.0 released - important bug fix! (again)

2018-12-19 Thread Chris Withers
   Hi All,

   I'm afraid I found quite a [1]serious problem with unittest.mock.call
   objects that is important for users of testfixtures' MockPopen helper.

   This release includes a monkey patch to fix that issue as well as a facade
   over both unittest.mock and the rolling backport on pypi, giving
   preference to the latter, so you don't have to change your code if you
   need to flip to the rolling backport for a while when waiting to a bug fix
   to land in Python core.

   This release also include:

 * Add official support for Python 3.7.
 * Drop official support for Python 3.5.
 * Better feedback when [2]call() comparisons fail when using compare().
 * A re-working of  MockPopen to enable it  to handle multiple  processes
   being active at the same time.
 * Fixes to Mocking dates and times documentation.

   The package is on PyPI and a full list of all the links to docs, issue
   trackers and the like can be found here:

   [3]https://github.com/Simplistix/testfixtures

   Any questions, please do ask on the Testing in Python list or on the
   Simplistix open source mailing list...

   cheers,

   Chris

References

   Visible links
   1. https://bugs.python.org/issue35226
   2. (in Python v3.7)
https://docs.python.org/3/library/unittest.mock.html#unittest.mock.call
   3. https://github.com/Simplistix/testfixtures
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue35512] patch.dict resolves in_dict eagerly (should be late resolved)

2019-02-25 Thread Chris Withers


Chris Withers  added the comment:


New changeset ea199b90bb61866cd3c2f154341d1eb0d5c4a710 by Chris Withers (Miss 
Islington (bot)) in branch '3.7':
bpo-35512: Resolve string target to patch.dict decorator during function call 
GHGH-12000 (#12021)
https://github.com/python/cpython/commit/ea199b90bb61866cd3c2f154341d1eb0d5c4a710


--

___
Python tracker 
<https://bugs.python.org/issue35512>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35512] patch.dict resolves in_dict eagerly (should be late resolved)

2019-02-24 Thread Chris Withers


Chris Withers  added the comment:


New changeset a875ea58b29fbf510f9790ae1653eeaa47dc0de8 by Chris Withers 
(Xtreak) in branch 'master':
bpo-35512: Resolve string target to patch.dict decorator during function call 
GH#12000
https://github.com/python/cpython/commit/a875ea58b29fbf510f9790ae1653eeaa47dc0de8


--

___
Python tracker 
<https://bugs.python.org/issue35512>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21269] Provide args and kwargs attributes on mock call objects

2019-03-22 Thread Chris Withers


Chris Withers  added the comment:


New changeset b0df45e55dc8304bac0e3cad0225472b84190964 by Chris Withers (Kumar 
Akshay) in branch 'master':
bpo-21269: Provide args and kwargs attributes on mock call objects GH11807
https://github.com/python/cpython/commit/b0df45e55dc8304bac0e3cad0225472b84190964


--

___
Python tracker 
<https://bugs.python.org/issue21269>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37107] ensurepip --upgrade doesn't change the version of pip used by venv

2019-05-31 Thread Chris Withers


New submission from Chris Withers :

$ python3.7 -m ensurepip --upgrade
Looking in links: /var/folders/m6/tsd59qsj7pd_lldh4mhwh6khgn/T/tmpqk_vncev
Requirement already up-to-date: setuptools in 
/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages 
(39.0.1)
Requirement already up-to-date: pip in 
/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages 
(18.1)

But:

$ python3.7 -m venv /tmp/test_venv
$ /tmp/test_venv/bin/pip --version
pip 10.0.1 from /private/tmp/test_venv/lib/python3.7/site-packages/pip (python 
3.7)

--
components: Library (Lib)
messages: 344029
nosy: cjw296
priority: normal
severity: normal
status: open
title: ensurepip --upgrade doesn't change the version of pip used by venv
versions: Python 3.7

___
Python tracker 
<https://bugs.python.org/issue37107>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37107] ensurepip --upgrade doesn't change the version of pip used by venv

2019-06-09 Thread Chris Withers


Chris Withers  added the comment:

I don't suppose there's any chance we can treat the misnaming of these options 
as the bugs they feel like, so so fix them for 3.7+, rather than having people 
battle on with the confusion for another 3+ years until 3.9 is mainstream?

--

___
Python tracker 
<https://bugs.python.org/issue37107>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



mock 3.0.0 released

2019-05-02 Thread Chris Withers

Hi All,

I'm pleased to announce the release of mock 3.0.0:
https://pypi.org/project/mock/

This brings to rolling backport up to date with cpython master.

It's been a few years since the last release, so I'd be surprised if 
there weren't some problems.

If you hit any issues, please pin to mock<3 and then:

- If your issue relates to mock functionality, please report in the 
python tracker: https://bugs.python.org


- If your issue is specific to the backport, please report here: 
https://github.com/testing-cabal/mock/issues


If you're unsure, go for the second one and we'll figure it out.

cheers,

Chris
--
https://mail.python.org/mailman/listinfo/python-list


drop jython support in mock backport?

2019-04-30 Thread Chris Withers

Hi All,

If you need Jython support in the mock backport, please shout now:

https://github.com/testing-cabal/mock/issues/453

cheers,

Chris
--
https://mail.python.org/mailman/listinfo/python-list


[issue31855] mock_open is not compatible with read(n) (and pickle.load)

2019-05-07 Thread Chris Withers

Chris Withers  added the comment:


New changeset 11a8832c98b3db78727312154dd1d3ba76d639ec by Chris Withers (Rémi 
Lapeyre) in branch 'master':
bpo-31855: unittest.mock.mock_open() results now respects the argument of 
read([size]) (GH-11521)
https://github.com/python/cpython/commit/11a8832c98b3db78727312154dd1d3ba76d639ec


--

___
Python tracker 
<https://bugs.python.org/issue31855>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31855] mock_open is not compatible with read(n) (and pickle.load)

2019-05-07 Thread Chris Withers


Chris Withers  added the comment:


New changeset a6516f89aa0f416c7514ac364bb48ac7d1455487 by Chris Withers (Miss 
Islington (bot)) in branch '3.7':
bpo-31855: unittest.mock.mock_open() results now respects the argument of 
read([size]) (GH-11521) (#13152)
https://github.com/python/cpython/commit/a6516f89aa0f416c7514ac364bb48ac7d1455487


--

___
Python tracker 
<https://bugs.python.org/issue31855>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36848] autospec fails with AttributeError when mocked class has __signature__ non-writeable

2019-05-08 Thread Chris Withers


Chris Withers  added the comment:

We only attempt to set __signature__ on Mocks, so I don't think extensions will 
be a problem.

I do think there's a bit of code smell on that method: it's called _check_* and 
then changes some attributes, that might be worth fixing?

--

___
Python tracker 
<https://bugs.python.org/issue36848>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36848] autospec fails with AttributeError when mocked class has __signature__ non-writeable

2019-05-08 Thread Chris Withers


Chris Withers  added the comment:

Wow, is this just an issue that the pyside guys need to fix?

--

___
Python tracker 
<https://bugs.python.org/issue36848>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36848] autospec fails with AttributeError when mocked class has __signature__ non-writeable

2019-05-08 Thread Chris Withers


Chris Withers  added the comment:

I'm not sure we should try and work around this; hijacking __signature__ 
python-wide is going to cause a bunch of other problems. My vote would be to 
just open a bug on the pyside tracker (wherever that is) and close the issue 
and and on the backport by pointing to that issue.

thoughts?

--

___
Python tracker 
<https://bugs.python.org/issue36848>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21820] unittest: unhelpful truncating of long strings.

2019-05-08 Thread Chris Withers


Change by Chris Withers :


--
versions: +Python 3.7, Python 3.8, Python 3.9 -Python 3.4

___
Python tracker 
<https://bugs.python.org/issue21820>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



<    1   2   3   4   5   6   >