testfixtures 3.0.1 Released!

2013-06-10 Thread Chris Withers

Hi All,

I'm pleased to announce the release of testfixtures 3.0.1. This is a bug 
fix release featuring the following changes:


- Some documentation tweaks and clarifications.

- Fixed a bug which masked exceptions when using compare() with a broken 
generator.


- Fixed a bug when comparing a generator with a non-generator.

- Ensure LogCapture cleans up global state it may effect.

- Fixed replacement of static methods using a Replacer.

If you haven't bumped into it already, testfixtures is a collection of 
helpers for writing succinct unit tests including help for:


- Comparing objects and sequences

Better feedback when the results aren't as you expected along with 
support for comparison of objects that don't normally support comparison.


- Mocking out objects and methods

Easy to use ways of stubbing out objects, classes or individual methods 
for both doc tests and unit tests. Special helpers are provided for 
testing with dates and times.


- Testing logging

Helpers for capturing logging output in both doc tests and unit tests.

- Testing stream output

Helpers for capturing stream output, such as that from print statements, 
and making assertion about it.


- Testing with files and directories

Support for creating and checking files and directories in sandboxes for 
both doc tests and unit tests.


- Testing exceptions

Easy to use ways of checking that a certain exception is raised, even 
down the to the parameters the exception is raised with.


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
--
http://mail.python.org/mailman/listinfo/python-list


xlrd 0.7.9 released!

2012-06-20 Thread Chris Withers

Hi All,

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

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

This release fixes an annoying merge bug on my part that resulted in a 
"NameError: global name 'BYTES_X00' is not defined" error where opening 
certain Excel files.


Barring any more brown bag issues, this will be the last release in the 
0.7 series and the last release supporting Python 2.1 and 2.2.


The next release, in a week or so if there are no further 0.7 problems, 
will be 0.8.0 targeting Python 2.6 and upwards and featuring support for 
reading data from .xlsx files (although not formatting, unless some 
sponsorship or patches turn up). If you're interested in this, it would 
be great if you could try out the master branch and let us know if you 
find any problems:


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

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

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

cheers,

Chris

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


Re: using SQLalchemy

2012-06-22 Thread Chris Withers

On 21/06/2012 11:50, andrea crotti wrote:

We have a very chaotic database (on MySql) at the moment, with for
I'm trying to use SQLalchemy and it looks absolutely great, but in
general as a policy we don't use external dependencies..


That's a very foolish general policy, a lot of the power of python is in 
the huge array of excellent third party libraries and frameworks, but 
each to their own...



To try to do an exception in this case:
- are there any problems with SQLalchemy on Windows?


No.


- are there any possibly drawbacks of using SQLalchemy instead of the
   MySqlDB interface?


You won't be using it instead of mysqldb, you'll be using it as a layer 
over mysqldb.



   For the second point I guess that we might have a bit less fine
   tuning,


Not so, any tuning you can do direct against the dbapi driver can still 
be done through SQLAalchemy.



   Any other possible issue?


If you have problems, I'd suggest asking on the sqlalchemy mailing list:

http://groups.google.com/group/sqlalchemy

cheers,

Chris

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


Re: JOB

2012-06-26 Thread Chris Withers

Sonika,

On 26/06/2012 01:34, Sonika Sardana wrote:

`

===

**Job Description**:

Short description of position Looking for a strong PHP developer who is
comfortable with some Linux administration and open to learning Python
and Java too.


Please do not spam the lists, especially with jobs that aren't even 
python focused...


Chris

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


Re: 转发:Re:how can I implement "cd" like shell in Python?

2012-06-29 Thread Chris Withers

On 28/06/2012 12:39, 梦幻草 wrote:


thanks !But this method can not change the directory of the main
process.For example:
the current directory is "/home/work/local/scripts",this directory have
a python script file "cd.py"
after executing the script cd.py by "python cd.py ..",the current work
directory has no changes,the path is still "/home/work/local/scripts"


Sounds like you might want to give the ipython shell a go, since it has 
a lot of this already implemented.


cheers,

Chris

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


xlrd 0.8.0 released!

2012-08-01 Thread Chris Withers

Hi All,

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

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

This release finally lands the support for both .xls and .xlsx files.
Many thanks to John Machin for all his work on making this happen.
Opening of .xlsx files is seamless, just use xlrd as you did before and 
it all should "just work".


xlrd 0.8.0 is also the first release that that targets Python 2.6 and 
2.7, but no Python 3 just yet. Python 2.5 and below may work but are not 
supported. If you need to use Python 2.5 or earlier, please stick to 
xlrd 0.7.x.


Speaking of xlrd 0.7.x, that's now in "requested maintenance only" mode 
;-) That means, if possible, use 0.8.x. If you have a really good reason 
for sticking with 0.7.x, and you find a bug that you can't work around, 
then please make this clear on the python-ex...@googlegroups.com and 
we'll see what we can do.


If you find any problems, please ask about them on the 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
--
http://mail.python.org/mailman/listinfo/python-list


testfixtures 2.3.5 Released!

2012-08-13 Thread Chris Withers

Hi All,

I'm pleased to announce the release of testfixtures 2.3.5. testfixtures 
is a collection of helpers for writing succinct unit tests including 
help for:


- Comparing objects and sequences

Better feedback when the results aren't as you expected along with 
support for comparison of objects that don't normally support comparison.


- Mocking out objects and methods

Easy to use ways of stubbing out objects, classes or individual methods 
for both doc tests and unit tests. Special helpers are provided for 
testing with dates and times.


- Testing logging

Helpers for capturing logging output in both doc tests and unit tests.

- Testing stream output

Helpers for capturing stream output, such as that from print statements, 
and making assertion about it.


- Testing with files and directories

Support for creating and checking files and directories in sandboxes for 
both doc tests and unit tests.


- Testing exceptions

Easy to use ways of checking that a certain exception is raised, even 
down the to the parameters the exception is raised with.


This release fixes a small bug that meant failures in dictionary 
comparison didn't always produce the same output. (It was correct, just 
partly unsorted)


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
--
http://mail.python.org/mailman/listinfo/python-list


Re: xlrd 0.8.0 released!

2012-08-22 Thread Chris Withers

On 22/08/2012 15:03, Hubert Holin wrote:

I would like to keep up with the development but would like to know
which is the repo to follow. The Python-Excel website points to
https://github.com/python-excel/xlrd, but that one does not have a 0.8.0
tag (or at least did not have one when I looked a few days ago, and I
unfortunately can't check now, from work).


Oops, I was very bad... not only did I forget to push the tag (it's 
annoying that you have to do a "git push --tags" to get tasg pushed) but 
I actually forgot to commit the final change that stamped on the 0.8.0 
version number :-S


Fixed and pushed now, thanks for noticing :-)

Chris

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


Re: Is Python a commercial proposition ?

2012-08-24 Thread Chris Withers

On 30/07/2012 03:31, Rodrick Brown wrote:

Hence the reason why no one will seriously look at Python for none
glue work or simple web apps.  When it comes to designing complex
applications that need to exploit large multicore systems Python just
isn't an option.

Its still not possible to be a pure Python developer and find gainful
employment today.


Oh come on, are you *actually* serious?

Pretty much everything you've said is nothing but inept bullshit.
Please stop.

Chris

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


Re: [pyxl] xlrd-0.8.0 .xlsx formatting_info=True not implemented

2012-08-30 Thread Chris Withers

On 30/08/2012 03:57, python-ex...@raf.org wrote:


hopefully the intention that xlrd not support formats in xlsx
files will change one day into an intention to support them. :-)


The intention is there, sadly the time to work on it is not.

John Machin would be the person best placed to do the work, if anyone 
fancies sponsoring the work, he might be able to direct more time to it..


cheers,

Chris

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


Re: Context manager to save/restore a name binding

2012-08-31 Thread Chris Withers

Hi Ben,

On 31/08/2012 03:36, Ben Finney wrote:

That way, I can set ‘sys.dont_write_bytecode’ to the value I need in
this part of the code, knowing that however the code continues the
previous value of that setting will be restored to whatever it was
before I touched it.

Have I re-invented a context manager which already exists? Is there a
better way to do what ‘preserve_value’ is doing?


Depends on the context (ho ho..), but if it's testing, then have a look at:

http://packages.python.org/testfixtures/mocking.html#the-context-manager

There's plenty of other goodies you may like in there too...

cheers,

Chris

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


Re: Unittest - testing for filenames and filesize

2012-08-31 Thread Chris Withers

On 23/08/2012 12:25, Tigerstyle wrote:

class FileTest(unittest.TestCase):

 def setUp(self):
 self.origdir = os.getcwd()
 self.dirname = tempfile.mkdtemp("testdir")
 os.chdir(self.dirname)


I wouldn't change directories like this, it's pretty fragile, just use 
absolute paths.



 def test_1(self):
 "Verify creation of files is possible"
 for filename in ("this.txt", "that.txt", "the_other.txt"):
 f = open(filename, "w")
 f.write("Some text\n")
 f.close()
 self.assertTrue(f.closed)

 def test_2(self):
 "Verify that current directory is empty"
 self.assertEqual(glob.glob("*"), [], "Directory not empty")

 def tearDown(self):
 os.chdir(self.origdir)
 shutil.rmtree(self.dirname)


Seeing this, you might find the following tools useful:

http://packages.python.org/testfixtures/files.html

cheers,

Chris

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


metaclass question

2012-09-24 Thread Chris Withers

Hi All,

Is there a metaclass-y way I could cause the following:

class TheParser(Parser):
def handle_ARecord(self):
pass
def handle_ARecord(self):
pass

...to raise an exception as a result of the 'handle_ARecord' name being 
reused?


cheers,

Chris

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


xlrd 0.9.0 released, now with Python 3 support!

2013-01-31 Thread Chris Withers

Hi All,

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

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

This release means the supported versions of Python supported by xlrd 
are 2.6, 2.7, 3.2 and 3.3!


Very exciting stuff, and a massive thank you to
Thomas Kluyver (@takluyver on GitHub) for doing the bulk of the work to 
make this happen.


Also thanks to Martin Panter (@vadmium in GitHub, if I'm following 
correctly) for his additional work on the pull request and Manfred 
Moitzi for re-licensing his unit tests so we could include them.


This is obviously a big release, so I wouldn't recommend jumping on it 
in production just yet, but it would be great if people could get 
testing on both Python 2 and Python 3.


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
--
http://mail.python.org/mailman/listinfo/python-list


Re: Jobs for developers

2012-01-25 Thread Chris Withers

On 24/01/2012 19:02, Rima Al-Sheikh wrote:

Hi There,

  We are looking to hire talented developers to join different teams..


Please use the job board rather than spamming the mailing list:

http://www.python.org/community/jobs/

cheers,

Chris

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


Re: python logging filter limitation, looks intentional?

2012-01-28 Thread Chris Withers

On 20/01/2012 20:09, Terry Reedy wrote:

version upgrade. The proposed change isn't a new feature, it's a
request for an existing feature to work differently.


Thank you for the clarification. I had not gotten that the request was
for a change, which has a much higher bar to pass than feature
additions.


To be clear, I wasn't asking for a change to existing behaviour, I was 
asking for the addition of an option that would allow the logging 
framework to behave as most people would expect when it comes to filters ;-)


cheers,

Chris

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


Re: Job Opportunity: Software Engineers at growing start-up! (Philadelphia, PA area)

2012-01-28 Thread Chris Withers

On 26/01/2012 19:09, GardnerJessica wrote:

We’re looking for talented engineers who are interested in working on
hard problems.


Please don't spam the list with jobs, use the job board:

http://www.python.org/community/jobs/howto/

cheers,

Chris

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


TestFixtures 2.3.4 Released!

2012-01-31 Thread Chris Withers

Hi All,

I'm very happy to announce the first TestFixtures release built after a 
continuous integration testing process.


The main benefit of this is that TestFixtures now works with Python 2.5 
and Python 2.7. I thought they did before, but there were some annoying 
niggles.


The CI stuff can all be seen here:

http://jenkins.simplistix.co.uk/

...with the specific build pipeline for TestFixtures here:

http://jenkins.simplistix.co.uk/view/testfixtures/

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
--
http://mail.python.org/mailman/listinfo/python-list


Re: Startup Chile Company Looking For Founding Developer/CTO

2012-02-02 Thread Chris Withers

On 01/02/2012 18:38, Jennifer Turliuk wrote:

My name is Jennifer Turliuk. I'm currently in Santiago, Chile for the
next 6 months as part of the Startup Chile program. I think you may be
able to help me out. We are looking to bring on a developer ASAP (see
description below).


Please don't spam the list with job adverts, please use the job board 
instead:


http://www.python.org/community/jobs/howto/

cheers,

Chris

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


xlwt 0.7.3 released!

2012-02-21 Thread Chris Withers

Hi All,

I'm pleased to announce the release of xlwt 0.7.3. This release is long 
overdue and has been over 2.5 years in the making!


The highlights:


- Added user_set and best_fit attributes to Column class.

- Fixed an "[Errno 0] Error" raised when Worksheet.flush_row_data() was 
called after Workbook.save()


- Fixed an error on Windows that occurred when writing large blocks to 
files.


- Added the ability to write rich text cells

- Fixed a bug when writing MULBLANK records on big-endian platforms.

- allow the active_pane on worksheets to be specified

- added support for zoom (magn) factors and improved possibilities when 
generating split panes


For a full list of the changes, please see the svn log:

https://secure.simplistix.co.uk/svn/xlwt/trunk

I've currently only put up .tar.gz sdists, if anyone requires anything 
else, please explain why and I'll be happy to add!


cheers,

Chris

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


xlrd 0.7.2 released!

2012-02-21 Thread Chris Withers

Hi All,

I'm pleased to announce the release of xlrd 0.7.2. This release, like 
the xlwt release, is long overdue and has been over 2.5 years in the making!


The highlights:

- All messaging and debug logging is now written to the logfile provided 
to open_workbook.


- Tolerant handling of file with non-standard compound document header

- Tolerant handling of files with extra zero bytes at end of NUMBER record

- Handle mostly-BIFF8 file with BIFF5-7 WINDOWS2 record

- Handle dodgy version 2.x .xls files.

- Added support for HYPERLINK extraction

- Added access to cell notes/comments.

- Enable reading files created by pyXLWriter -- puts BIFF8 MERGEDCELLS 
record in a BIFF5 file.


- Fixed a file-locking issue on Windows when an exception was raised in 
open_workbook() and on_demand was True


- Book objects are now context managers

- Rich text formatting information is now extracted

- Page breaks information is now extracted

- Some improvements in zoom factor handling

- PANE records are now processed

- Some memory and performance enhancements

For a full list of the changes, please see the svn log:

https://secure.simplistix.co.uk/svn/xlrd/trunk

I've currently only put up .tar.gz sdists, if anyone requires anything 
else, please explain why and I'll be happy to add!


cheers,

Chris

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


Re: xlwt 0.7.3 released!

2012-02-22 Thread Chris Withers

On 21/02/2012 11:02, Karim wrote:


Is there any chance that xlrd read .xlsx format


I believe this is planned for the next major release.


and arrive to decode
special unicode instead of firing some unicode Exception?


Not heard of this, I suggest you explain the problem you're having on 
the python-excel mailing list, as linked to from http://www.python-excel.org


cheers,

Chris

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


Re: [pyxl] xlrd 0.7.2 released!

2012-02-22 Thread Chris Withers

On 22/02/2012 00:37, python-ex...@raf.org wrote:

was good for previous versions. two reasons that spring to mind
immediately are:

  - it makes it much easier to tell what version is installed
  - it makes it much easier to uninstall the package

i know that both of these are things that the python community
does not yet seem to find useful but everyone else seems to.


That's because it's no longer best practice to polute the global python 
installation by installing packages directly into it.


The recommended wisdom nowadays is to use a virtualenv and then pip 
install the package.


I believe that will give you everything you need, please explain if it 
doesn't.


cheers,

Chris

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


Re: [pyxl] xlrd 0.7.2 released!

2012-02-23 Thread Chris Withers

On 22/02/2012 23:17, Adrian Klaver wrote:

I can see where that would be preferred when managing multiple versions of
Python, but not when using a single version.


Sorry, I don't agree. It is *never* a good idea to install packages 
globally. Using virtualenv or similar (buildout, etc) gives you a 
single, cross platform way of not ending up with a mess of a python 
installation where you have a bunch of libraries of random versions 
installed, often with no way of finding out what version they are or how 
to uninstall them.


Heaven forbid you want to use or develop more than one project per 
machine; then you end up with different projects needing different 
versions of the same libraries and you're screwed. ;-)



The pip system does a good job o
managing package installs in the global context.


Ask the pip maintainers whether they'd suggest using pip on the global 
system python or inside a virtualenv...



see the point. On Windows the installer is the point of entry for 'package'
management, going outside that can get confusing.


"Python" should be though of as the application, not any individual 
library...



I also understand setting up a
Windows installer is non-trivial.


It isn't a lot of work from what I remember, I just don't like 
encouraging bad practices...



offing, the OP might find it easier to use the Python packaging from here on 
out.


What is "the Python packaging" you refer to?


xlrd3 - Library for developers to extract data from
Microsoft Excel (tm) spreadsheet files
xlrd1 - library for extracting data from Microsoft Excel
spreadsheet files


I would avoid both of these like the plague, it's a shame the people who 
dumped them on PyPI don't put up a similar warning :-(


cheers,

Chris

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


Re: [pyxl] xlrd 0.7.2 released!

2012-02-23 Thread Chris Withers

On 23/02/2012 14:40, xlstime wrote:

Hi,

i want to learn pyxl  please help me...

kindly send useful information about pyxl


I would suggest:

- using your real name when posting
- reading the tutorial at http://www.python-excel.org/

cheers,

Chris

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


xlrd 0.7.3 released!

2012-02-28 Thread Chris Withers

Hi All,

I'm pleased to announce the release of xlrd 0.7.3.

This release just brings in some documentation updates that were missed 
for 0.7.2.


cheers,

Chris

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


Re: Adopting ‘lockfile’

2012-03-04 Thread Chris Withers

On 03/03/2012 21:43, Ben Finney wrote:

I don't see a need to horse around with Git either :-) It's currently in
Subversion, right? Can you not export the VCS history from Google Code's
Subversion repository to a ‘fastimport’ stream? Maybe someone with
experience on that site can help us.


What's wrong with a "git svn clone svn-url-here" ?

Chris

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


xlutils 1.5.0 released!

2012-03-05 Thread Chris Withers

Hi All,

I'm pleased to announce the release of xlutils 1.5.0, featuring the 
following changes:


- Now takes advantage of "ragged rows" optimisation in xlrd 0.7.3

- Add support for PANE records to xlutils.copy, which means that zoom
  factors are now copied.

The full change log is here:

http://www.simplistix.co.uk/software/python/xlutils/changes

Now, the other big change for this release is that development has moved 
to GitHub:


https://github.com/cjw296/xlutils

All the details of where to find mailing lists, issue trackers, and the 
like for xlutils can be found here:


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

cheers,

Chris

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


xlutils 1.5.1 released!

2012-03-05 Thread Chris Withers

Hi All,

xlutils 1.5.1 is out, fixing the usual embarrassing mistake I make when 
I move projects from Subversion to Git that results in some required 
non-.py files being omitted.


All the details of where to find mailing lists, issue trackers, and the 
like for xlutils can be found here:


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

cheers,

Chris

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


Re: Software Engineer -

2012-03-11 Thread Chris Withers

On 11/03/2012 09:00, Blue Line Talent wrote:

Blue Line Talent is looking for a mid-level software engineer with
experience in a combination of


Please don't spam this list with jobs, use the Python job board instead:

http://www.python.org/community/jobs/

cheers,

Chris

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


xlrd 0.7.4 released!

2012-04-03 Thread Chris Withers

Hi All,

I'm pleased to announce the release of xlrd 0.7.4.

This release features the following changes:

- Fixed a bug where xlrd was silently truncating long text formula results

- Avoid parsing STYLE records when formatting_info=False

- More tolerance of out-of-spec files.

- Minor performance improvements.

cheers,

Chris

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


Re: [pyxl] xlrd 0.7.4 released!

2012-04-03 Thread Chris Withers

On 03/04/2012 08:04, Chris Withers wrote:

Hi All,

I'm pleased to announce the release of xlrd 0.7.4.


*sigh*

As pointed out, I stuffed up the release by not including a new file in 
the MANIFEST. My bad.


I've just release a 0.7.5 that fixes this.

cheers,

Chris

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


Re: [pyxl] Re: xlrd 0.7.4 released!

2012-04-04 Thread Chris Withers

On 03/04/2012 21:46, Josh English wrote:

When I try to import xlrd, I get an error

IOError: [Errno 2] No such file or directory:
'C:\\Users\\josh\\Desktop\\Portable
Python\\App\\lib\\site-packages\\xlrd-0.7.5-py2.7.egg\\xlrd\\version.txt'


*sigh* I hate python packaging, I'll get a 0.7.6 release out this 
morning which will hopefully finally fix this...



I didn't think EGG files could be folders. Is there a change in the way
the EGG file was meant to be distributed?


Eggs have always been installed as folders.

cheers,

Chris

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


xlrd 0.7.6 released!

2012-04-04 Thread Chris Withers

And the goat sacrifice continues...

On 03/04/2012 08:34, Chris Withers wrote:

On 03/04/2012 08:04, Chris Withers wrote:

I'm pleased to announce the release of xlrd 0.7.4.

I've just release a 0.7.5 that fixes this.


Except it didn't, I've just released 0.7.6, which will hopefully bring 
an end to the brown-bagging.


Any more problems, please let the python-ex...@googlegroups.com mailing 
list know...


cheers,

Chris

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


Re: xlrd 0.7.6 released!

2012-04-04 Thread Chris Withers

On 04/04/2012 09:57, Karim wrote:

Hello,

This release manage the '.xlsx' format?


No, that is planned for the 0.8 release.

cheers,

Chris

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


Re: xlrd 0.7.6 released!

2012-04-05 Thread Chris Withers

On 04/04/2012 20:26, Karim wrote:

By the way, I reported an issue to you in this mailing list some time
ago about unicode data.


I have no recollection of this.

If you experience any bugs, the correct place to report them is:

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

cheers,

Chris

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


xlwt 0.7.4 released!

2012-04-13 Thread Chris Withers

Hi All,

I'm pleased to announce the release of xlwt 0.7.4. This release has only 
a couple of changes in it:


- Python 2.3 to 2.7 are now the officially supported versions, no Python 
3 yet, sorry.


- The datemode in an xlwt Workbook can be set to 1904 by doing 
`workbook.dates_1904 = 1` and is written to the output file. However the 
datemode was not being reflected in conversions from datetime.datetime 
and datetime.date objects to floats for output, resulting in dates that 
were 4 years too high when seen in Excel.


For a full details, please see the GitHub repository:

https://secure.simplistix.co.uk/svn/xlwt/trunk

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

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

cheers,

Chris

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


xlrd 0.7.7 released!

2012-04-13 Thread Chris Withers

Hi All,

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

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

This release features the following changes:

- Google Spreadsheet doesn't write the undefined-contents byte at the 
end of a NOTE record. Excel doesn't care. Now xlrd doesn't care either.


- Version information is now stored in a .py file, hopefully keeping 
py2exe and other freeze tools happy.


For a full details, please see the GitHub repository:

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

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

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

cheers,

Chris

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


Re: xlwt 0.7.4 released!

2012-04-13 Thread Chris Withers

On 13/04/2012 11:01, Chris Withers wrote:

For a full details, please see the GitHub repository:

https://secure.simplistix.co.uk/svn/xlwt/trunk


Er, that should be:

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

cheers,

Chris

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


xlutils 1.5.2 released!

2012-04-13 Thread Chris Withers

Hi All,

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

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

This release features the following changes:

- When using xlutils.copy, the datemode is now copied across from the 
source solving date problems with certain files.


- The errorhandler package is no longer a hard dependency

- As a minimum, xlrd 0.7.2 and xlwt 0.7.4 are now required.

All the details of where to find mailing lists, issue trackers, and the 
like for xlutils can be found here:


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

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

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

cheers,

Chris

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


Re: recruiter spam

2012-05-04 Thread Chris Withers

Please don't spam the list with job adverts, post to the job board instead:

http://www.python.org/community/jobs/howto/

cheers,

Chris

On 03/05/2012 22:13, Preeti Bhattad wrote:

Hi there,
If you have USA work visa and if you reside in USA;



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


Re: Please use the Python Job Board for recruiting

2012-05-23 Thread Chris Withers

On 23/05/2012 00:34, Dan Stromberg wrote:


I find it more than a little disappointing that the Python Job Board
doesn't do latitude and longitude.  It's a big missed opportunity.  Yes,
it's not an identical process from nation to nation, but it's still
important.


If you had experience of how incompetent the majority of recruiters are, 
you'd realise that this is a pretty futile hope ;-)


Chris

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


xlrd 0.7.8 released!

2012-06-07 Thread Chris Withers

Hi All,

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

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

This release features the following changes:

- Compatibility with Python 2.1 and 2.2 is restored.

- Fix for github issue #7: assertion error when reading file with 
xlwt-written bitmap. The assertion is now ignored and a warning logged 
if verbosity > 0.


- superfluous zero bytes at end of xls OBJECT records are now ignored.

For full details, please see the GitHub repository:

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

Barring any packaging issues or serious bugs, this will be the last 
release in the 0.7 series and the last release supporting Python 2.1 and 
2.2.


The next release, likely in a couple of weeks time, will be 0.8.0 
targeting Python 2.6 and upwards and featuring support for reading data 
from .xlsx files (although not formatting, unless some sponsorship or 
patches turn up). If you're interested in this, it would be great if you 
could try out the master branch and let us know if you find any problems:


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

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

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

cheers,

Chris

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


Re: Need a Python Developer...

2012-06-15 Thread Chris Withers

On 05/06/2012 19:18, o2kcompliant wrote:

Hi Guys,

I have a need for a Python Developer...


How about using the Python job board rather than spamming the mailing list:

http://www.python.org/community/jobs/howto/

cheers,

Chris

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


Re: [JOB] Python Programmer, Newport Beach, CA | 6-24 months - Relo OK

2011-06-20 Thread Chris Withers

On 09/06/2011 22:31, PHP Recruiter wrote:

This is a contract/hourly 6-24 month on-site Python Programming job
located in Newport Beach, CA paying $50.00 to $80.00 per hour
depending on experience.  Local candidates preferred, but all
considered.  Relocation expenses covered.


I'd suggest submitting to the Python Job Board:

http://www.python.org/community/jobs/howto/

cheers,

Chris

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


mortar_rdb 1.2.0 released!

2011-06-30 Thread Chris Withers

Hi All,

I'm pleased to announce a new release of mortar_rdb.

This package ties together SQLAlchemy, sqlalchemy-migrate and
the component architecture to make it easy to develop projects
using SQLAlchemy through their complete lifecycle.

Changes in this release were:

- Pass None as the default for echo rather than False on the
  advice of Daniel Holth.

- When using mortar_rdb.registerSession, allow exlicit
  disabling of two-phase commit.

- No longer log passwords during session registration.

- Specify sqlalchemy 0.6 as a requirement, until
  zope.sqlalchemy is ported, mortar_rdb shouldn't be
  used with :mod:`sqlalchemy` 0.7.

If you'd like to see what mortar_rdb can do for you, please have a read 
of the narrative usage docs, which give a quick run through of the 
lifespan of a project developers using mortar_rdb:


http://packages.python.org/mortar_rdb/use.html

Full package details including mailing list, irc and bug tracker details 
can be found here:


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

cheers,

Chris

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


Re: FULL TIME PYTHON DEVELOPER OPPORTUNITY IN CHICAGO, IL

2011-07-17 Thread Chris Withers

On 07/07/2011 21:48, Aimee Gerzofsky wrote:

Python Developer

Major financial clients is seeking a PythonDeveloper for a *full time
position in Chicago, IL*.


It's better to post this kind of thing to the python job board:

http://www.python.org/community/jobs/howto/

cheers,

Chris

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


TestFixtures 1.10.0 Released!

2011-07-19 Thread Chris Withers

Hi All,

I'm happy to announce a new release of TestFixtures with the following 
changes:


- Removed the dependency on zope.dottedname.

- Implement the ability to mock out dict and list
  items using testfixtures.Replacer and
  testfixtures.replace.

- Implement the ability to remove attributes and dict
  items using testfixtures.Replacer and
  testfixtures.replace.

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

cheers,

Chris

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


Re: TestFixtures 1.10.0 Released!

2011-07-19 Thread Chris Withers

Hmm, might have been helpful to include docs for these new bits:

On 19/07/2011 09:36, Chris Withers wrote:

- Implement the ability to mock out dict and list
items using testfixtures.Replacer and
testfixtures.replace.

- Implement the ability to remove attributes and dict
items using testfixtures.Replacer and
testfixtures.replace.


So, here they are:


http://packages.python.org/testfixtures/mocking.html#replacing-items-in-dictionaries-and-lists

http://packages.python.org/testfixtures/mocking.html#removing-attributes-and-dictionary-items

cheers,

Chris

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


TestFixtures 1.11.0 Released!

2011-07-27 Thread Chris Withers

Hi All,

I'm happy to announce a new release of TestFixtures with the following 
changes:


- testfixtures' compare function now does rich comparison of dicts and 
their subclasses, showing which keys matches, were missing or differed 
between the two objects being compared.


- A decorator of ShouldRaise called should_raise is now included:

http://packages.python.org/testfixtures/exceptions.html#the-should-raise-wrapper-function

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

cheers,

Chris

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


TestFixtures 1.12.0 Released!

2011-08-15 Thread Chris Withers

Hi All,

I'm happy to announce a new release of TestFixtures with the following 
changes:


- OutputCapture has grown a `captured` property and can now be
  temporarily disabled using their`disable` method:

  http://packages.python.org/testfixtures/streams.html

- Logging can now be captured only when it exceeds a specified logging
  level:


http://packages.python.org/testfixtures/logging.html#only-capturing-specific-logging

- The handling of timezones has been reworked in both
  `test_datetime` and `test_time`. This is not backwards
  compatible but is much more useful and correct:

  http://packages.python.org/testfixtures/datetime.html#timezones

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

cheers,

Chris

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


MailingLogger 3.4.0 Released!

2011-08-17 Thread Chris Withers

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 no functional changes but finally ships with a full new 
set of Sphinx docs:


http://packages.python.org/mailinglogger/

For more information, please see:
http://www.simplistix.co.uk/software/python/mailinglogger
or
http://pypi.python.org/pypi/mailinglogger

cheers,

Chris

--
Simplistix - Content Management, Zope & Python Consulting
   - http://www.simplistix.co.uk



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


Re: MailingLogger 3.4.0 Released!

2011-08-22 Thread Chris Withers
Heh, of course, I forgot the setuptools-git extension to make 
"include_package_data=True" work, so this release was pretty useless, 
other than the docs on packages.python.org/testfixtures ;-)


Anyway, 3.4.1 has now been released which fixes this!

cheers,

Chris

On 17/08/2011 23:37, Chris Withers wrote:

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 no functional changes but finally ships with a full new
set of Sphinx docs:

http://packages.python.org/mailinglogger/

For more information, please see:
http://www.simplistix.co.uk/software/python/mailinglogger
or
http://pypi.python.org/pypi/mailinglogger

cheers,

Chris



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


argparse: showing full help for subparsers

2011-08-31 Thread Chris Withers

Hi All,

If I have subparsers set up and do:

myscript.py --help

I get the summary for each of the top-level commands, but to get the 
help for each sub-command I have to do:


myscript.py subcommand --help

Is there any way I can get "myscript.py --help" to show the help 
hierarchically, including all options for all subcommands?


cheers,

Chris

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


Re: PC locks up with list operations

2011-08-31 Thread Chris Withers

On 31/08/2011 13:33, Steven D'Aprano wrote:

I am using Linux desktops; both incidents were with Python 2.5. Do newer
versions of Python respond to this sort of situation more gracefully?


Ironically, Windows does better here and dumps you out with a 
MemoryError before slowly recovering.


Linux seems to fair badly when programs use more memory than physically 
available. Perhaps there's some per-process thing that can be used to 
limit things on Linux?


cheers,

Chris

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


mortar_rdb 1.1.0 released!

2011-02-27 Thread Chris Withers

Hi All,

I'm pleased to announce a new release of mortar_rdb.

This package ties together SQLAlchemy, sqlalchemy-migrate and
the component architecture to make it easy to develop projects
using SQLAlchemy through their complete lifecycle.

This release allows you to register SessionExtensions with your sessions.

If you'd like to see what mortar_rdb can do for you, please have a read 
of the narrative usage docs, which give a quick run through of the 
lifespan of a project developers using mortar_rdb:


http://packages.python.org/mortar_rdb/use.html

Full package details including mailing list, irc and bug tracker details 
can be found here:


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

cheers,

Chris

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


TestFixtures 1.9.2 Released!

2011-04-20 Thread Chris Withers

Hi All,

I'm happy to announce a new release of TestFixtures.

This release adds a utcnow method to test_datetime that behaves 
identically to the now method:


http://packages.python.org/testfixtures/api.html#testfixtures.tdatetime.utcnow

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

cheers,

Chris

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


Re: Zope with mySQL

2011-05-09 Thread Chris Withers

Hi Harry,

You'd be better off asking this on the z...@zope.org mailing list...

cheers,

Chris

On 28/04/2011 20:19, harryjatt wrote:


Hi, i am doing web development with Zope. My connected database is mySQL. I
am new to this combination.I have to upload the files to mySQL with
programming in zope and then downloading them via zope.Can you help me in
this regard? I will be very thankfull to you.
Regards, Harry


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


in search of graceful co-routines

2011-05-17 Thread Chris Withers

Hi All,

I'm looking for a graceful pattern for the situation where I have a 
provider of a sequence, the consumer of a sequence and code to moderate 
the two, and where I'd like to consumer to be able to signal to the 
provider that it hasn't succeeded in processing one element in the queue.


So, I'd want the controlling code to look a lot like:

for item in provider:
  try:
consumer.handleItem(self)
  except:
 provider.failed(item)

Now, since the sequence is long, and comes from a file, I wanted the 
provider to be an iterator, so it occurred to me I could try and use the 
new 2-way generator communication to solve the "communicate back with 
the provider", with something like:


for item in provider:
  try:
consumer.handleItem(self)
  except:
 provider.send('fail')
  else:
 provider.send('succeed')

..but of course, this won't work, as 'send' causes the provider 
iteration to continue and then returns a value itself. That feels weird 
and wrong to me, but I guess my use case might not be what was intended 
for the send method.


Anyway, I wonder how other people would write this?
(I'm particularly interested in a sane way to use the two way 
communication that PEP 342 introduced)


cheers,

Chris

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


Re: in search of graceful co-routines

2011-05-17 Thread Chris Withers

On 17/05/2011 18:26, Ian Kelly wrote:

You can use send the way you're wanting to.  It will look something like this:

def provider():
   result = None
   while True:
 if result is None:
   if has_more_items():
 next_item = get_next_item()
   else:
 break
 elif result == 'fail':
   process_fail()
   next_item = None
 elif result == 'succeed':
   process_succeed()
   next_item = None
 else:
   raise ValueError('unknown result %s' % result)
 result = (yield next_item)


Yes, but it's this kind of birds nest I'm trying to avoid...

Chris

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


Re: in search of graceful co-routines

2011-05-17 Thread Chris Withers

On 18/05/2011 03:10, Terry Reedy wrote:

By default, Python iterators operate in pull mode -- consumers request a
new item when they want one. I believe .send was mostly intended to
reverse that, to operate in push mode where producers .send() a item to
a consumer when they are ready to. That is certainly true of examples I
have seen.


My first exposure was with the @inlineCallbacks decorator in twisted, 
which does use it both ways...



Using .send for feedback to a provider is trickier, as the two other
posts have shown.


The closest I've found to something graceful is:

def mygenerator(*args):
for arg in args:
print "yielding:",arg
result = yield arg
print "returned:",result
if result is not None:
yield None

provider = mygenerator(1,2,3)
for arg in provider:
print "got:",arg
if arg%2:
provider.send('hello')

However, if you do g.send(None), you still get a result back, which 
feels a bit weird...


It's pretty disappointing that neither the send nor throw methods added 
as part of PEP342 were provided with a parameter or variant that did 
"send an item but don't advance the generator".


> Another option is to write an iterator class instead

of generator function. You can then give the provider a message receive
method (.send or whatever) that is decoupled from the send-next method.


Yes, that's an option I'd considered, however, with a provider class as 
follows:


class Provider:

def __init__(self,*args):
self.args = args
self.current = 0

def next(self):
try:
val = self.args[self.current]
except:
raise StopIteration()
self.current += 1
print "yielding:",val
return val

def send(self,value):
print "returned:",value

def __iter__(self):
return self

provider = Provider(1,2,3)
for arg in provider:
print "got:",arg
if arg%2:
provider.send('hello')

...but that's a lot more code, and allows one of my anti-use cases to 
happen:


provider = Provider(1,2,3)
provider.send("don't want this to be possible")

The generator implementation deals with the above specific case:

  File "test.py", line 12, in 
provider.send('hello')
TypeError: can't send non-None value to a just-started generator

...which is, in itself, a little weird, given that it doesn't protect 
against:


provider = Provider(1,2,3)
val = provider.next()
provider.send("don't want this to be possible")
provider.send("don't want this to be possible")

cheers,

Chris

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


Re: sqlalchemy and Unicode strings: errormessage

2011-05-31 Thread Chris Withers

Hi Wolfgang,

On 30/05/2011 22:40, Wolfgang Meiners wrote:

I am trying to build an application using sqlalchemy.


You're likely to get much better help here:

http://www.sqlalchemy.org/support.html#mailinglist

When you post there, make sure you include:

- what python version you're using
- what sqlalchemy version you're using

cheers,

Chris

--
Simplistix - Content Management, Batch Processing & Python Consulting
   - http://www.simplistix.co.uk
--
http://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


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


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 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.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 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


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


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 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


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


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 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


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


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


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


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


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 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


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


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


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

2013-11-27 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 rounds out a few rough edges after a few months of real 
world use:


- Runners can now be created from other Runners during instantiation or 
using the .extend() method as well as concatenation.


- @requires decorations can now be stacked

- Runners now have a .replace() method allowing you to replace a 
callable with a mock to make sure the callable is passed the right 
parameters.


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


http://pythonhosted.org/mush/examples.html

Full docs are here:

http://pythonhosted.org/mush/

Downloads are here:

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

Compatible with Python 2.6, 2.7, 3.2 and 3.3 on Linux, Mac OS X and Windows:

http://jenkins.simplistix.co.uk/view/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


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

2013-12-11 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 rounds out a some more rough edges after even more real 
world use:


- The 'nothing' singleton is now used  instead of None for marking
  return types, fixing a bug that occurred when a callable tried to
  type-map a result that was None.

- Add an after() type wrapper for callables that need to wait
  until after a resource is used but that can't accept that resource
  as a parameter.

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


http://pythonhosted.org/mush/examples.html

Full docs are here:

http://pythonhosted.org/mush/

Downloads are here:

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

Compatible with Python 2.6, 2.7, 3.2 and 3.3 on Linux, Mac OS X and Windows:

http://jenkins.simplistix.co.uk/view/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


MailingLogger 3.8.0 Released!

2014-01-28 Thread Chris Withers

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 adds flood limiting to the SummarisingLogger, ensuring that 
emails it sends aren't bigger than MTAs are prepared to handle.


Full docs can be found here:

http://packages.python.org/mailinglogger/

For more information, please see:
http://www.simplistix.co.uk/software/python/mailinglogger
or
http://pypi.python.org/pypi/mailinglogger

cheers,

Chris

--
Simplistix - Content Management, Zope & 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


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.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.1.1 Released!

2014-10-30 Thread Chris Withers

Hi All,

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


- Fix bug that prevented logger propagation to be controlled by the
  log_capture decorator.

Thanks to John Kristensen for the fix.

It looks like I also forgot to send out the 4.1.0 release announcement, 
which was a bug and feature release containing the following:


- Fix compare() bug when dict instances with tuple keys were not equal.

- Allow logger propagation to be controlled by LogCapture.

- Enabled disabled loggers if a LogCapture is attached to them.

Thanks to Daniel Fortunov for the compare() fix.

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


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


which async framework?

2014-03-10 Thread Chris Withers

Hi All,

I see python now has a plethora of async frameworks and I need to try 
and pick one to use from:


- asyncio/tulip
- tornado
- twisted

From my side, I'm looking to experimentally build a network testing 
tool that will need to speak a fair few network protocols, both classic 
tcp and multicast-based, and have a web api living on top of it that 
most likely will have a websocket for pumping data to the browser.


I'd like to be able to serve the rest of the web api using a pyramid 
wsgi app if possible, and I'd like to be able to write the things that 
process requests in and validation out in a synchronous fashion, most 
likely spinning off a thread for each one.


The protocols are all financial (do we really not have a pure-python FIX 
library?!) but none are likely to have existing python implementations.


How should I pick between the options? What would people recommend and why?

cheers,

Chris

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


Re: which async framework?

2014-03-11 Thread Chris Withers

On 10/03/2014 21:57, Terry Reedy wrote:

I'd like to be able to serve the rest of the web api using a pyramid
wsgi app if possible, and I'd like to be able to write the things that
process requests in and validation out in a synchronous fashion, most
likely spinning off a thread for each one.


If you are writing 'standard' blocking, synchronous code, I am not sure
why you would use any of the above.


The idea I have is to do all the networking async based on a declarative 
set of messages in and recording all messages out and then hand that set 
of messages off to a syncronous layer to make assertions, record into a 
database, etc.



The protocols are all financial (do we really not have a pure-python FIX
library?!) but none are likely to have existing python implementations.

How should I pick between the options? What would people recommend and
why?


I know nothing of tornado. I personally would use asyncio over twisted
if I could because it is simpler, in the stdlib, has the option to write
'untwisted' non-blocking code similar to blocking code, and the docs
easier for me to read.


Thanks.

Guess I was expecting more of a response. I suspect I'll just end up 
cross-posting to the various mailing lists, which I hope won't cause too 
much offence or kick off any flame wars.


I'm faced with a difficult choice that I suspect many in our community 
are, just trying to find out how to make the best decision :-)


Chris

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


Re: SMTPHandler and mail subject

2014-03-12 Thread Chris Withers
If you want a much more fully-featured mail handler for the standard 
logging framework, there's this:


https://pypi.python.org/pypi/mailinglogger/3.8.0

cheers,

Chris

On 12/03/2014 12:25, eras.rasmu...@gmail.com wrote:


It works. Thank you :)


Eras



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


Re: which async framework?

2014-03-13 Thread Chris Withers

On 11/03/2014 19:41, Terry Reedy wrote:


I suspect I'll just end up cross-posting to the various mailing lists,


Bad idea. Post separately if you must.

 > which I hope won't cause too much offence or kick off any flame wars.

It would do both.


Ye of little faith :-P

I've been pleasantly surprised by the succinct, well reasoned and 
respectful replies from each of the communities!


Chris

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


which async framework? - a summary

2014-03-22 Thread Chris Withers

On 14/03/2014 00:36, Tim Chase wrote:

On 2014-03-14 00:25, Chris Withers wrote:

I've been pleasantly surprised by the succinct, well reasoned and
respectful replies from each of the communities!


As one who doesn't lurk on the other lists, is there a nice executive
summary of their responses?


Well, of course, each person recommended their own framework.

The short version was:

- tornado is a web server, if you're not using it, the async stuff is 
better developed elsewhere


- asyncio is very new, not a lot of protocols out in the wild and not 
much battle testing


- twisted is been around the block a lot, huge amounts of support and an 
active, knowledgeable community. Can feel crufty and old in parts, mind


The community bit swung it for me, so I've opted for Twisted, if I ever 
get a chance to work on the project in question ;-)


Chris

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


  1   2   3   4   >