Growth in Diversity
Posted: 2013-01-16 09:00


Tarek Ziadé recently announced the schedule for the Python track at FOSDEM 2013, where he’s one of the organizers. They have some interesting talks lined up by some excellent speakers, so if you’re going to FOSDEM, be sure to check them out.

The bigger part of the post is about a complete lack of women speakers. Namely, it’s about how I edited his blog post before publishing it on the PyCon blog.

Jumping ahead to the last sentence in his post gets to the answer of why I did what I did. With PyCon, we’ve diversified our speaker list through a lot of effort, and a great set of allies.

There’s a reason we went from one woman on the PyCon 2011 schedule to six in 2012. There’s also a reason we went from six to at least 22 for 2013. We didn’t do it through words, but through actions.

We experienced that growth thanks in part to the proliferation of women’s technology groups and the relationships we’ve built with them. By reaching out and involving these groups, we’ve seen not only a rise in women on stage, but a noticeable increase in women in the audience.

Rather than saying “everyone is welcome, specifically women”, we’re trying to achieve an environment that is fair and equal. To do that, PyCon has been consistent in targeting an audience that includes everyone. I went back through many pages of posts on the PyCon blog, to early 2011, and we’ve stuck to this stance.

Even though 22 speakers sounds so much better than 6, read that again, only with more detail: 22 women on a schedule of 114 talks and 32 tutorials.

That really sucks. We’re not going to see that number increase to 35, 40, 45, or hopefully higher in 2014 by mentioning “women, too”. We’re going to see that growth by ensuring women feel like first class citizens in our community. That goes for within PyCon, Python, all of technology, and on and on.

On one hand, it’s great that we’ve seen this growth in PyCon. I’m happy for what the community has done to welcome this growth, and I’m happy for the people who helped achieve this growth. Most of all, I’m happy for the individuals who are a part of this growth.

On the other hand, what the hell is wrong with us that we can only get 22 women on the schedule? The answer has roots in a lot of stuff far away from and a lot earlier in the process than conferences come in, but we can and will do better.

We will continue to push for diversity by engaging groups that work with underrepresented areas of our community. As these partnerships blossom and new groups sprout, we will continue to engage them in hopes of realizing further growth. All the while, we will continue to market our conference to everyone.

I think I speak for the organizers in stating that while we’re happy with the growth trends we’re seeing, we’re not going to be satisfied until we’ve reached and maintain equality. Our community deserves it.


One thing I will apologize for is that I did not notify Tarek of the change to his post. I did it on my own because I had that change made to my posts years ago, and I’ve learned what I think are better ways to reach and incorporate women. I should have communicated my thoughts and worked with Tarek, but I did not. For that, I’m sorry.

The Year of the Snake
Posted: 2013-01-02 09:00


If you know your Chinese Zodiac calendar like I do, you know that 2013 is the year of the snake. While they don't specify the type of snake, I think they mean Python.

2012 was a pretty good year around the Python community. It was fun while it lasted, but 2013, the year of the snake, is going to be even better.

Python 3 continues to grow, conferences continue to grow, and diversity continues to grow. These three things are topics I hope we all have a chance to be involved in for 2013.

Python 3

Python 3 adoption is moving along swiftly, and I'm looking forward to another year of increased usage, contribution, and conversation. You don't have to look too far to see that Python 3 is growing. The website formerly known as the "Python 3 Wall of Shame" recently became "Python 3 Wall of Superpowers" as the projects it tracks hit 50% with support for 3.x.

The "Who's on Python 3?" page uses additional knowledge to show projects with support under way, and it claims that 74% of the top 50 downloaded packages have 3.x support. When you include the in-progress projects, e.g., Django, that number becomes 78%.

Georg Brandl's tracking of Python 3 packages on PyPI shows strong growth, as 2011 ended with around 600 packages showing support for Python 3, and 2012 ended around 1,400. While that only puts us around 6% of all packages, it's an imperfect metric. Many projects don't even specify that they support Python 2, and known Python 3 projects don't specify their support either. It's still nice to see that the support is at least doubled. (PSA: Please accurately set the trove classifiers on your PyPI packages!)

Note

The following uses Windows download counts from http://python.org/webstats, as parsed by https://bitbucket.org/briancurtin/pydotorg_webstats. These are probably the only reliable numbers we can get since most platforms receive Python in some other way, e.g., package managers.

Downloads for all Python versions saw a boost in 2012 to just under 2,000,000 downloads per month (we hovered around 1.7M/month in years ending 2009-2011). December closed out the year as the single largest month ever for Python 3 downloads at 666,884 for Python 3.3. Those 3.3 downloads contributed to a total of 850,399 downloads across all 3.x versions, the highest monthly total to date. In the same period 2.7 saw 903,605 downloads, the lowest count since February, adding up to 1.2M for all 2.x versions.

http://i.imgur.com/XeOAt.png

We saw immediate growth at the initial release of 3.0 back in December 2008, then a settling shortly after, but it looks like we're back into a growth period thanks to a few big months following the 3.3 release in September.

3.x downloads in 2012 were up around 15% compared to 2011, and I think the success of Python 3.3 will continue. The outlook for Python 3.4 is even better than that of 3.3, and we're still early in the cycle. Even though the final release won't come until early 2014, the release will be feature complete by year's end, per PEP 429.

Overall, I like where we're heading. There are several big projects with progress on Python 3 support, such as Django and Twisted. On the PSF board, we recently funded two projects, Kivy and NLTK, to complete their porting to Python 3. Even my day job at Canonical is going to get back into Python 3, as I'll need to complete the port of our SSO client which was started in the fall.

Conferences

Another year means another set of conferences, and 2012 saw a lot of growth here. Not only were there several first time conferences, several established conferences saw attendance increases.

The increase in regional conferences really is a great thing, as they get more people involved in sharing and education, they're generally more affordable than the bigger events, and they expose more people to the fun of a Python conference. I know of five new events that sprouted in 2012:

I hope to see more of these regional conferences in 2013. I'm going to try and make it to at least one of the smaller conferences this year - maybe PyOhio.

As for attendance growth, it's not something most conferences end up mentioning, but I'm aware of it through my work with the Python Software Foundation's board of directors. In 2012 we sponsored 18 conferences, and we figure out our grant amounts based on attendance estimates. We work with organizers that we trust, and most of them mentioned increased attendance estimates, often making their funding requests after pre-sales, so they've had data to support the requests.

The one conference I know for sure had attendance growth was PyCon US, which actually over shot the estimates and opened the conference to 2,317 attendees, up from 1,380 in 2011. In 2013 we're capping the attendance at 2,500, and we're expecting another sell out for the last year in Santa Clara before heading to Montreal.

I'm really looking forward to expansion in the regional conference scene, as I think it'll bring Python to a lot more people. When you consider the download rates from earlier and the increasing attendance at these events, there are a lot of people to be reached in 2013.

Diversity

I certainly can't quantify this, but I've really felt the increasing presence of the various groups in our community that target and involve women. PyLadies and CodeChix saw expansion in 2012, and LadyCoders was created in 2012. Women Who Code joined the aforementioned groups in sponsoring PyCon, and they held over 100 meetings throughout the year. These groups and others were involved in a number of workshops, meetups, sprints, and other efforts to involve women in computing. This is awesome.

At PyCon 2012, several women's groups had booths in the expo hall, and at least one of them hosted a party on one of the evenings. Since PyCon doesn't track attendee genders, there is again no way to quantify this, but in my talks with some of the women at the booths as well as other attendees, PyCon had noticeably more women in attendance than in past years. This is awesome.

Several of these groups held meetups to brainstorm ideas for conference proposals, in an effort to help their members get presentations into conferences like PyCon. PyCon 2011 had one female on the schedule of tutorials and talks. PyCon 2012 had six females on the schedule. PyCon 2013 has 22. This is awesome.

These outreach groups really are working, and I hope to see continued growth because 16.5% of the schedule being women is way too low. It's a great effort on their part, in fact I couldn't be any happier with these groups for what they've done to diversify our community, but we need more. However, what I think we need comes more from everyone else. The women are doing their part.

Whether it's grant programs or the codes of conduct that many events are now implementing, creating a more welcoming environment for everyone will enable more of this growth that the groups are building. From conferences to user group meetings to mailing lists, I hope everyone can think about what we can do to involve more women and tip the scales toward equality.


Overall, I'm really excited about this year. I think it'll be a big year for Python 3, we're going to see some great conferences, and hopefully we're able to get more people involved in Python activities.

I'm also looking forward to putting in more development work on CPython, and I'm looking forward to another great year of working with the PSF. I'm looking forward to more heavy lifting in the gym, doing a Tough Mudder, and having another successful season umpiring college baseball.

A How-To on Setting Back Diversity, or, “we hired women to bring you beer”
Posted: 2012-03-21 00:18


What a horrible month it has been for diversity in technology. March started off with an awful article on Brogrammers, and today the Boston API Jam, hosted by Sqoot of New York, took their turn at ruining things. If you thought the "brogrammer" article and everyone involved with it was beyond stupid, check out what the API Jam was promoting: the details of their event.

As ReadWriteWeb took note of, they weren't short of apologies, but it's too little, too late. Rather than tweet a weak apology after the fact, try thinking ahead of time on promoting an environment of equality. I would certainly hope they learn from their mistake and begin to take an active stance towards diversity, but given some of their responses on Twitter, I'm doubting that will happen.

As word got around, many of the early responses to the event's original description, which included "Need another beer? Let one of our friendly (female) event staff get that for you," indicated they didn't really care. Responding that the text was just a little humor shows them missing the point early on. Plus, it wasn't even funny. Shortly after that, they respond with boom to backup a commenter who marginalizes the female role in a technology event as "a perk". A few hours go by and then starts the stream of "we're sorry" messages to seemingly anyone who mentioned them in relation to this blunder.

The message links to an "apology" letter which includes:

While we thought this was a fun, harmless comment poking fun at the fact that hack-a-thons are typically male-dominated, others were offended. That was not our intention and thus we changed it.</blockquote>

I'm not sure why poking fun at the men who attend these events needs to objectify women, but maybe that's what makes it "fun" for them? The worst part of this is the "others were offended" piece. They still don't acknowledge that it's not just that their words are wrong, but their views are damaging to the community. The message effectively says, "We think objectifying women is fun and harmless, but some of you were offended'. It's an unacceptable position to take, and the great news is that they've lost sponsorship because of it.

apigee pulled their sponsorship because the API Jam's message wasn't consistent with their values. Heroku did the same. CloudMine went on to write a post of their own about not only their withdrawal of sponsorship, but their feelings on sexism in tech. Good on all of these organizations for removing their support of this event.

The next time you plan an event like this or do any sort of outreach, please think with diversity in mind. It's mind boggling how far behind the times people in technology can be. There shouldn't have to be a women's tech suffrage, but as long as events like the API Jam promote the idea that women aren't a first-class citizen at their event, diversity in technology will keep taking one step forward, two steps back.

minidumper - Python crash dumps on Windows
Posted: 2011-09-29 08:04


If you're writing software on Windows, you've likely come across minidumps. They're a great help when your project encounters a crashing scenario, as they record varying levels of information to help you reproduce the problem.

The main product I work on at my day job, a server written in C++, has had minidump functionality since the beginning. We keep PDBs around for our releases, then when customers encounter a crash, we grab the minidump, match it up with the binaries and PDBs, then try to figure out what the scenario was. I think that's fairly standard operating procedure, and it tends to work alright. Release crash dumps are obviously less helpful than debug dumps, but you can still get enough out of them to get started in the right direction. So while one part of my job has that, the other part - the Python part - has had me wishing for it. So I wrote it.

The extension modules I maintain internally for our server's APIs occasionally come crashing down during our test automation. That's fairly alarming at first since the tests just drop out and you don't get much of an indication of why. Was it the extension? The underlying C++ API? Python itself? The unittest logs are all we have to go off of, so then it's a matter of piecing together what was happening at the time, then either manually re-running it from the REPL and/or attaching the Visual Studio debugger to catch the problem.

In comes minidumper. By importing minidumper and enabling it, you can receive crash dump files whenever your Python process goes down. It's there for you.

import minidumper

minidumper.enable(name=&quot;example&quot;)

Now if you do some crazy stuff and cause a crash in your extension code...

void
divide_by_zero()
{
    int x = 1;
    int b = x / 0;
}

...you'll get a crash dump that will tell you exactly what just happened. In my case, I got example_20110929-071529.mdmp. Now if you open that up in Visual Studio, ideally the one that Python was compiled with, you'll get a look into what happened once you hit F5 (or Debug > Start Debugging).

http://i.imgur.com/ZVSQN.png

The first thing you'll see is a popup telling you what the problem was and where it occurred, then Visual Studio will show you exactly where in the code the issue lies. As we all know, division by zero is a no-no, and it crashed. If you hit the break button, you can poke around in a ton of information that was gathered from your crashed process. Depending on what value you gave to the type parameter of minidumper.enable(type=...), which defaults to MiniDumpNormal and has a full list of options here, you'll have different amounts of information.

http://i.imgur.com/qYwqH.png

You can walk around the call stack and see what functions were called with what values, and from there you can inspect variables within a function by hovering over them with the cursor. The Debug > Windows menu contains a whole bunch of other pieces of information, including memory, disassembly, value watching, and more.

As far as examples and tests go, I only have some of the basics down, although I plan on bulking those areas up and coming up with more useful and interesting code to prove this extension's worth. I just threw the source up on https://bitbucket.org/briancurtin/minidumper, but I'm going to wait on getting it on PyPI until I figure out the best way to organize and distribute it.

If you're looking for more info on minidumps, http://www.debuginfo.com/articles/effminidumps.html and http://www.codeproject.com/KB/debug/postmortemdebug_standalone1.aspx were helpful sites, as well as the various MSDN documentation.


The following setup steps are what I do to get started, using the CPython default branch, aka, CPython 3.3. Also note that I'm using a debug-built Python, and telling the minidumper extension to do a debug build as it's what I usually use at work, as well as when I'm working on CPython.

  1. hg clone https://YOURNAMEHERE@bitbucket.org/briancurtin/minidumper minidumper-dev
  2. C:python-devcpython-mainPCbuildpython_d.exe setup.py build --debug install
  3. C:python-devcpython-mainPCbuildpython_d.exe -m tests

Running the tests will build a tester extension, which contains two crashing functions. Right now, the few tests just call the crash functions with different minidumper.enable settings in order to make sure the right dumps are being created in the right places.

Hope it helps.

Note: Until I fix http://bugs.python.org/issue11732, the crash windows asking you to debug or close the program will stay around until you click something. Ideally I'll be able to add functionality to temporarily disable Windows Error Reporting for the http://docs.python.org/dev/library/faulthandler.html module, as it currently requires manual intervention while running the CPython test suite on Windows, as :code:`minidumper` does.

PyCon 2011 CPython Sprint Newcomers
Posted: 2011-03-16 15:35


Following up two tutorial and summit days, then three days of the conference, the sprints got off to a great start on Sunday evening. I'm back at home now but wanted to put together a summary of the first two days: A lot of great projects got up on stage to pitch their sprint ideas including Brett Cannon speaking for CPython, letting people know where the sprint would be, mentioning the "dev-in-a-box" CDs, and encouraging people to come out and hack. Within 15 minutes of the end of announcements, we had 7 first-time sprinters eager to dive in and get going right away. The new developer guide was instrumental in getting everyone through the initial setup. The plan was to get a Mercurial checkout and coverage.py as a starting point, as one of the suggested sprint targets was increasing test coverage. By 6:30 on the first day, we were up to 9 people fully up and running, pouring over the coverage results (which were handily pre-generated on the "dev-in-a-box" CD), and diving into code. Here's what everyone worked on:

  • Alicia Arlen started tackling the expansion of string tests and got a patch written and checked in within first day.
  • Scott Wilson noticed some failing urllib tests on his Mac and got to work on fixing them. After that he started on increasing urllib test coverage.
  • Denver Coneybeare mentioned a dbm patch he made a few days before the sprint, then got it reviewed and checked in. He followed that up with test coverage patches to fileinput and _dummy_thread.
  • Jeff Ramnani came up with several documentation and code changes, along with some tracker triage to get a few older issues closed.
  • Michael Henry spent some time on the email package, including some documentation updates and a port of test_email_codecs to Python 3. He's also working on timeit test coverage.
  • Natalia Bidart noticed several test failures after the initial build and test, then wrote up a few patches to make sure her configuration passes all of the tests. She's also working on logging test coverage.
  • Matias Bordese read the dev guide pretty closely and patched a step that didn't jive with his system. He's currently expanding coverage of the dis module.
  • Robbie Clemons started by reviewing a few issues, then took cgitb up to 75% test coverage by starting a test suite for it.
  • Evan Dandrea came up with patches to posixpath, shutil, and tarfile for test coverage and a few bugs.
  • Jonathan Hartley looked into a unittest issue and wrote up a fix plus tests that got checked in pretty quickly. He's also working on site.py coverage.
  • Piotr Kaspyrzyk used a tool he made to find typos in his research work and applied it to the Python documentation, coming up with several patches and many more on the way.
  • Tim Lesher spent time investigating a pydoc issue that was being discussed on the mailing list about named tuples
  • Brandon Craig Rhodes started by running coverage and ended up diving into the order of imports on interpreter startup to fix coverage results before going further with them. He took the new results and is working on copy test coverage.
Here's a picture of some of the group, hard at work: Many thanks to those listed and everyone else who came out to sprint. Hopefully you learned something new and had a fun time contributing -- the effort is definitely appreciated and we look forward to working with you in the future!
Contents © 2014 Brian Curtin