Nick Coghlan added the comment:
Sounds good to me :)
--
___
Python tracker
<http://bugs.python.org/issue17741>
___
___
Python-bugs-list mailing list
Unsubscribe:
Nick Coghlan added the comment:
The event generation API for ElementTree being discussed in issue 17741 is
potentially relevant here.
I think that style of API is preferable, as it doesn't alter how data is fed
into the parser, just how it is extracted.
--
nosy: +nco
Nick Coghlan added the comment:
Eli's summary left out an exchange between us that happened after he'd already
written the summary - he pointed out the same problem with the EventParser name
that you noticed: it's really an alternative XMLParser that exposes
read_events(),
Nick Coghlan added the comment:
Since parsers don't support changing the target after creation, I think it
makes sense to deprecate passing in a parser *instance*, and instead require
passing in a callback that accepts the target to use and *returns* an
appropriate parser object. The &q
Nick Coghlan added the comment:
The whole point of the new API is not to replace XMLParser, but to
provide a convenience API to set up a particular combination of an
XMLParser with a particular kind of custom target. It just happens
that actually *implementing it* that way doesn't work
Nick Coghlan added the comment:
Stefan, your proposed merged design isn't going to happen. Two alternative
ways of using the one class is far more complicated to explain to users
than exposing a helper that composes the existing API components to address
a particular use case (particularly
Nick Coghlan added the comment:
I'd also be fine with "is_carrier_private", or, as you say, the inverse
"is_global" for "not is_private and not is_carrier_private and not (any of
the other private addresses)" (assuming I understood that suggestion
correctly).
Nick Coghlan added the comment:
Sorry, Stefan, I missed your last comment before posting mine. It appears
you had already reached the same conclusion I had regarding further high
level design discussion being pointless :)
--
___
Python tracker
<h
Nick Coghlan added the comment:
Right, subtests are about improving reporting without adding selectivity.
Explicitly parameterized tests require more structural changes to tests,
but give the selectivity that subtests don't.
--
___
Python tr
Nick Coghlan added the comment:
Looks good to me. I think it's OK to leave the optional resources in the
set of things covered by the buildbots rather than expecting them to always
be run in pre-commit testing.
--
___
Python tracker
Nick Coghlan added the comment:
The fact I don't run the tests with - uall before committing had nothing to
do with it whatsoever. Nope. Nothing at all ;)
--
___
Python tracker
<http://bugs.python.org/is
Nick Coghlan added the comment:
The method call should keep the file object alive until it completes (due to
the self reference). What behaviour prompted the conclusion that it is being
closed early?
If the symptom is that the data isn't being written to disk, we may have a
missing
Nick Coghlan added the comment:
An easier hack is likely just a new "always run in subprocess" container
with submodule names in regrtest.py. It's not elegant, but it will work.
--
___
Python tracker
<http://bugs.pyt
Nick Coghlan added the comment:
Although the "well, don't do that then" alternative also sounds reasonable,
and better localises the information about how the test should run.
--
___
Python tracker
<http://bugs.pyt
New submission from Nick Coghlan:
As discussed at the language summit earlier this year [1], it isn't alway easy
to tell when glancing through the standard library docs which modules are
merely hanging around because removing them would break backwards compatibility.
However, after revi
Nick Coghlan added the comment:
Switching to a docs bug - this won't be fixed in 2.7, but it should probably be
documented as a limitation.
--
assignee: -> docs@python
components: +Documentation -Extension Modules
nosy: +docs@python, ncoghlan
stage: ->
Changes by Nick Coghlan :
--
assignee: -> ncoghlan
___
Python tracker
<http://bugs.python.org/issue18952>
___
___
Python-bugs-list mailing list
Unsubscrib
Nick Coghlan added the comment:
I was going to go with the "move the directory" solution, but realised that
would mean existing checkouts end up downloading the data files again, and also
with a stale copy of the data cluttering them up.
So adjusting the support module for the
Nick Coghlan added the comment:
You mean I actually need to pay proper attention now? :)
--
___
Python tracker
<http://bugs.python.org/issue18808>
___
___
Pytho
Nick Coghlan added the comment:
Slavek - one you may want to take a look at this. Antoine and Tim are trying to
fix a race condition with the destruction of thread state objects, but the
current fix isn't playing nice on older Linux kernels (including the one in
RHEL 6).
--
New submission from Nick Coghlan:
We keep muttering about coming up with a less conflict-prone approach to
Misc/NEWS updates, without ever settling on a concrete solution.
For the last big discussion on this, see the subthread starting at
https://mail.python.org/pipermail/python-committers
New submission from Nick Coghlan:
Issue 18952 (fixed in http://hg.python.org/cpython/rev/23770d446c73) was
another case where a test suite change resulted in tests not be executed as
expected, but this wasn't initially noticed since it didn't *fail* the tests,
it just silently sk
Changes by Nick Coghlan :
--
title: Find a way to detect regressions in test execution -> Find a way to
detect incorrectly skipped tests
___
Python tracker
<http://bugs.python.org/issu
Nick Coghlan added the comment:
The one I ran into earlier today tried to merge the entirety of the
3.3.x RC NEWS into the 3.4 NEWS :P
--
___
Python tracker
<http://bugs.python.org/issue18
Nick Coghlan added the comment:
No, way down in Tests.
--
___
Python tracker
<http://bugs.python.org/issue18967>
___
___
Python-bugs-list mailing list
Unsub
Nick Coghlan added the comment:
I don't recall this *particular* wrinkle being discussed. Silently failing
to define one of the requested enum members seems quite dubious.
--
___
Python tracker
<http://bugs.python.org/is
Nick Coghlan added the comment:
I don't think I've *ever* had NEWS successfully merge when working on
a bug fix (even after the move to hg). It's one of the reasons I
prefer working on new features, or bugs where the fix is too intrusive
for a mainten
Nick Coghlan added the comment:
It's about navigability/discovery of the source - to find out how the sys
module gets initialised, you currently have to look in multiple places. The
idea of the patch is to simplify that to the one logical place: sysmodule.c
However, I'm not sure
Nick Coghlan added the comment:
I thought about that, and I'd prefer a dedicated dictionary to avoid questions
of name conflicts.
Wrapping the keyword args in a dict() call is still pretty clean:
C = operator.build_class('C', (A, B), dict(m
Nick Coghlan added the comment:
It occurs to me that, for naming consistency, the callback arg should be
documented as "exec_body" rather than "eval_body".
I'll try to get to a proper patch review this weekend.
--
Nick Coghlan added the comment:
And, back on topic...
I've been pondering this problem and the approach I adopted in my branch and
decided it's the *wrong* way to go about it. It takes an already complex piece
of code and makes it even more complicated.
A completely different app
Nick Coghlan added the comment:
Heh, rereading the issue comments, I noticed that my latest idea is quite
similar to what Terry suggested last year, just using delegation to adjust the
signatures appropriately rather than copying the function pointers directly
over
Nick Coghlan added the comment:
This failure is also affecting the new RHEL-6 buildbot I'm attempting to bring
online.
Failure on trunk:
http://www.python.org/dev/buildbot/all/builders/x86%20RHEL%206%203.x/builds/12/steps/test/logs/stdio
Failure on 3.2:
http://www.python.org/dev/buildbo
Nick Coghlan added the comment:
I'm wondering if there may be a deeper problem here: how certain are we that
bdist_rpm isn't using the system Python to handle the byte compilation step? It
would explain why the files are still being generated in the old locations.
And, in pract
Changes by Nick Coghlan :
--
resolution: -> fixed
stage: test needed -> committed/rejected
status: open -> closed
versions: -Python 2.7
___
Python tracker
<http://bugs.python.or
Nick Coghlan added the comment:
I put those explicit path checks in there deliberately.
I really don't want to go back to having any __file__ attributes that are
sensitive to sys.path changes.
--
___
Python tracker
<http://bugs.py
Nick Coghlan added the comment:
Oops: s/sensitive to sys.path changes/sensitive to current working directory
changes/
--
___
Python tracker
<http://bugs.python.org/issue14
Nick Coghlan added the comment:
My preference would also be for _frozen_importlib._bootstrap to overwrite as
much evidence of itself as it can with the "real" one.
This would also mean that changes to importlib._bootstrap would actually take
effect for user code almost immediately
Nick Coghlan added the comment:
Another use case for a writeable __closure__ attribute is to make it possible
to manually break reference cycles:
http://blog.ccpgames.com/kristjan/2012/04/23/reference-cycles-with-closures/
--
___
Python tracker
Nick Coghlan added the comment:
To answer my last question: plenty of people. Even within Fedora itself there
are parallel python 2 and python 3 RPM stacks.
--
___
Python tracker
<http://bugs.python.org/issue14
Nick Coghlan added the comment:
It occurs to me there's a way to check my theory: if we update the failing test
to explicitly check the magic cookie in at least one of the precompiled pyc
files (rather than just expecting the files' existence), then it should also
start failing
Nick Coghlan added the comment:
Victor's argument makes sense to me. What I'd be inclined to do is shout at the
reader a bit in the traceback header by making it:
Traceback (most recent call FIRST):
And put a comment in the source code with the gist of what Victor wrote a
Nick Coghlan added the comment:
Yeah, I was actually going to suggest forcing an absolute path for
__main__.__file__ in runpy if you didn't want to do it in importlib itself.
I'm much happier with that approach than changing the tests, so the updated
patch looks
Changes by Nick Coghlan :
--
assignee: ncoghlan -> brett.cannon
stage: patch review -> commit review
___
Python tracker
<http://bugs.python.org/i
Nick Coghlan added the comment:
Still no patch from me, but I did create the rudiments of a shared script for
poking around at the import internals (Tools/scripts/import_diagnostics.py)
Looking at Antoine's patch, I'd be happier with it if it *didn't* mutate the
Nick Coghlan added the comment:
OK, I'm leaning back towards my original preference of getting
_frozen_importlib out of the way as quickly as we can.
Specifically, I'm thinking of separating out the entry point used by
importlib.__init__ from that used by pythonrun.c, such that
Nick Coghlan added the comment:
Yes, in that you'll be able to pick up changes in _bootstrap.py *without*
having to rebuild Python.
With this in place, we could then get rid of the automatic regeneration of
importlib.h which is a complete nightmare if you ever break your built
interp
Nick Coghlan added the comment:
Actually, rather than a test in test suite, we would just change the current
automatic rebuild to a Modules/Setup style "'Lib/importlib._bootstrap.py' is
newer than 'Python/importlib.h', you may need to r
Nick Coghlan added the comment:
The other advantage of splitting the entry points is that we can tweak Brett's
plan to make the import machinery explicit such that it happens in a separate
function that's only called from __init__.py.
That way the published hooks will always be f
Nick Coghlan added the comment:
At the very least, failing to regenerate importlib.h shouldn't be a fatal build
error. It should just run with what its got, and hopefully you will get a
working interpreter out the other end, such that you can regenerate the frozen
module on the next
Nick Coghlan added the comment:
My plan would be for the frozen version to be entirely implicit, and have only
the subsequent import of the version from disk actually modify the public hooks.
However, I realised today that my current patch would break
"stdlib-from-zipfile" approach
Nick Coghlan added the comment:
Your basic approach looks sensible to me.
One trick I use in test_cmd_line_script to prevent recreation is to simply
delete the source file. If the source is gone, implicit recreation is
impossible. Unfortunately, that doesn't work for __pycache__, sinc
Nick Coghlan added the comment:
Antoine (added to nosy list) indicated he wasn't seeing the failure on a Mageia
system, so that's another point in favour of a Fedora/RHEL specific problem.
Also added Dave Malcolm as the Fedora Python package maintainer.
Applying #11599 to ge
Nick Coghlan added the comment:
I tried the simple fix a couple of different ways on the RHEL6 buildbot. First
by changing line 315 of Lib/distutils/command/bdist_rpm.py" to be:
rpm_cmd = ['rpmbuild', '--define', '__python %s' % sys.executable]
And t
Nick Coghlan added the comment:
Uploaded new bootstrapping patch that handles the fully explicit import
machinery.
I also tweaked a couple of things so it plays nicely in terms of building an
initial version with the checked in importlib.h. Specifically: pythonrun still
calls
New submission from Nick Coghlan :
The PEP czar role isn't yet described in the relevant meta PEPs.
We should fix that, as well as updating the PEP metadata to include the named
czar where relevant.
--
components: None
messages: 159740
nosy: ncoghlan
priority: normal
severity: n
Nick Coghlan added the comment:
Latest draft of API is here:
http://contextlib2_dev.readthedocs.org/en/latest/index.html#contextlib2.ExitStack
An updated version of the "I forgot I could use multiple context managers in a
with statement" example:
with ExitStack() as stack:
Nick Coghlan added the comment:
I'm not yet sure the proposed fix in the patch is the right approach (I need to
look at the surrounding code), but I believe Pavel's right that get_loader()
should be returning None in this case instead of throwing an
Nick Coghlan added the comment:
Moving zipimporter to Python code is harder than it sounds: we don't want to
break the ability to ship the standard library itself inside a zipfile.
If you try to move zipimporter to pure Python, you could easily end up with a
*very* ugly bootstrapping pr
Nick Coghlan added the comment:
The piece you're missing is that the interpreter state holds a direct reference
to the import machinery in interp->importlib, and *that's* what gets used by
the builtin __import__ implementation.
I'm beginning to think the thing to do is
Nick Coghlan added the comment:
Forgot to add: in our own tests, we should ensure that both the frozen and
on-disk versions get executed.
I believe that's already the case, since I don't recall anyone removing the
test infrastructure that ensured both import.c and importlib are
Nick Coghlan added the comment:
In that case, how about we go with:
1. By default, importlib._bootstrap is never imported. Instead, it is set to be
a reference to _frozen_importlib. However, _frozen_importlib does *not* lie
about where it came from (and doesn't assume the on-disk s
Nick Coghlan added the comment:
In going to add documentation for your patch, I realised the operator module is
not the right place for this.
The "types" module actually seems like the most appropriate home, but that will
require adding a _types module to back it.
I'll post t
Nick Coghlan added the comment:
I'm currently planning to postpone fixing this until 3.4. However, if someone
else wants to pick it up for 3.3, go ahead.
--
assignee: ncoghlan ->
versions: +Python 3.4 -Python 3.3
___
Python tracke
Nick Coghlan added the comment:
Superseded by issue 13585 (which will add an improved dynamic context
management API)
--
resolution: postponed -> out of date
status: open -> closed
superseder: -> Add contextlib.ExitStack
___
Python track
Changes by Nick Coghlan :
--
assignee: ncoghlan ->
___
Python tracker
<http://bugs.python.org/issue1294232>
___
___
Python-bugs-list mailing list
Unsubscri
Nick Coghlan added the comment:
Based on the python-dev thread [1], the proposed name for this API is now
"types.new_class()".
This parallels the existing imp.new_module() naming scheme and avoids various
problems with the idea of using a static method on type itself (descriptor
New submission from Nick Coghlan :
Reading http://nedbatchelder.com/code/coverage/subprocess.html, it occurred to
me that there are various tracing and profiling operations that could be
cleanly handled with significantly less work on the part of the
tracing/profiling tool authors if the
Changes by Nick Coghlan :
--
stage: -> needs patch
type: -> enhancement
versions: +Python 3.3
___
Python tracker
<http://bugs.python.org/issue14803>
___
__
Changes by Nick Coghlan :
--
components: +Interpreter Core
___
Python tracker
<http://bugs.python.org/issue14803>
___
___
Python-bugs-list mailing list
Unsub
Nick Coghlan added the comment:
Bumping the target version to 3.4.
This is still a good long term idea, but it's a substantial enough change that
we really want to land it early in a development cycle so we have plenty of
time to hammer out any issues.
--
versions: +Pytho
New submission from Nick Coghlan :
With PEP 415 accepted as the implementation of the "raise exc from None"
syntax, it raises the prospect of exceptions with both __cause__ and
__context__ set to non-None values, and __suppress_context__ set to False.
The initial PEP 415 patch t
Changes by Nick Coghlan :
--
dependencies: +improved PEP 409 implementation
___
Python tracker
<http://bugs.python.org/issue14805>
___
___
Python-bugs-list mailin
Nick Coghlan added the comment:
I have accepted the PEP.
Issue 14805 now covers the separate question of allowing both __cause__ and
__context__ to be displayed in the same traceback.
--
___
Python tracker
<http://bugs.python.org/issue14
Nick Coghlan added the comment:
As Ned notes, to cover *implicit* creation of Python subprocesses an
environment based solution would be needed to ensure the subprocesses adopt the
desired settings. The advantage that has over the current workarounds is that
it can be scoped to only affect
Changes by Nick Coghlan :
--
title: Enhanced command line features for the runpy module -> Add feature to
allow code execution prior to __main__ invocation
___
Python tracker
<http://bugs.python.org/issu
Nick Coghlan added the comment:
Because I was thinking about a specific case where I *could* configure how the
subprocesses were invoked (launching a test server for a web application). It
took Ned's comment to remind me of the original use case (i.e. coverage
statistics for a subproc
Nick Coghlan added the comment:
Actually, there's another use case for you:
export PYTHONRUNFIRST="import faulthandler; faulthandler.enable()"
application.py
All subprocesses launched by the application will now have faulthandler
enabled, *without* modifying the application.
Nick Coghlan added the comment:
No, that increases complexity and coupling, because it would only work for
modules that were designed to work that way. Execution of a simple statement
will work for any global state that can be modified from pure Python code
(including invocation of more
New submission from Nick Coghlan :
This issue tracks the incorporation of the ipaddress module into Python 3.3.
Tasks to be completed:
- add Lib/ipaddress.py from [1]
- add Lib/test_ipaddress.py from [1]
- create module reference docs from docstrings in [1]
- add Doc/library/ipaddress.py and
Nick Coghlan added the comment:
I'm closing this *without* converting ContextDecorator._recreate_cm() to a
public method (although I'm also attaching the patch that would have done
exactly that).
My rationale for doing so is that I *still* consider making
_GeneratorContextManager
New submission from Nick Coghlan :
Currently, __class__ references from methods in 3.3 aren't being mapped
correctly to the class currently being defined.
This goes against the documented behaviour of PEP 3135, which states explicitly
that the new zero-argument form is equivalent to
Changes by Nick Coghlan :
--
nosy: +pmoody
___
Python tracker
<http://bugs.python.org/issue14814>
___
___
Python-bugs-list mailing list
Unsubscribe:
Nick Coghlan added the comment:
Stage 1 complete - the code and tests are in (along with the other
miscellaneous updates to ACKS, NEWS and What's New).
Next steps are to convert the wiki page into a HOWTO and the docstrings into a
module API reference. Georg offered to help with the
Nick Coghlan added the comment:
Review comments from Terry Reedy:
http://mail.python.org/pipermail/python-dev/2012-May/119548.html
The PEP review focused mainly on the API, Terry's comments focus on code
readability and the docstrings.
--
assignee: ->
Nick Coghlan added the comment:
For 3, installing the PEP 397 launcher will be the long term "on-by-default"
solution.
For 2, adding the Scripts subdirectory seems reasonable.
FWIW, Window used to have *very* severe restrictions on the maximum length of
PATH, as well as gratuit
New submission from Nick Coghlan :
After approving the pyvenv PEP, I decided to play around with the other big
packaging enhancement in 3.3: pysetup.
The following command installed distribute:
pysetup3.3 -n install distribute
The "-n" *should* have caused that to be a dry r
New submission from Nick Coghlan :
Do "make altinstall" from trunk.
Try running "pysetup3.3 install distutils2"
This won't work properly, because distutils2 uses Python 2 syntax.
However, after running that command:
"pysetup3.3 remove distutils2" complai
Nick Coghlan added the comment:
Yeah, only the first two lines of the copyright header are really needed.
--
___
Python tracker
<http://bugs.python.org/issue14
Nick Coghlan added the comment:
The module reference docs are the main outstanding item now. Georg, up to you
whether you want to generate the first pass at those from the docstrings for
the alpha or leave it until afterwards.
--
___
Python
Nick Coghlan added the comment:
There's one other thing I particularly want to look at, but it can wait until
after the alpha: the "TODO" comments I added relating to the new
self._address_class attribute on the *Network classes.
Specifically, it seems to me that the various
Nick Coghlan added the comment:
FWIW, I now think this should *only* be a long option. Short options are
precious, and this is an unusual enough use case that I'm not yet sure it
deserves one.
In particular, we may decide to use "-p" later for adding directories to
sys.pa
Nick Coghlan added the comment:
FWIW, I now think this should *only* be a long option. Short options are
precious, and this is an unusual enough use case that I'm not yet sure it
deserves one.
In particular, we may decide to use "-p" later for adding directories to
sys.pa
Nick Coghlan added the comment:
As the checkin message says, this is once again a problem on trunk. The
relevant test is still in place in test_super.py, I just marked it as an
expected failure.
unittest.mock is currently avoiding the problem via the "_safe_super = super"
worka
Nick Coghlan added the comment:
I like MvL's approach if we can make it work - then we can set up the
importlib.h regeneration to automatically bootstrap itself from the source file
and avoid having to add another binary to the build process.
--
nosy: +nco
Nick Coghlan added the comment:
There are some additional challenges potentially posed by suggestions like
http://bugs.python.org/issue10399, which would allow the compiler itself to use
Python extensions.
However, those could be overcome by requiring that the compiler support running
with
Changes by Nick Coghlan :
--
resolution: -> fixed
stage: -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.or
Nick Coghlan added the comment:
Applied to 3.2 and trunk (I forgot to mention the issue name in the merge
commit message).
I tweaked Ross's patch slightly to:
1. Use self.python rather than sys.executable
2. Also default self.python to "python3" if neither --python nor --
Nick Coghlan added the comment:
I'm not sure what platform this was on, but if it was a Fedora system then
test_distutils should also be working as non-root now (see #14443)
--
nosy: +ncoghlan
___
Python tracker
<http://bugs.python.org/is
Nick Coghlan added the comment:
My original report looks like a misdiagnosis. What appears to be happening is
that "pysetup3.3 install" is case *insensitive* (thus allowing "pysetup3.3
install distutils2", but "pysetup3.3 remove" is case *sensitive*, thus
3101 - 3200 of 6301 matches
Mail list logo