New submission from Izidor Matušov:
There is no way how to figure out the first weekday: Does a week start with
Monday or Saturday? (Or any other day?)
According to documentation, module locale doesn't provide this information.
Module calendar uses European convention (Monday is the first
Charles-François Natali added the comment:
I somehow doubt that the gain is worth the trouble, vectored disk I/O is not as
interesting as vectored read/writes to a NIC.
Actually, a quick search returned this link:
http://www.mail-archive.com/dev@httpd.apache.org/msg23763.html
Running the
Michael Foord added the comment:
This was committed without NEWS entry or documentation update.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17502
___
Antoine Pitrou added the comment:
Agreed with Charles-François, it probably won't make a difference in practice.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17655
___
Antoine Pitrou added the comment:
Did you forget to add test_getpass.py?
--
nosy: +pitrou
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17484
___
Serhiy Storchaka added the comment:
Yes, it's my fault. Here is a patch (with test) which fixes this regression in
2.7. This is 2.7 only issue, in Python 3 arcnames always are unicode. Please
test on Windows.
--
components: +Library (Lib)
keywords: +patch
priority: normal - high
Antoine Pitrou added the comment:
If this goes inside the select module, it could probably help issue #17552 (add
socket.sendfile()) a bit.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16853
Changes by Serhiy Storchaka storch...@gmail.com:
Removed file: http://bugs.python.org/file27950/fast_str_hash.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16427
___
Changes by Serhiy Storchaka storch...@gmail.com:
Removed file: http://bugs.python.org/file27947/fast_hash_2.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16427
___
Roundup Robot added the comment:
New changeset 4d8e9c5ba651 by Andrew Svetlov in branch '3.3':
Add NEWS entry for #17502: Process DEFAULT values in mock side_effect that
returns iterator.
http://hg.python.org/cpython/rev/4d8e9c5ba651
New changeset f82fb8813407 by Andrew Svetlov in branch
Andrew Svetlov added the comment:
NEWS updated, thanks.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17502
___
___
Python-bugs-list mailing
Serhiy Storchaka added the comment:
You can use a single switch instead nested switches:
switch ((kind1 3) + kind2) {
case (PyUnicode_1BYTE_KIND 3) + PyUnicode_1BYTE_KIND: {
int cmp = memcmp(data1, data2, len);
...
}
case (PyUnicode_1BYTE_KIND 3) + PyUnicode_2BYTE_KIND:
New submission from Michael Foord:
When patching builtin names (e.g. open) in a specific namespace you need to
specify create=True or patch will refuse to create a name that doesn't exist.
patch could whitelist the builtin names, when the patch target is a module
object, to not require the
Kushal Das added the comment:
Working on this.
--
nosy: +kushaldas
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17660
___
___
Python-bugs-list
New submission from Thomas Wouters:
The documentation of '%r' in
http://docs.python.org/2/library/stdtypes.html#string-formatting-operations
links to the wrong repr, the module
(http://docs.python.org/2/library/repr.html#module-repr) instead of the builtin
function
Neil Hodgson added the comment:
A quick rewrite showed the single level case slightly faster (1%) on average
but its less readable/maintainable. Perhaps taking a systematic approach to
naming would allow Py_UCS1 to be deduced from PyUnicode_1BYTE_KIND and so avoid
repeating the information in
R. David Murray added the comment:
Indeed I did. That's what I get for staging it one day and committing it the
next...I forgot I hadn't done the add command.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17484
Roundup Robot added the comment:
New changeset 113ff45c3f11 by R David Murray in branch 'default':
#17484: Actually add the getpass tests this time.
http://hg.python.org/cpython/rev/113ff45c3f11
--
___
Python tracker rep...@bugs.python.org
R. David Murray added the comment:
Thanks, Thomas.
--
resolution: - fixed
stage: - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17484
___
Changes by R. David Murray rdmur...@bitdance.com:
--
nosy: +r.david.murray
stage: - needs patch
versions: +Python 3.4
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17659
___
Antoine Pitrou added the comment:
You can use a single switch instead nested switches:
switch ((kind1 3) + kind2) {
case (PyUnicode_1BYTE_KIND 3) + PyUnicode_1BYTE_KIND: {
int cmp = memcmp(data1, data2, len);
...
}
Please let's not add this kind of optifuscation unless it has
New submission from Bohuslav Slavek Kabrda:
When building extension modules of Python 2.7.4 through Modules/Setup.dist, the
socketmodule gets built badly, as it also needs to be compiled with
timemodule.c (see the attached patch).
This was caused by commit 8ec39bfd1f01, which introduced usage
Amaury Forgeot d'Arc added the comment:
Hum, do you have any environment variable that refer to Python27?
In a terminal window (cmd.exe), try the following command:
set | findstr /i python
--
nosy: +amaury.forgeotdarc
___
Python tracker
New submission from z06steve:
fails to replace last occurrence of string v_wofstgvw, reproduced in 3.2.3,
3.2.4 and 3.3.1
a='''
-- V_INT_CTRC_ENTRY_DATE
Kushal Das added the comment:
Initial patchset along with documentation and tests update.
--
keywords: +patch
Added file: http://bugs.python.org/file29731/issue17660.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17660
R. David Murray added the comment:
The fourth argument to re.sub is the replacement count. You've passed it a
flag.
--
nosy: +r.david.murray
resolution: - invalid
stage: - committed/rejected
status: open - closed
___
Python tracker
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
title: socket.sendfile() - create_server
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17552
___
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
title: create_server - socket.sendfile()
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17552
___
Andrew Svetlov added the comment:
I've asked atykhonov for that because we have two sets:
1. Can be done with current exception classes
2. errno values doesn't have concrete OSError inherited exception and we have
to make decision: add new exceptions or use errno check.
This issue don't
Serhiy Storchaka added the comment:
Here is an updated patch which get rid of trick with attribute caching. Globals
used instead. Also added some minor style changes (dropped redundant semicolons
and wrapped too long lines).
--
Added file:
Giampaolo Rodola' added the comment:
New patch in attachment includes a new 'offset' parameter, new tests and also
update file offset on return or in case of error so that file.tell() can be
used to tell how many bytes were transmitted at any time.
This way we'll avoid using a custom
Changes by Giampaolo Rodola' g.rod...@gmail.com:
Added file: http://bugs.python.org/file29733/socket-sendfile2.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17552
___
Patrick Poitras added the comment:
It returns this:
C:\Users\Acebulfset | findstr /i python
Path=C:\Python27\Lib\site-packages\PyQt4;C:\Program Files (x86)\NVIDIA Corporati
on\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windo
Changes by Giampaolo Rodola' g.rod...@gmail.com:
Removed file: http://bugs.python.org/file29733/socket-sendfile2.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17552
___
Changes by Giampaolo Rodola' g.rod...@gmail.com:
Added file: http://bugs.python.org/file29734/socket-sendfile2.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17552
___
Changes by Antoine Pitrou pit...@free.fr:
--
nosy: +kristjan.jonsson
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17662
___
___
Python-bugs-list
Andrew Svetlov added the comment:
Sorry for reopening.
Do you really sure that ENOTCONN and EINVAL doesn't worth to have separate
sublasses?
The same question about Not Supported family.
I don't force to make new exception classes, just like to figure out the status
quo.
If we decide to
Kristján Valur Jónsson added the comment:
This is my fault,
I admit to not being an expert in non-windows builds.
I've no idea how Modules/Setup.dist works but the patch looks reasonable and if
it works, then all is fine.
--
___
Python tracker
Sarah added the comment:
This changes the button's text from Find to Find Again, as per Todd Rovito
and Terry J. Reedy's suggestion.
--
Added file: http://bugs.python.org/file29735/issue17511_FindAgain.patch
___
Python tracker rep...@bugs.python.org
New submission from Paul Wiseman:
I was using py2.7.3 and was getting None back for the errno attribute for an
ssl.SSLError('The read operation timed out').
I noticed in the 2.7.4 release notes that it sounds like there was a fix for
this:
Issue #12065: connect_ex() on an SSL socket now
Andrew Svetlov added the comment:
Sorry, but you cannot just rewrite ./python.exe to just python.exe
At least in http://docs.python.org/devguide/buildbots you have to make probably
three sections:
1. for linux users to use just ./python
2. for Mac ./python.exe
3. for Windows path to
Amaury Forgeot d'Arc added the comment:
Please remove the PYTHONPATH environment variable.
I don't know how it came here, but it's certainly not needed: these directories
are computed at runtime when the python27 interpreter starts;
it can only do harm when another interpreter is installed.
pfg added the comment:
The problem is Makefile.pre.in was changed in a way that stops out-of-tree
builds.
The following patch by Markus Von Appen fixes it.
--
status: closed - open
Added file: http://bugs.python.org/file29736/patch-Makefile.pre.in
Sarah added the comment:
Terry-
There should be a checkbutton option labeled 'Wrap Around'. This is
instantiated on lines 7 and 105-111 of SearchDialogBase.py
Admittedly, it is standard practice to have a 'find' function wrap around. I
suppose we could have the dialog start up with the 'Wrap
Roundup Robot added the comment:
New changeset bad85e4e6b7f by Kristjan Valur Jonsson in branch '2.7':
Issue #17662: fix socketmodule compilation with Setup.dist.
http://hg.python.org/cpython/rev/bad85e4e6b7f
--
nosy: +python-dev
___
Python tracker
Changes by Kristján Valur Jónsson krist...@ccpgames.com:
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17662
___
pfg added the comment:
Ruslan Makhmatkhanov provided this (more complete) patch.
--
Added file: http://bugs.python.org/file29737/patch-Makefile.pre.in
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17649
Changes by pfg giffu...@tutopia.com:
Removed file: http://bugs.python.org/file29736/patch-Makefile.pre.in
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17649
___
Amaury Forgeot d'Arc added the comment:
There are some extension modules (pytables) that do
return Py_INREF(x), x;
and Py_RETURN_NONE is also defined with a comma expression.
Oh, and Cython:
#define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) :
(Py_INCREF(Py_False),
Zachary Ware added the comment:
You seem to end your subroutines (or whatever they are called) using goto
end rather than exit /b. Since popd follows the end label, does this
mean that you get a popd after calling each subroutine?
Yes.
Is this intended and can it cause unmatched
Changes by Mark Dickinson dicki...@gmail.com:
--
nosy: +mark.dickinson
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17589
___
___
Terry J. Reedy added the comment:
'Find Next' is the actual (and standard) suggestion. It s a trivial change
given that you identified the place to make it .
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17511
Changes by Tshepang Lekhonkhobe tshep...@gmail.com:
--
components: Tests
files: diff
nosy: tshepang
priority: normal
severity: normal
status: open
title: convert to idiomatic unittest code
versions: Python 3.2, Python 3.3, Python 3.4
Added file: http://bugs.python.org/file29738/diff
New submission from Peter:
Regression in Python 3.3.0 to 3.3.1, tested under Mac OS X 10.8 and CentOS
Linux 64bit.
The same regression also present in going from Python 2.7.3 from 2.7.4, does
that need a separate issue filed?
Consider this VALID GZIP file, human link:
Antoine Pitrou added the comment:
The issue you mention is unrelated. connect_ex() returns an error code, it
doesn't raise an exception.
As for the errno attribute being None, this is because most SSLErrors don't
correspond to a single OS error. And in the case you mention (the read
New submission from Anselm Kruis:
Version: 2.7.4 (and any prior 2.7-version. not tested with 3.x)
Compiler: VS 2008 Professional
If I compile Python using the batch
PCbuild\build_pgo.bat -2
Visual Studio fails to correctly collect profile information for the project
python27.dll. As a
Changes by Antoine Pitrou pit...@free.fr:
--
assignee: - serhiy.storchaka
nosy: +serhiy.storchaka
stage: - needs patch
type: - behavior
versions: +Python 2.7, Python 3.4
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17666
Antoine Pitrou added the comment:
To be honest this proposal sounds like a quirk more than a feature to me. If
you only special-case builtins, people will have to remember that special case
and it will make the API more complicated.
--
nosy: +pitrou
New submission from Tomasz J. Kotarba:
Tested in 2.7 but possibly affects the other versions as well.
A real life example (note the first character '' being lost):
import re
re.split(r'^(.*)$', 'Homo sapiens catenin (cadherin-associated)')
produces:
['', 'Homo sapiens catenin
Terry J. Reedy added the comment:
I took a look at both the 'Search' and 'Replace' dialogs and both already have
wrap-around present as the default: '[x] Wrap around'. Sorry for not checking
earlier.
Having the find window stay open will make it much easier to visually check all
the
Vhati added the comment:
The 2013-04-08 patch worked on Windows XP.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17656
___
___
Sarah added the comment:
'Find Again' switched to 'Find Next'
--
Added file: http://bugs.python.org/file29740/issue_17511_FindNext.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17511
Matthew Barnett added the comment:
It's not a bug.
The documentation says Split string by the occurrences of pattern. If
capturing parentheses are used in pattern, then the text of all groups in the
pattern are also returned as part of the resulting list.
You're splitting on r'^(.*)$', but
R. David Murray added the comment:
Thanks for the report, but as Matt said it doesn't look like there is any bug
here. The behavior you report is what the docs say it is, and it seems to me
that your most useful suggestion would discard the information about the
group match, making
Tomasz J. Kotarba added the comment:
Hi Matthew,
Thanks for such a quick reply. I know I can get the by putting it in
grouping parentheses. That's not the issue here. The documentation you quoted
says that it splits the string by the occurrences _OF_PATTERN_ and that texts
of all groups
Roundup Robot added the comment:
New changeset be3b4aa2ad28 by doko in branch '2.7':
- Issue #13150, #17512: sysconfig no longer parses the Makefile and config.h
http://hg.python.org/cpython/rev/be3b4aa2ad28
--
nosy: +python-dev
___
Python tracker
Roundup Robot added the comment:
New changeset be3b4aa2ad28 by doko in branch '2.7':
- Issue #13150, #17512: sysconfig no longer parses the Makefile and config.h
http://hg.python.org/cpython/rev/be3b4aa2ad28
--
___
Python tracker
Tomasz J. Kotarba added the comment:
Hi R. David Murray,
Thanks for your reply. I just explained in my previous message to Matthew that
documentation does actually support my view (i.e. it is an issue according to
the documentation). Re. the issue you mentioned (discarding information
Tomasz J. Kotarba added the comment:
Marking as open till I get your response. I hope you reconsider.
--
resolution: invalid -
status: closed - open
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17668
Matthias Klose added the comment:
3.0.13 is now in 2.7.4, 3.2.4, 3.3.1 and the trunk.
--
resolution: - fixed
stage: - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15194
Serhiy Storchaka added the comment:
Oh-oh-h, it's my fault. Thank you, Peter, for your report and the proposed fix.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17666
___
Matthias Klose added the comment:
was released with 2.7.4.
--
resolution: - fixed
stage: patch review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17477
R. David Murray added the comment:
re.split('-', 'abc-def-jlk')
['abc', 'def', 'jlk']
re.split('(-)', 'abc-def-jlk')
['abc', '-', 'def', '-', 'jlk']
Does that make it a bit clearer? Maybe we need an actual example in the docs.
--
assignee: - docs@python
components: +Documentation
Roundup Robot added the comment:
New changeset 29f0836c0456 by Serhiy Storchaka in branch '2.7':
Close #17666: Fix reading gzip files with an extra field.
http://hg.python.org/cpython/rev/29f0836c0456
New changeset f78d2605f452 by Serhiy Storchaka in branch '3.3':
Close #17666: Fix reading gzip
STINNER Victor added the comment:
I get similar Fedora 18 (Linux kernel 3.8.1), ext4 filesystem:
$ rm -f writev.out; sync; sleep 5; ./copy_write
copy+write: 1s576530.
$ rm -f writev.out; sync; sleep 5; ./writev
writev: 1s686619.
I agree to close the issue. At least this issue can be used
Tomasz J. Kotarba added the comment:
I agree that introducing an example like that plus making some slight changes
in wording would be a welcome change to the docs to clearly explain the current
behaviour. Still, I maintain it would be useful to give users the option I
described to allow
Roundup Robot added the comment:
New changeset cc74062c28a6 by Victor Stinner in branch 'default':
Issue #17615: Expand expensive PyUnicode_READ() macro in unicode_compare():
http://hg.python.org/cpython/rev/cc74062c28a6
--
nosy: +python-dev
___
R. David Murray added the comment:
As you pointed out, you can already get that behavior by enclosing the entire
split expression in a group. I don't see that there is any functionality
missing here.
--
___
Python tracker rep...@bugs.python.org
Georg Brandl added the comment:
Antoine will have to decide on this, but IMO now that we released the PEP 3151
set in Python 3.3, we should not continue adding new builtin exceptions in
every release.
--
___
Python tracker rep...@bugs.python.org
Roundup Robot added the comment:
New changeset db4a1a3d1f90 by Victor Stinner in branch 'default':
Issue #17615: Add tests comparing Unicode strings of different kinds
http://hg.python.org/cpython/rev/db4a1a3d1f90
--
___
Python tracker
Antoine Pitrou added the comment:
A bit in detail:
- ENOTCONN is a programming error, so there's no use actually catching it (you
should fix the bug instead when you encounter it)
- EINVAL could be a candidate, but unfortunately it would clash quite nastily
with ValueError and lead to
Michael Foord added the comment:
I don't think that's a particular issue. In general you only need to use
create=True if a name is *not* available in a namespace.
Builtin names are odd in that you can use them in a namespace even though they
don't exist there - so you have to *remember* to
Roundup Robot added the comment:
New changeset d3185be3e8d7 by Victor Stinner in branch 'default':
Issue #17615: Comparing two Unicode strings now uses wmemcmp() when possible
http://hg.python.org/cpython/rev/d3185be3e8d7
--
___
Python tracker
STINNER Victor added the comment:
Neil.Hodgson wrote:
The patch fixes the performance regression on Windows. The 1:1 case is better
than either 3.2.4 or 3.3.1 downloads from python.org. Other cases are close to
3.2.4, losing at most around 2%.
Nice, but make sure that your are using the same
Changes by STINNER Victor victor.stin...@gmail.com:
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17615
___
Paul Wiseman added the comment:
Ah ok, thanks for clearing that up. I thought there'd have been a socket.error
with ETIMEDOUT raised as the underlying exception, similar to if it times out
during the non-ssl part of the request
--
___
Python
Federico Schwindt added the comment:
New version hopefully good and ready for inclusion.
Please note that the tests are still broken and need to be addressed (bignum
and sys.maxsize passed to ident and data respectively).
Thanks.
--
Added file:
STINNER Victor added the comment:
fast_hash_3.patch is a litte bit (6%) slower for Unicode string shorter than 10
characters, but much faster for string equal or longer than 100 characters (up
to 10x faster).
I used the str type and disabled its cache (_PyUnicode_HASH(self) = x; in
Changes by STINNER Victor victor.stin...@gmail.com:
Added file: http://bugs.python.org/file29743/bench_hash.py
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16427
___
STINNER Victor added the comment:
Does anyone know if fast_hash_3.patch may reduce the quality of the hash
function? (May the patched hash function produce more collisions? The
Avalanche effect thing.)
--
___
Python tracker rep...@bugs.python.org
Changes by Frank Hamand frankham...@hotmail.com:
--
components: Interpreter Core, Windows
nosy: fhamand
priority: normal
severity: normal
status: open
title: Segfault caused by
type: crash
versions: Python 3.3
___
Python tracker
New submission from Frank Hamand:
I've found a very strange bug in python 3.3
It's taken me around an hour just to narrow it down to a small case where it
happens.
I cannot for the life of me figure out the exact cause. It seems to have
something to do with yield from.
I've attached a case
Frank Hamand added the comment:
The file contents so people dont have to download the zip:
generators.py:
---
def subgen():
yield
def other_gen(self):
move = yield from subgen()
game.py:
---
class Game(object):
def
Raymond Hettinger added the comment:
Confirmed. This is by design. Guido has long lamented that the += operator
for lists would accept any iterable. This led to a number of surprises: s=
['hello']; s += 'world' # Oops!
--
___
Python tracker
Antoine Pitrou added the comment:
I actually like that list.__iadd__ accepts any iterable, it's a rather nice
piece of duck-typing.
--
nosy: +pitrou
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17626
Changes by Antoine Pitrou pit...@free.fr:
--
nosy: +benjamin.peterson, ncoghlan
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17669
___
___
New submission from Alfredo Solano Martínez:
I stumbled upon this by chance. Is the following behaviour by design?
s = 'a\tb'
s.expandtabs(1) == s.expandtabs(2)
True
In fact:
s.expandtabs(1)
'a b' # 1 space
s.expandtabs(2)
'a b' # 1 space
s.expandtabs(3)
'a b' # 2 spaces
s.expandtabs(4)
Neil Hodgson added the comment:
Including the wmemcmp patch did not improve the times on MSC v.1600 32 bit - if
anything, the performance was a little slower for the test I used:
a=['C:/Users/Neil/Documents/λ','C:/Users/Neil/Documents/η']156
specialised:
[0.9125948707773204,
New submission from Amaury Forgeot d'Arc:
This segfaults on all Python versions:
io.BufferedRWPair.__new__(io.BufferedRWPair).read()
The various _forward_call methods should check that the reader and writer
objects are correctly initialized. Not NULL, at the very least.
--
Changes by Chris Calloway c...@chriscalloway.org:
Removed file: http://bugs.python.org/file29682/issue-15518-1.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15518
___
1 - 100 of 122 matches
Mail list logo