Tshepang Lekhonkhobe added the comment:
A quick patch would be 'This tutorial was written for argparse in Python 3. A
few details are different in 2.x.' But feel free to do better.
That really sounds great, especially since it avoids resorting to
things as ugly as ...and this is Python 2
New submission from Poul-Henning Kamp:
I'm surprised that this does not find any matches:
import re
r = re.compile(^abc)
s = 0123abcxyz
for i in range(0,len(s)):
print(i, r.search(s, i))
I would have expected the i==4 case to match ?
(This is on:
Python 2.7.3 (default,
Ned Deily added the comment:
Note the warning about '^' in the documentation for the re search method:
The optional second parameter pos gives an index in the string where the
search is to start; it defaults to 0. This is not completely equivalent to
slicing the string; the '^' pattern
Ned Deily added the comment:
To expand a bit, rather than multiple calls to search, you can use the start
and end methods of the match object to determine where the string (without the
'^' anchor) matches. For example:
r = re.compile(abc)
s = 0123abcxyz
match = r.search(s)
if match:
Mark Dickinson added the comment:
Yep, this was fixed as part of the issue 14658 fix.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1694663
___
Charles-François Natali added the comment:
Here's a new version, with the following changes:
- there's no SELECT_ERR anymore: error conditions (POLLNVAL|POLLERR and also
POLLHUP) are reported as SELECT_IN|SELECT_OUT, depending on the input event
mask: I don't think that a separate error flag
Changes by Trent Nelson tr...@snakebite.org:
--
nosy: +trent
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16762
___
___
Python-bugs-list mailing
Poul-Henning Kamp added the comment:
I have tried hard, but have utterly failed to figure out why you have chosen
the semantics for ^ you mention, tried to come up with a plausible use case,
and I have utterly failed.
I find it distinctly counter intuitive.
I think the Principle of Least
Giampaolo Rodola' added the comment:
@Guido: agreed.
there's no SELECT_ERR anymore [...] the error will be reported when the FD
will be read/written
I don't think this is a good idea, particularly during this early stage.
This assumption might be valid for select() but not for poll() and
Eli Bendersky added the comment:
The patch was committed with some minor modifications to 3.3 (c1fc6b6d1cfc) and
default branch (e1bee8b09828).
New tests were added to the test classes (please don't add new tests to the
doctests, they are deprecated).
--
Eli Bendersky added the comment:
I investigated a bit, and type checks were added to protect from such mixing.
Please open a new patch with a speficic reproducer if you run into similar
problems (interepreter crash).
--
___
Python tracker
Changes by Eli Bendersky eli...@gmail.com:
--
resolution: - fixed
stage: patch review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16849
___
Changes by Eli Bendersky eli...@gmail.com:
--
dependencies: +sys.path in tests contains system directories
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16817
___
Eli Bendersky added the comment:
Issue #16817 discusses a similar problem arising with test___all__. The patches
have to be updated to provide a generic way to delegate certain tests to
separate subprocesses.
Arfrever, it's not necessary to update all the patches at once. Start with the
one
Giampaolo Rodola' added the comment:
Inline comments:
http://bugs.python.org/review/16853/
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16853
___
Charles-François Natali added the comment:
there's no SELECT_ERR anymore [...] the error will be reported when the FD
will be read/written
I don't think this is a good idea, particularly during this early stage.
This assumption might be valid for select() but not for poll() and epoll()
New submission from Serhiy Storchaka:
Here is a set of patches which clean a few minor things: add spaces after
if/while/return/etc, remove spaces after class/function name, remove redundant
parens after if/while/return/etc. One set contains only space changes, another
set contains parens
Changes by Serhiy Storchaka storch...@gmail.com:
--
keywords: +patch
Added file: http://bugs.python.org/file28576/minor_things_parens-2.7.diff
Added file: http://bugs.python.org/file28577/minor_things_parens-3.2.diff
Added file:
Giampaolo Rodola' added the comment:
The actual error (which may be ECONNRESET, but also EBADF, ENOBUFS...) will
be raised
upon the next call to read()/write(), or can be retrieved through
getsockopt(SO_ERROR).
Mmmm... I would be tempted to think the same but the fact that both Tornado and
Looks good in most of the places, but at some places the parenthesis are of
course helpful for cohesiveness, and this can be quite subjective. With
these patches, are you in general removing all instances of parenthesis
when it is not required or also considering for places where parens may
help
Walter Mundt added the comment:
Thanks for looking into the version applicability. I'd bet that under the
covers IDLE is relying on the traceback module too. Anyone have a Windows
CPython 2.7.3 and care to check the output of the test code in a cmd window? I
originally ran it unindented
Matthew Barnett added the comment:
The semantics of '^' are common to many different regex implementations,
including those of Perl and C#.
The 'pos' argument merely gives the starting position the search (C# also lets
you provide a starting position, and behaves in exactly the same way).
Serhiy Storchaka added the comment:
For me none of these parens help while reading the code (but this is quite
subjective). I not object if only a part of these changes will be applied.
Review the patches and point what changes should be applied and what changes
should not.
--
Senthil Kumaran added the comment:
Should not this be?
*.S) obj=`basename $src .S`.o; cc='$(CC)';; #
The filetype extension .S instead .cpp.
And, I have less know-how on these, but for my understanding how would
non-preprocessed asm files (.s) will be handled? And doc reference to
how this
Guido van Rossum added the comment:
I think that this needs extensive tests that verify the behavior of many end
cases, including under duress (e.g. when there are too many connections for the
kernel to handle). That would seem the only way to make sure that the code is
reliable across
Xavier de Gaye added the comment:
Same problem in 3.4.
$ ./python
Python 3.4.0a0 (default:e1bee8b09828, Jan 5 2013, 20:29:00)
[GCC 4.3.2] on linux
Type help, copyright, credits or license for more information.
import asyncore
a = asyncore.dispatcher()
del a.socket
a.foo
Traceback (most
Giampaolo Rodola' added the comment:
asyncore's __getattr__ horror was scheduled for removal a long ago (3.1 as per
issue8483).
We can safely remove it for 3.4 and fix the RuntimeError exception above for
all the earlier Python versions which are affected.
--
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
assignee: - giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13103
___
___
Jesús Cea Avión added the comment:
How about innecessary code churn?
--
nosy: +jcea
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16871
___
___
Jesús Cea Avión added the comment:
I elaborate: issue15580. An example of many.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16871
___
___
New submission from João Bernardo:
This is actually a proposition for a behavior change caused by a bugfix.
I have a project dealing with a metaclass factory and the next thing in the
TODO list was to add multiple inheritance support.
For my surprise, I tried and there was no metaclass
Roundup Robot added the comment:
New changeset 927afb7bca2a by Antoine Pitrou in branch 'default':
Issue #8109: The ssl module now has support for server-side SNI, thanks to a
:meth:`SSLContext.set_servername_callback` method.
http://hg.python.org/cpython/rev/927afb7bca2a
--
nosy:
Charles-François Natali added the comment:
I think that this needs extensive tests that verify the behavior of many end
cases, including under duress (e.g. when there are too many connections for
the kernel to handle). That would seem the only way to make sure that the
code is reliable
Antoine Pitrou added the comment:
I've committed the latest patch. Thank you very much!
--
resolution: - fixed
stage: patch review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8109
Meador Inge added the comment:
The EpollSelector and PollSelector implementations are basically identical.
You might want to refactor these to share more code.
--
nosy: +meador.inge
___
Python tracker rep...@bugs.python.org
danblack added the comment:
I've committed the latest patch. Thank you very much!
much appreciate your help.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8109
___
Meador Inge added the comment:
This seems like a reasonable addition to me. Although, I don't like the
substantial amount of time part (yes I know it was already there). That
should probably be replaced with something more concrete, e.g. one week.
--
nosy: +meador.inge
Changes by Meador Inge mead...@gmail.com:
--
nosy: +meador.inge
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9685
___
___
Python-bugs-list
Chris Jerdonek added the comment:
I would also take out the sentence about forgetting about the issue, because
that's just one of several possible reasons and I don't think usually the main
reason.
--
nosy: +chris.jerdonek
___
Python tracker
Changes by Franck Michea franck.mic...@gmail.com:
--
nosy: +kushou
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16143
___
___
Python-bugs-list
Chris Jerdonek added the comment:
Here is another recent comment from Georg on this topic:
And please don't commit cosmetic/cleanup changes to bugfix branches in the
future.
(from http://bugs.python.org/issue16793#msg178372 )
--
nosy: +chris.jerdonek
Terry J. Reedy added the comment:
console = cmd window. I did run it there and that is where I duplicated your
2.7.3 result. I don't understand the different result with 2.7.3 IDLE, since it
runs in a separate pythonw process that *should* give the same result as the
python cmd window. But
Sven Brauch added the comment:
While writing tests, I noticed that the additional fields (lineno, col_offset
for vararg, kwarg, and other arguments) currently are mandatory. Is that a
problem?
It doesn't seem trivial to change that, since apparently only attributes (not
fields) can be
Benjamin Peterson added the comment:
A question mark after the type name in the AST makes it optional.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16795
___
Benjamin Peterson added the comment:
This is material for the python-ideas list.
--
nosy: +benjamin.peterson
resolution: - rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16872
Ezio Melotti added the comment:
I agree with Chris.
+substantial amount of time first ping the issue on the `issue tracker`_
I would add a comma after 'time'.
I don't like the substantial amount of time part (yes I know it
was already there). That should probably be replaced with something
Sven Brauch added the comment:
Thanks. I had seen and tried this before, but the ast module in python, which
is used in the tests, still requires the additional arguments. Probably this is
only valid for the C API?
--
___
Python tracker
Senthil Kumaran added the comment:
Thanks for the fix. The patches fixes it. Since this is a bug fix, it should be
backported all the way till 2.7.
--
assignee: - orsenthil
nosy: +orsenthil
stage: - commit review
versions: +Python 2.7, Python 3.2, Python 3.3
Charles-François Natali added the comment:
I've noticed a bug present in Tulip, pyftpdlib and tornado (and this
implementation, too): none of them passes the maxevents argument to
epoll.poll(), and by default the poll() wrapper in the socket module
uses FD_SETSIZE-1, so you'll never get more
New submission from Charles-François Natali:
In issue #16853, it was noted that many several projects don't set epoll.poll()
maxevents argument, which effectively limits the number of events retuend to
FD_SETSIZE-1 (set in selectmodule.c).
Also, the methode documentation can confuse users
Christian Heimes added the comment:
Coverity reports an issue in the callback function:
/Modules/_ssl.c: 2403 ( uninit_use)
2400/* remove race condition in this the call back while if
removing the
2401 * callback is in progress */
2402
Meador Inge added the comment:
On Sat, Jan 5, 2013 at 5:55 PM, Ezio Melotti rep...@bugs.python.org wrote:
That really depends on the situation. I think the point of that sentence is
to make clear that some time might
pass before someone can look at the issue, and I'm not sure it's
Senthil Kumaran added the comment:
Digging a little deeper, make libainstall needs $(BINDIR) because of this
$(INSTALL_SCRIPT) python-config $(DESTDIR)$(BINDIR)/python$(VERSION)-config
*And* that python$(VERSION)-config file refers to the python exe which is
available only after bininstall or
Guido van Rossum added the comment:
I am trying to use this module in Tulip instead of its pollster implementation,
and am running into a problem. Tulip defines separate
add_reader()/add_writer() methods, which call to the pollster's
register_reader()/register_writer(), respectively. The
New submission from Chris Jerdonek:
The following page:
http://docs.python.org/dev/distutils/uploading.html
says, Other upload options include --repository= or --repository= where url...
I haven't looked into what the correct wording is meant to be.
--
assignee: eric.araujo
Changes by Danilo Bargen gez...@gmail.com:
--
nosy: +gwrtheyrn
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7434
___
___
Python-bugs-list mailing
Benno Leslie added the comment:
I was using this in the case where I just want to link against libpython.a and
for me it is a limited case where I don't really need the functionality of
python-config; so for me this is certainly the best approach. But I concede
this use case is probably a
New submission from Glenn:
when in the Idle editor this line command does not work:
print Hello World!
does not work it says it is a syntax error but
x=Hello World!
x
produces this
'Hello World!'
--
components: IDLE
messages: 179164
nosy: pargo
priority: normal
severity: normal
Ezio Melotti added the comment:
That's because in Python 3 print is a function, so you need to do print(Hello
World!) instead.
See the Python 3 tutorial: http://docs.python.org/3/tutorial/
--
nosy: +ezio.melotti
resolution: - invalid
stage: - committed/rejected
status: open - closed
Ned Deily added the comment:
Also see http://docs.python.org/3/whatsnew/3.0.html#print-is-a-function
--
nosy: +ned.deily
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16875
___
New submission from Charles-François Natali:
Currently, epoll.poll() allocates an epoll_event buffer every time/ this is
bad, because it changes an O(number of ready FDs) syscall into a
O(maxevents/FD_SETSIZE) complexity.
The patch attached allocates a epoll events buffer per epoll instance,
Changes by Charles-François Natali neolo...@free.fr:
Removed file: http://bugs.python.org/file28585/epoll_realloc.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16876
___
Changes by Christian Heimes li...@cheimes.de:
--
nosy: +christian.heimes
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16876
___
___
Changes by Charles-François Natali neolo...@free.fr:
Added file: http://bugs.python.org/file28586/epoll_realloc.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16876
___
Senthil Kumaran added the comment:
Thanks Benno. I think that making libainstall depend on bininstall is
a right solution too. A nod from devs who have committed changes in
that area may help. Also, I believe that this is a bug fix and should
be ported back upto 2.7. If there are any concerns
Nick Coghlan added the comment:
The system Python idea in PEP 432 is aimed at providing an alternate
interpreter binary which changes the default behaviour to be appropriate for
system utilities, while allowing such features to be enabled selectively.
--
New submission from Ian Shields:
Filespecs that start with ~ are not properly handled by os.path.realpath or
os.path.abspath (and maybe other functions). Following console output from
Fedora 17 using Puthon 3.2 illustrates the issue. Similar issue in 2.7
[ian@attic4 developerworks]$ cd ..
R. David Murray added the comment:
This is intentional. You have to call expanduser yourself if you want ~ to be
expanded. Otherwise it is treated as any other path component would be.
I don't understand your final comment, can you clarify?
--
nosy: +r.david.murray
resolution: -
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
stage: - patch review
versions: +Python 3.4
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15204
___
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
nosy: +pitrou
stage: - needs patch
type: - enhancement
versions: +Python 2.7, Python 3.2, Python 3.3, Python 3.4
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11346
Benno Leslie added the comment:
Thanks for the comments Senthil. I'll improve the patch fixing the bug, adding
support for .s and updating the docs.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16869
danblack added the comment:
I don't know which error code should be returned in this case.
Thanks Christian. My fault - asked Antoine to remove the default value for it
and didn't see this like.
make line 2403:
return SSL_TLSEXT_ERR_OK;
--
___
72 matches
Mail list logo