Re: [Python-Dev] Move selected documentation repos to PSF BitBucket account?

2014-11-24 Thread Chris Withers
On 24/11/2014 02:59, Barry Warsaw wrote: On Nov 23, 2014, at 08:55 AM, Guido van Rossum wrote: - Moving from Hg to Git is a fair amount of one-time work For anyone seriously interested in this, even experimentally, I would highly suggest looking at Eric Raymond's reposurgeon code. You can go

Re: [Python-Dev] PEP 468 (Ordered kwargs)

2015-01-28 Thread Chris Withers
On 28/01/2015 07:14, Gregory P. Smith wrote: It is a potentially bad idea if order is the default behavior of iteration, items(), keys() and values(). Ideally order should only be exposed when explicitly asked for to help prevent bugs and mitigate potential information leaks. I have to be hone

Re: [Python-Dev] Type hints -- a mediocre programmer's reaction

2015-04-21 Thread Chris Withers
On 20/04/2015 20:09, Paul Moore wrote: On 20 April 2015 at 19:41, Barry Warsaw wrote: tldr; type hints in python source are scary. Would reserving them for stub files be better? I think so. I think PEP 8 should require stub files for stdlib modules and strongly encourage them for 3rd party co

Re: [Python-Dev] Type hints -- a mediocre programmer's reaction

2015-04-21 Thread Chris Withers
On 20/04/2015 19:30, Harry Percival wrote: Hi all, tldr; type hints in python source are scary. Would reserving them for stub files be better? I think Jack's summary of this is excellent and aligns well with where I think I'm coming from on this: https://mail.python.org/pipermail/python-dev

Re: [Python-Dev] Type hints -- a mediocre programmer's reaction

2015-04-21 Thread Chris Withers
On 21/04/2015 12:23, Gustavo Carneiro wrote: Well, (i) can be done with good documentation (docstrings etc.). Documentation is not checked. It often loses sync with the actual code. Docs say one thing, code does another. That certainly something that could be fixed by formalising th

Re: [Python-Dev] Type hints -- a mediocre programmer's reaction

2015-04-21 Thread Chris Withers
On 20/04/2015 20:09, Paul Moore wrote: On 20 April 2015 at 19:41, Barry Warsaw wrote: tldr; type hints in python source are scary. Would reserving them for stub files be better? I think so. I think PEP 8 should require stub files for stdlib modules and strongly encourage them for 3rd party co

Re: [Python-Dev] Type hints -- a mediocre programmer's reaction

2015-04-21 Thread Chris Withers
On 20/04/2015 19:30, Harry Percival wrote: Hi all, tldr; type hints in python source are scary. Would reserving them for stub files be better? I was trying to find Jack's original post as I think his summary is excellent and aligns well with where I think I'm coming from on this: https://mai

[Python-Dev] documentation / implementation question for subprocess.check_output

2015-07-16 Thread Chris Withers
Hi All, Curious to see this in the docs for subprocess.check_output: "Do not use stderr=PIPE with this function as that can deadlock based on the child process error volume. Use Popen with the communicate() method when you need a stderr pipe." Given that check_output's implementation uses co

Re: [Python-Dev] documentation / implementation question for subprocess.check_output

2015-07-17 Thread Chris Withers
On 16/07/2015 16:27, Nick Coghlan wrote: On 16 July 2015 at 20:35, Guido van Rossum wrote: In which version? I don't see that phrase in the 3.5 docs. The equivalent note in 3.x is "Do not use stdout=PIPE or stderr=PIPE with this function. The child process will block if it generates enough out

[Python-Dev] under what circumstances can python still exhibit "high water mark" memory usage?

2015-10-14 Thread Chris Withers
Hi All, I'm having trouble with some python processes that are using 3GB+ of memory but when I inspect them with either heapy or meliae, injected via pyrasite, those tools only report total memory usage to be 119Mb. This feels like the old "python high water mark" problem, but I thought that

Re: [Python-Dev] under what circumstances can python still exhibit "high water mark" memory usage?

2015-10-14 Thread Chris Withers
On 14/10/2015 16:04, Stefan Ring wrote: On Wed, Oct 14, 2015 at 3:11 PM, Chris Withers wrote: I'm having trouble with some python processes that are using 3GB+ of memory but when I inspect them with either heapy or meliae, injected via pyrasite, those tools only report total memory usage

Re: [Python-Dev] under what circumstances can python still exhibit "high water mark" memory usage?

2015-10-14 Thread Chris Withers
On 14/10/2015 16:13, Victor Stinner wrote: Hi, You may also try tracemalloc to get stats of the Python memory usage ;-) The Python memory allocator was optimized in Python 3.3: it now uses mmap() when available (on UNIX), it helps to reduce the fragmentation of the heap memory. Since Python 3.4

[Python-Dev] dynamic linking, libssl.1.0.0.dylib, libcrypto.1.0.0.dylib and Mac OS X

2015-12-24 Thread Chris Withers
Hi All, I hit this every time I install packages on Mac OS X that use libssl, it looks like extensions are built linking to .dylib's that are not resolveable when the library is actually used: from OpenSSL import SSL Traceback (most recent call last): File "", line 1, in File "python2.

Re: [Python-Dev] dynamic linking, libssl.1.0.0.dylib, libcrypto.1.0.0.dylib and Mac OS X

2015-12-24 Thread Chris Withers
On 24/12/2015 14:36, Cory Benfield wrote: On 24 Dec 2015, at 11:17, Chris Withers wrote: Here's a couple of examples of this problem in the wild: https://github.com/alekstorm/backports.ssl/issues/9 http://stackoverflow.com/questions/32978365/how-do-i-run-psycopg2-on-el-capitan-wi

[Python-Dev] dynamic linking, libssl.1.0.0.dylib, libcrypto.1.0.0.dylib and Mac OS X

2015-12-24 Thread Chris Withers
Hi All, I hit this every time I install packages on Mac OS X that use libssl, it looks like extensions are built linking to .dylib's that are not resolveable when the library is actually used: >>> from OpenSSL import SSL Traceback (most recent call last): File "", line 1, in File "python

[Python-Dev] python 3 niggle: None < 1 raises TypeError

2014-02-14 Thread Chris Withers
Hi All, Sending this to python-dev as I'm wondering if this was considered when the choice to have objects of different types raise a TypeError when ordered... So, the concrete I case I have is implementing stable ordering for the python Range objects that psycopg2 uses. These have 3 attribu

Re: [Python-Dev] getattr vs hashattr

2014-03-16 Thread Chris Withers
On 03/12/2014 04:49 PM, Chris Angelico wrote: You can use hasattr() in place of AttributeError Is that true now? It used to be that hasattr swallowed all exceptions rather than just AttributeError making is a very dangerous weapon for anything (such as an orm or odb) that might do something i

[Python-Dev] pep8 reasoning

2014-04-24 Thread Chris Withers
Hi All, Apologies if this is considered off topic, but I'm keen to get the "language designers" point of view and short of emailing Barry, Guido and Nick directly, this seemed like the best place. I'm having a tough time persuading some people of the benefits of pep8, particularly when it co

[Python-Dev] pep8 reasoning

2014-04-24 Thread Chris Withers
Hi All, Apologies if this is considered off topic, but I'm keen to get the "language designers" point of view and short of emailing Barry, Guido and Nick directly, this seemed like the best place. I'm having a tough time persuading some people of the benefits of pep8, particularly when it co

Re: [Python-Dev] pep8 reasoning

2014-04-25 Thread Chris Withers
On 25/04/2014 03:00, Chris Angelico wrote: On Fri, Apr 25, 2014 at 11:40 AM, Allen Li wrote: 2) If you're starting a new project, follow PEP8 (or the standards for the language you're using) to preserve CONSISTENCY. Don't forget that PEP 8 is not the standard for the Python language, only

Re: [Python-Dev] pep8 reasoning

2014-04-25 Thread Chris Withers
On 25/04/2014 04:03, Barry Warsaw wrote: On Apr 25, 2014, at 12:00 PM, Chris Angelico wrote: Don't forget that PEP 8 is not the standard for the Python language, only the Python stdlib. Particularly, there's no strong reason to follow some of its lesser advices (eg spaces rather than tabs, the

[Python-Dev] namedtuple implementation grumble

2014-06-07 Thread Chris Withers
Hi All, I've been trying to add support for explicit comparison of namedtuples into testfixtures and hit a problem which lead me to read the source and be sad. Rather than the mixin and class assembly in the function I expected to find, I'm greeted by an exec of a string. Curious as to wha

[Python-Dev] getting merge rights back on github

2018-12-02 Thread Chris Withers
Hi All, It's been quite a long time since I last used my python commit rights, and it appears they've evaporated in the move to GitHub. I'd like to get back into helping out, particularly with unittest.mock where I've recently started helping out as a maintainer over on https://github.com/te

[Python-Dev] getting merge rights back on github

2018-12-02 Thread Chris Withers
Hi All, It's been quite a long time since I last used my python commit rights, and it appears they've evaporated in the move to GitHub. I'd like to get back into helping out, particularly with unittest.mock where I've recently started helping out as a maintainer over on https://github.com/te

Re: [Python-Dev] getting merge rights back on github

2018-12-03 Thread Chris Withers
4 2018 +0530 bpo-31177: Skip deleted attributes while calling reset_mock (GH-9302) Victor Le dim. 2 déc. 2018 à 15:45, Chris Withers a écrit : Hi All, It's been quite a long time since I last used my python commit rights, and it appears they've evaporated in the move to Gi

[Python-Dev] any way to subscribe to bugs and PRs on a particular topic?

2018-12-04 Thread Chris Withers
Hello, I'd like to see if I can help with unittest.mock, but don't have a huge amount of bandwidth and can't even parse let alone process the whole firehose of bpo and GH PRs. Is there  any way I can get bugs.python.org and github PRs to only tell me about things, preferably by email, that a

[Python-Dev] git history conundrum

2019-04-27 Thread Chris Withers
Hi All, I'm in the process of bringing the mock backport up to date, but this has got me stumped: $ git log --oneline  --no-merges 5943ea76d529f9ea18c73a61e10c6f53bdcc864f.. -- Lib/unittest/mock.py Lib/unittest/test/testmock/ | tail 362f058a89 Issue #28735: Fixed the comparison of mock.Magic

Re: [Python-Dev] git history conundrum

2019-04-28 Thread Chris Withers
On 28/04/2019 03:51, Martin Panter wrote: On Sat, 27 Apr 2019 at 19:07, Chris Withers wrote: Right, so I've merged up to 15f44ab043, what comes next? $ git log --oneline --no-merges 15f44ab043.. -- Lib/unittest/mock.py Lib/unittest/test/testmock/ | tail -n 3 This Git command line means

Re: [Python-Dev] git history conundrum

2019-04-28 Thread Chris Withers
On 28/04/2019 03:51, Martin Panter wrote: On Sat, 27 Apr 2019 at 19:07, Chris Withers wrote: Right, so I've merged up to 15f44ab043, what comes next? $ git log --oneline --no-merges 15f44ab043.. -- Lib/unittest/mock.py Lib/unittest/test/testmock/ | tail -n 3 This Git command line

Re: [Python-Dev] git history conundrum

2019-04-28 Thread Chris Withers
On 28/04/2019 22:21, Robert Collins wrote: Thank you! Thank me when we get there ;-) Currently in Dec 2018 with a wonderful Py2 failure: == ERROR: test_autospec_getattr_partial_function (mock.tests.testhelpers.SpecSignature

[Python-Dev] drop jython support in mock backport?

2019-04-30 Thread Chris Withers
[resending to python-dev in case there are Jython users here...] Hi All, If you need Jython support in the mock backport, please shout now: https://github.com/testing-cabal/mock/issues/453 cheers, Chris ___ Python-Dev mailing list Python-Dev@python

[Python-Dev] "if __name__ == '__main__'" at the bottom of python unittest files

2019-04-30 Thread Chris Withers
Hi All, I have a crazy idea of getting unittest.mock up to 100% code coverage. I noticed at the bottom of all of the test files in testmock/, there's a: if __name__ == '__main__':     unittest.main() ...block. How would people feel about these going away? I don't *think* they're needed now t

Re: [Python-Dev] "if __name__ == '__main__'" at the bottom of python unittest files

2019-04-30 Thread Chris Withers
On 01/05/2019 06:12, Terry Reedy wrote: Such blocks should be excluded from coverage by the default .coveragerc file.  Mine came with exclude_lines =     # Don't complain if non-runnable code isn't run:     if 0:     if __name__ == .__main__.:     if DEBUG: Which .coveragerc are you refer

Re: [Python-Dev] "if __name__ == '__main__'" at the bottom of python unittest files

2019-05-01 Thread Chris Withers
On 01/05/2019 07:46, Serhiy Storchaka wrote: 01.05.19 00:24, Chris Withers пише: I have a crazy idea of getting unittest.mock up to 100% code coverage. I noticed at the bottom of all of the test files in testmock/, there's a: if __name__ == '__main__': unittest.main()

Re: [Python-Dev] "if __name__ == '__main__'" at the bottom of python unittest files

2019-05-01 Thread Chris Withers
On 01/05/2019 13:21, Victor Stinner wrote: Le mer. 1 mai 2019 à 03:12, Chris Withers a écrit : Right, but that's not the documented way of running individual suites in the devguide. Maybe, but I'm using that sometimes and it's useful for some specific issues. Is it pos

Re: [Python-Dev] "if __name__ == '__main__'" at the bottom of python unittest files

2019-05-01 Thread Chris Withers
On 01/05/2019 13:37, Paul Moore wrote: I agree - removing this just to make the coverage figures look pretty seems like the wrong motivation. Configuring coverage to understand that you want to exclude these lines from the checking would be fine, as would accepting that a coverage of slightly le

Re: [Python-Dev] "if __name__ == '__main__'" at the bottom of python unittest files

2019-05-01 Thread Chris Withers
Sorry, accidentally include a comment for this in a reply to Paul: On 01/05/2019 13:39, Serhiy Storchaka wrote: We try to support several different ways of running tests. This allows to catch some environment depended flaws in tests and serves as a kind of the test of unittest itself. Not all t

Re: [Python-Dev] "if __name__ == '__main__'" at the bottom of python unittest files

2019-05-01 Thread Chris Withers
On 01/05/2019 14:22, Paul Moore wrote: If people are actually using these blocks, then so be it, but it feels like the people who want them to stick around are saying they're using them just on the off chance they might use them, which feels like a poor reason to keep a bunch of dead code around.

Re: [Python-Dev] "if __name__ == '__main__'" at the bottom of python unittest files

2019-05-01 Thread Chris Withers
On 01/05/2019 14:52, Karthikeyan wrote: We try to support several different ways of running tests. This allows to catch some environment depended flaws in tests and serves as a kind of the test of unittest itself. Not all test files are made discoverable yet, but we move in

Re: [Python-Dev] "if __name__ == '__main__'" at the bottom of python unittest files

2019-05-01 Thread Chris Withers
On 01/05/2019 17:09, Stephen J. Turnbull wrote: Executive summary: "There should be a tool" (sorry, I'm not volunteering any time soon) that could be added to $VCS diff (say, "git coverage-diff" or "git diff --coverage"). That sounds like a very hard problem to solve... > If people are act

Re: [Python-Dev] BDFL delegation for PEP 426 (PyPI metadata 1.3)

2013-02-22 Thread Chris Withers
On 03/02/2013 13:27, Tres Seaver wrote: As for setuptools (as opposed to distribute), I don't think we should care anymore. Yes, you need to care. It is *still* true today that distribute and setuptools remain largely interchangeable, which is the only thing that makes distribute viable, in th

[Python-Dev] lament for the demise of unbound methods

2013-07-04 Thread Chris Withers
Hi All, In Python 2, I can figure out whether I have a method or a function, and, more importantly, for an unbound method, I can figure out what class the method belongs to: >>> class MyClass(object): ... def method(self): pass ... >>> MyClass.method >>> MyClass.method.im_class There doe

Re: [Python-Dev] lament for the demise of unbound methods

2013-07-04 Thread Chris Withers
On 04/07/2013 12:59, Christian Heimes wrote: Am 04.07.2013 13:21, schrieb Chris Withers: There doesn't appear to be any way in Python 3 to do this, which is a little surprising and frustrating... What am I missing here? I removed unbound methods almost six years ago: http://hg.pytho

Re: [Python-Dev] lament for the demise of unbound methods

2013-07-04 Thread Chris Withers
On 04/07/2013 12:55, Ronald Oussoren wrote: You can find the fully qualified name of the method with the qualname attribute: class A: ...def method(self): pass ... A.method.__qualname__ 'A.method' That doesn't seem helpful as a sensible way to get back to the class object: >> globals

Re: [Python-Dev] lament for the demise of unbound methods

2013-07-04 Thread Chris Withers
rather than C1.meth()) cheers, Chris On 04/07/2013 17:25, Guido van Rossum wrote: Chris, what do you want to do with the knowledge you are seeking? --Guido van Rossum (sent from Android phone) On Jul 4, 2013 4:28 AM, "Chris Withers" mailto:ch...@simplistix.co.uk>> wrote:

Re: [Python-Dev] lament for the demise of unbound methods

2013-07-04 Thread Chris Withers
less convenient. Too bad. I don't know that Victor's suggestion will actually work in all the cases that MyClass.a_method.im_class does :-S Chris On Thu, Jul 4, 2013 at 9:42 AM, Chris Withers https://github.com/Simplistix/__testfixtures/blob/master/__testfixtures/replace.py#L59 <

Re: [Python-Dev] lament for the demise of unbound methods

2013-07-04 Thread Chris Withers
On 04/07/2013 20:50, Benjamin Peterson wrote: 2013/7/4 Eric Snow : You could always monkeypatch builtins.__build_class__ to add an attribute to every "unbound method" pointing to the class. I would not reccomend that. __build_class__ is very internal and it's contract may change between versi

Re: [Python-Dev] lament for the demise of unbound methods

2013-07-06 Thread Chris Withers
On 05/07/2013 11:26, "Martin v. Löwis" wrote: ... A.__getattribute__(A,'s') A.__getattribute__(A,'c') A.__getattribute__(A,'r') Okay, but with this line: found = found.__getattribute__(found, n) I get a tonne of failures like this: File "testfixtures.tests.test_replacer.TestRe

Re: [Python-Dev] Official github mirror for CPython?

2013-07-28 Thread Chris Withers
On 25/07/2013 16:30, Brett Cannon wrote: Based on the list of people who are members of github.com/python it's as official as it's going to get (depends on who of that group owns it). But assuming whomever owns it is okay with hosting a mirror, what exactly is going to

[Python-Dev] windows file closing race condition?

2013-09-05 Thread Chris Withers
Hi All, Continuous testing is a wonderful thing when it comes to finding weird edge case problems, like this one: http://jenkins.simplistix.co.uk/job/testfixtures-tox/COMPONENTS=zc,PYTHON=3.3,label=windows/149/testReport/junit/testfixtures.tests.test_tempdirectory/TempDirectoryTests/test_check

Re: [Python-Dev] windows file closing race condition?

2013-09-06 Thread Chris Withers
On 06/09/2013 07:10, Antoine Pitrou wrote: This happens very infrequently, the OS is Windows 7 and the filesystem is NTFS, if that helps... It should help indeed: http://blogs.msdn.com/b/oldnewthing/archive/2012/09/07/10347136.aspx The box in questions runs no AV software or indexing services

Re: [Python-Dev] windows file closing race condition?

2013-09-06 Thread Chris Withers
On 06/09/2013 08:14, Nick Coghlan wrote: This feels a lot like an issue we were seeing on the Windows buildbots, which we ended up working around in the test support library: http://bugs.python.org/issue15496 Wow :'( That would be some awfully ugly code to upgrade from "hack in the test suppo

[Python-Dev] Re: Azure Pipelines PR: Spurious failure of 3.8 branch

2020-02-03 Thread Chris Withers
This seems the best thread to follow up on, just had a spurious failure backporting a patch to 3.8 from master: https://dev.azure.com/Python/cpython/_build/results?buildId=57386&view=logs&j=c83831cd-3752-5cc7-2f01-8276919eb334&t=5a421c4a-0933-53d5-26b9-04b36ad165eb

[Python-Dev] How do I get commit access?

2009-02-27 Thread Chris Withers
Hi All, I want to work on these issues: http://bugs.python.org/issue1823 http://bugs.python.org/issue1874 ...and I'd also like to commit the patch I submitted with this one: http://bugs.python.org/issue1974 How do I go about getting commit access? When I do, I take it I work against the vers

Re: [Python-Dev] How do I get commit access?

2009-02-27 Thread Chris Withers
Raymond Hettinger wrote: [Chris Withers] I want to work on these issues: http://bugs.python.org/issue1823 http://bugs.python.org/issue1874 ...and I'd also like to commit the patch I submitted with this one: http://bugs.python.org/issue1974 Barry usually takes ownership of changes t

Re: [Python-Dev] How do I get commit access?

2009-02-27 Thread Chris Withers
Raymond Hettinger wrote: Being proactive with that package probably means submitting patches and waiting. When there are active module maintainers, other contributors (including committers) generally refrain from committing semantic changes and defer to the package owner (effbot for ElementTre

Re: [Python-Dev] How do I get commit access?

2009-02-27 Thread Chris Withers
Barry Warsaw wrote: Chris, are you going to be at Pycon? I'm sorry I haven't had time to review email package changes. I will try to take a look this weekend, but if you're going to be at Pycon perhaps we can find some sprinting time? Sure, I'm around for the whole conference once I'm done g

Re: [Python-Dev] How do I get commit access?

2009-03-02 Thread Chris Withers
s...@pobox.com wrote: Christian> CPython has a stricter policy than most other Python related Christian> projects. Indeed. I'd be willing to grant you checkin privileges for SpamBayes simply because because Christian recognized you and you seem willing to roll up your sleeves. Do you do

Re: [Python-Dev] How do I get commit access?

2009-03-02 Thread Chris Withers
s...@pobox.com wrote: >> Indeed. I'd be willing to grant you checkin privileges for SpamBayes >> simply because because Christian recognized you and you seem willing >> to roll up your sleeves. Do you do Windows? Chris> The irony that Thunderbird put this in my spam folder bas

Re: [Python-Dev] Integrate BeautifulSoup into stdlib?

2009-03-04 Thread Chris Withers
Vaibhav Mallya wrote: We do have HTMLParser, but that doesn't handle malformed pages well, and just isn't as nice as BeautifulSoup. Interesting, given that BeautifulSoup is built on HTMLParser ;-) Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simpl

Re: [Python-Dev] How do I get commit access?

2009-03-05 Thread Chris Withers
Guido van Rossum wrote: I'd like to jump in and vouch for Chris. I've known him for many years and while we haven't worked closely I expect he'd be a valuable contributor. So +1 from me for giving Chris commit privileges for core Python. Thanks :-) I can't promise how *much* time I'll be able

[Python-Dev] patch commit policies (was [issue4308] repr of httplib.IncompleteRead is stupid)

2009-03-05 Thread Chris Withers
Martin v. Löwis wrote: Martin v. Löwis added the comment: So all Chris has to do to get this applied to 2.5 is craft an exploit based on the current behavior, right? ;-) Right :-) Of course, security patches should see a much more careful review than regular bug fixes. Well, it's funny you

[Python-Dev] running the tests...

2009-03-05 Thread Chris Withers
Hi All, I found the very brief snippet on test-running at: http://python.org/dev/faq/#how-to-test-a-patch ...so thought I'd ask here: - what's the canonical way to run "all the tests"? - what's the canonical way to run the tests for just the package being patched? (I'm assuming it's a standa

Re: [Python-Dev] running the tests...

2009-03-05 Thread Chris Withers
Nick Coghlan wrote: My personal preferences: Thorough: ./python -m test.regrtest -uall Typical: ./python -m test.regrtest Specific: ./python -m test.regrtest test_mod1 test_mod2 This looks good, I assume this would work on Windows too? cheers, Chris -- Simplistix - Content Management, Zope

Re: [Python-Dev] running the tests...

2009-03-05 Thread Chris Withers
s...@pobox.com wrote: >> My personal preferences: >> >> Thorough: ./python -m test.regrtest -uall >> Typical: ./python -m test.regrtest >> Specific: ./python -m test.regrtest test_mod1 test_mod2 Chris> This looks good, I assume this would work on Windows too? I believe

Re: [Python-Dev] Integrate BeautifulSoup into stdlib?

2009-03-08 Thread Chris Withers
Guido van Rossum wrote: Based on the sad example of BerkeleyDB, which was initially welcomed into the stdlib but more recently booted out for reasons having to do with the release cycle of the external dependency and other issues typical for large external dependencies, I think we should be very

Re: [Python-Dev] patch commit policies (was [issue4308] repr of httplib.IncompleteRead is stupid)

2009-03-08 Thread Chris Withers
Barry Warsaw wrote: That aside, is it actually a python-wide policy to *forbid* patching older releases where the patch isn't security-related? I set this policy for the releases I manage, namely 2.4 and 2.5. This is a Python-wide policy. ...and, now that Martin has explained it, it makes p

Re: [Python-Dev] patch commit policies (was [issue4308] repr of httplib.IncompleteRead is stupid)

2009-03-08 Thread Chris Withers
Tres Seaver wrote: If it is possible for a hostile outsider to trigger the DOS by sending mail to be processed by an application using the library, and the application can't avoid the DOS without ditching / forking / monkeypatching the library, then I would call the bug a "security bug", period.

Re: [Python-Dev] Integrate BeautifulSoup into stdlib?

2009-03-13 Thread Chris Withers
Martin v. Löwis wrote: In light of this, what I'd love to see (but sadly can't really help with, and am not optimistic about happening) is for: - python to grow a decent, cross platform, package management system - the standard library to actually shrink to a point where only libraries that are

Re: [Python-Dev] Integrate BeautifulSoup into stdlib?

2009-03-13 Thread Chris Withers
Steve Holden wrote: Perhaps we could encourage more "jumbo" distributions, like Enthought's and ActiveState's. I suspect many people would rather be able to maintain their Python functionality as a single product. I think you'll find it split.. People who use and love things like zc.buildout d

Re: [Python-Dev] Integrate BeautifulSoup into stdlib?

2009-03-13 Thread Chris Withers
Michael Foord wrote: I have mixed feelings. It is great that the batteries are included, but some batteries are showing their age or not maintained (who maintains IDLE? - does the calendar module really warrant being in the standard library? - imaplib is really not useful and IMAPClient which i

Re: [Python-Dev] Integrate BeautifulSoup into stdlib?

2009-03-13 Thread Chris Withers
Jim Jewett wrote: - python to grow a decent, cross platform, package management system As stated, this may be impossible, because of the difference in what a package should mean on Windows vs Unix. If you just mean a way to add python packages from pypi as with EasyInstall, then maybe. I mea

Re: [Python-Dev] Integrate BeautifulSoup into stdlib?

2009-03-23 Thread Chris Withers
Tres Seaver wrote: Given that the out-of-the-box Python install already has facilities for retrieving text over the net and executing that text, the notion of "locking down" a machine to include only the bits installed in the stock Python install is just "security theatre;" such a machine should

Re: [Python-Dev] Integrate BeautifulSoup into stdlib?

2009-03-23 Thread Chris Withers
Lie Ryan wrote: Some companies have /very/ strict policies on running anything on live server, including scripts you write yourself. The problem is if the script goes awry, it might disturb the stability or even security of the server. Yes, "we" as a profession right software and have respons

Re: [Python-Dev] packaging (was Integrate BeautifulSoup into stdlib?)

2009-03-23 Thread Chris Withers
Nick Coghlan wrote: Network connectivity isn't a given, even today. Indeed, now that is an important consideration. Packaging systems need to support "offline" modes. Buildout already does... If someone else decides to create a MinimalPython which consists solely of something like easy_instal

Re: [Python-Dev] Integrate BeautifulSoup into stdlib?

2009-03-23 Thread Chris Withers
Paul Moore wrote: I am not. What I *am* doing is saying (obliquely, I admit) is that for a package management system to be "decent enough" for stripping down the stdlib to not be an issue, it has to address these points (which clearly it can't). Sure it can, either by supporting "offline bundl

Re: [Python-Dev] Integrate BeautifulSoup into stdlib?

2009-03-23 Thread Chris Withers
R. David Murray wrote: I disagree. One of the jobs I've had is release management for internal software projects that depend on various external pieces. Release integration tested against specific versions of those external packages, and those were the packages that needed to wind up on the syst

Re: [Python-Dev] Integrate BeautifulSoup into stdlib?

2009-03-23 Thread Chris Withers
Martin v. Löwis wrote: In some environments, each new component must be approved. Once python is approved, the standard library is OK, but adding 7 packages from pypi requires 7 more sets of approvals. True, but as I mentioend elsewhere, I myself haven't done a python project where I only neede

Re: [Python-Dev] Integrate BeautifulSoup into stdlib?

2009-03-23 Thread Chris Withers
Trent Mick wrote: Apologies for jumping in mid-thread here. FYI: We're (where "we" == ActiveState here) looking at spending more effort on Python of late. Some of our thoughts are on add modules: whether added to the ActivePython core or easily addable via an equivalent to ActivePerl's ppm (pa

Re: [Python-Dev] packaging (was Integrate BeautifulSoup into stdlib?)

2009-03-23 Thread Chris Withers
Steve Holden wrote: Some people want an "all batteries and kitchen sink included" distro that they can treat as a single component for configuration control purposes. Others, like you, want the libraries to be separated out to allow separate fixes. Yes, but while the "batteries included" option

Re: [Python-Dev] Integrate BeautifulSoup into stdlib?

2009-03-23 Thread Chris Withers
Martin v. Löwis wrote: In some environments, each new component must be approved. Once python is approved, the standard library is OK, but adding 7 packages from pypi requires 7 more sets of approvals. True, but as I mentioend elsewhere, I myself haven't done a python project where I only neede

Re: [Python-Dev] issue5578 - explanation

2009-04-01 Thread Chris Withers
Guido van Rossum wrote: Well hold on for a minute, I remember we used to have an exec statement in a class body in the standard library, to define some file methods in socket.py IIRC. But why an exec?! Surely there must be some other way to do this than an exec? Chris -- Simplistix - Conte

[Python-Dev] Get the standard library to declare the versions it provides!

2009-04-01 Thread Chris Withers
Fred Drake wrote: Even simple cases present issues with regard to this. For example, I work on a project that relies on the uuid module, so we declare a dependency on Ka-Ping Ye's uuid module (since we're using Python 2.4). How should we write that in a version-agnostic way if we want to use

Re: [Python-Dev] PEP 382: Namespace Packages

2009-04-02 Thread Chris Withers
Martin v. Löwis wrote: I propose the following PEP for inclusion to Python 3.1. Please comment. Would this support the following case: I have a package called mortar, which defines useful stuff: from mortar import content, ... I now want to distribute large optional chunks separately, but id

Re: [Python-Dev] PEP 382: Namespace Packages

2009-04-02 Thread Chris Withers
P.J. Eby wrote: Apart from that, this mechanism sounds great! I only wish there was a way to backport it all the way to 2.3 so I could drop the messy bits from setuptools. Maybe we could? :-) Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplist

Re: [Python-Dev] issue5578 - explanation

2009-04-02 Thread Chris Withers
R. David Murray wrote: On Wed, 1 Apr 2009 at 13:12, Chris Withers wrote: Guido van Rossum wrote: Well hold on for a minute, I remember we used to have an exec statement in a class body in the standard library, to define some file methods in socket.py IIRC. But why an exec?! Surely there

Re: [Python-Dev] issue5578 - explanation

2009-04-02 Thread Chris Withers
Guido van Rossum wrote: from functools import partial from new import instancemethod def meth(name,self,*args): return getattr(self._sock,name)(*args) for _m in _socketmethods: p = partial(meth,_m) p.__name__ = _m p.__doc__ = getattr(_realsocket,_m).__doc__ m = instancemethod(p,N

[Python-Dev] Package Management - thoughts from the peanut gallery

2009-04-02 Thread Chris Withers
Hey All, I have to admit to not having the willpower to plough through the 200 unread messages in the packaging thread when I got back from PyCon but just wanted to throw out a few thoughts on what my python packaging utopia would look like: - python would have a package format that included

Re: [Python-Dev] issue5578 - explanation

2009-04-03 Thread Chris Withers
Guido van Rossum wrote: But anyways this is moot, the bug was only about exec in a class body *nested inside a function*. Indeed, I just hate seeing execs and it was an interesting mental exercise to try and get rid of the above one ;-) Assuming it breaks no tests, would there be objection to m

Re: [Python-Dev] Package Management - thoughts from the peanut gallery

2009-04-03 Thread Chris Withers
Tarek Ziadé wrote: I have taken the commitment to lead these tasks and synchronize the people that are willing to help on this. Good, I'm one of those people, sadly my only help may be to ask "how is this bit going to be done?". The tasks discussed so far are: - version definition (http://

Re: [Python-Dev] Package Management - thoughts from the peanut gallery

2009-04-03 Thread Chris Withers
Olemis Lang wrote: On Fri, Apr 3, 2009 at 11:20 AM, Chris Withers wrote: Tarek Ziadé wrote: - PyPI mirroring (PEP 381) I don't see why PyPI isn't just ported to GAE with an S3 data storage bit and be done with it... Offline mirrors for people behind firewalls already have sol

Re: [Python-Dev] PEP 382: Namespace Packages

2009-04-06 Thread Chris Withers
Martin v. Löwis wrote: Chris Withers wrote: Martin v. Löwis wrote: I propose the following PEP for inclusion to Python 3.1. Please comment. Would this support the following case: I have a package called mortar, which defines useful stuff: from mortar import content, ... I now want to

Re: [Python-Dev] issue5578 - explanation

2009-04-06 Thread Chris Withers
Benjamin Peterson wrote: Assuming it breaks no tests, would there be objection to me committing the above change to the Python 3 trunk? That's up to Benjamin. Personally, I live by "if it ain't broke, don't fix it." :-) Anything using an exec is broken by definition ;-) "practicality beats pu

Re: [Python-Dev] PEP 382: Namespace Packages

2009-04-06 Thread Chris Withers
P.J. Eby wrote: See the third paragraph of http://www.python.org/dev/peps/pep-0382/#discussion Indeed, I guess the PEP could be made more explanatory then 'cos, as a packager, I don't see what I'd put in the various setup.py and __init__.py to make this work... That said, I'm delighted to

[Python-Dev] How do I update http://www.python.org/dev/faq?

2009-04-11 Thread Chris Withers
Hi All, How do I update the faq on the website? This section: http://python.org/dev/faq/#how-to-test-a-patch ...could do with fleshing out from this discussion: http://mail.python.org/pipermail/python-dev/2009-March/086771.html ...and the link to: http://www.python.org/doc/lib/module-test.h

[Python-Dev] Test failures on Python 2.7 (trunk)

2009-04-11 Thread Chris Withers
Hi All, Got these when running from checkout on Mac OS: Could not find '/Users/chris/py2k/Lib/test' in sys.path to remove it ... test test_asynchat produced unexpected output: ** error: uncaptured python exception, closing chann

[Python-Dev] Test failure on Py3k branch

2009-04-11 Thread Chris Withers
Hi All, Also got the following failure from a py3k checkout: test test_cmd_line failed -- Traceback (most recent call last): File "/Users/chris/py3k/Lib/test/test_cmd_line.py", line 143, in test_run_code 0) AssertionError: 1 != 0 Should I expect this or does someone owe beer? ;-) Chris

Re: [Python-Dev] Test failure on Py3k branch

2009-04-11 Thread Chris Withers
Mark Dickinson wrote: On Sat, Apr 11, 2009 at 11:14 AM, Chris Withers wrote: Also got the following failure from a py3k checkout: test test_cmd_line failed -- Traceback (most recent call last): File "/Users/chris/py3k/Lib/test/test_cmd_line.py", line 143, in test_run

Re: [Python-Dev] issue5578 - explanation

2009-04-11 Thread Chris Withers
Steve Holden wrote: Anything using an exec that can be done in some other (more pythonic way) There's *always* another way ;-) is broken by definition ;-) Benjamin? We've just had a fairly clear demonstration that small semantic changes to the language can leave unexpected areas borked.

Re: [Python-Dev] issue5578 - explanation

2009-04-11 Thread Chris Withers
Chris Withers wrote: Benjamin Peterson wrote: Assuming it breaks no tests, would there be objection to me committing the above change to the Python 3 trunk? That's up to Benjamin. Personally, I live by "if it ain't broke, don't fix it." :-) Anything using an exe

  1   2   3   >