Serhiy Storchaka added the comment:
I tested brute.py for all supported in Python encodings:
No character for encoding cp1006:surrogateescape :-(
No character for encoding cp720:surrogateescape :-(
No character for encoding cp864:surrogateescape :-(
No character for encoding
Peter added the comment:
Apologies for noise, but since a backport was discussed, I'm mentioning this
here.
I've started implementing a backport, currently working and tested on Mac OS X
and Linux, back to Python 3.0 - supporting Python 2 would be nice but probably
significantly more work
STINNER Victor added the comment:
I tested brute.py for all supported in Python encodings:
Oh thanks, interesting result. I completed the encoding list and the character
list: see brute2.py. I added joker characters: U+00A0 and U+20AC which match
requierements for most locale encodings.
Christian Heimes added the comment:
Meh, Python 2.6 from SL4A (scripting languages for Android) doesn't have
os.confstr(). I just tried it in a Android 2.3.3 emulator. Python 2.6 on Linux
has the function. I propose we fall back to PATH env and use /bin as last
resort.
try:
Roundup Robot added the comment:
New changeset dafca4714298 by Tim Golden in branch 'default':
issue9584: Add {} list expansion to glob. Original patch by Mathieu Bridon
http://hg.python.org/cpython/rev/dafca4714298
--
nosy: +python-dev
___
Python
New submission from Daniele Varrazzo:
I've converted the DBAPI to reST, mostly to allow linking from external
documentation. It would be great to replace the current text only version with
it. File attached.
--
assignee: docs@python
components: Documentation
files: pep-0249.txt
Brett Cannon added the comment:
I was thinking somewhere in http://docs.python.org/3/c-api/import.html since
this only comes up when you try to execute an import during extension module
initialization that involves a circular import.
--
___
Python
New submission from Václav Šmilauer:
This issue was split off issue16194 (I am not copying the whole discussion
here). It was suggested a new issue is opened for Python3, where a proper fix
can be done.
Python internally caches dynamically loaded modules, but the cache is based on
the
Rosa Maria added the comment:
Thanks Thanks Thanks Thanks Thanks Thanks Thanks you very much,
You are going to go to heaven with your shoes included.
Best regards and have a nice year end.
Rosa María
Cuídate de la Ciencia que no Llora, de la Filosofía que no Ríe y de la
Grandeza que no se
Andrew Svetlov added the comment:
Storing several modules in single so/pyd file is crazy idea from my perspective.
The test is definitely required.
BTW, Why version is set to 3.5?
Should component be set to Interpreter code?
--
nosy: +asvetlov
___
Amaury Forgeot d'Arc added the comment:
It's not that crazy, if you consider that all builtin modules are stored in
python33.dll.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16421
___
Václav Šmilauer added the comment:
Storing several modules in one .so file offloads some issues which have to be
dealt with manually (like one module needing symbols from other module, or even
cross-dependencies) to the linker. In any case, unless forbidden and signalled,
it should be
Benjamin Peterson added the comment:
Here's the message that helped convince us to go against collision counting
originally: http://mail.python.org/pipermail/python-dev/2012-January/115726.html
--
___
Python tracker rep...@bugs.python.org
Serhiy Storchaka added the comment:
glob.glob('*.ac')
['configure.ac']
glob.glob('*.sub')
['config.sub']
glob.glob('*.{sub,ac}')
['config.sub']
And since these changes are backward incompatible (and moreover, now it is
impossible to glob for paths that contain braces), I would prefer a
Changes by Václav Šmilauer e...@doxos.eu:
--
components: +Interpreter Core -Extension Modules
versions: +Python 3.4 -Python 3.5
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16421
___
Andrew Svetlov added the comment:
Amaury, I'm ok with pushing several modules into python33.dll or embedding it
directly into executable.
For standard so/dll files you have to use different file names for modules to
make regular import statement work. It can be done via symlink/hardlink, but
Václav Šmilauer added the comment:
@Andrew: I was using symlinks to achieve this, until I found recently that some
exotic systems (read: windows) have still troubles there, like not letting
non-admins create symlinks.
--
type: enhancement - behavior
versions: +Python 3.5 -Python 3.4
Mathieu Bridon added the comment:
glob.glob('*.{sub,ac}')
['config.sub']
I'm surprised this broke, this is one of the behaviour I thought I had
implemented in my original patch. :-/
(and moreover, now it is impossible to glob for paths that contain braces)
I am absolutely sure this was
R. David Murray added the comment:
There is an example in the test suite somewhere. Probably in the distutils
tests. Search for xxmodule...but you'll need to create your own source. I'd
see if you can write it out from the test rather than checking in another data
file, but a data file is
Tim Golden added the comment:
Must have been something I did. I'll revert the commit and re-test.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9584
___
Václav Šmilauer added the comment:
issue16421 was opened for py3k. Just for the sport of writing, I fixed that in
python 2.7 (tip) as well, though other seemed to defend the view it was not a
bug, hence not fixable in 2.7.
--
keywords: +patch
versions: -Python 3.2, Python 3.3
Added
R. David Murray added the comment:
Sorry, didn't mean to change the component back.
--
components: +Interpreter Core -Extension Modules
type: behavior - enhancement
versions: +Python 3.4 -Python 3.5
___
Python tracker rep...@bugs.python.org
Changes by Jesús Cea Avión j...@jcea.es:
--
nosy: +jcea
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16381
___
___
Python-bugs-list mailing list
Andrew Svetlov added the comment:
Original file has been changed just now.
Also it would be nice to get diff, not just new file (to check correctness of
transition).
--
nosy: +asvetlov
___
Python tracker rep...@bugs.python.org
Daniele Varrazzo added the comment:
Andrew, I've probably changed every single line (as almost all the original was
indented), so diff wouldn't show anything useful.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16420
Roundup Robot added the comment:
New changeset ec897bb38708 by Tim Golden in branch 'default':
Reversed changes from issue9584
http://hg.python.org/cpython/rev/ec897bb38708
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9584
Marc-Andre Lemburg added the comment:
On 06.11.2012 16:33, Daniele Varrazzo wrote:
Daniele Varrazzo added the comment:
Andrew, I've probably changed every single line (as almost all the original
was indented), so diff wouldn't show anything useful.
I'll go through the text and double
John M Camara added the comment:
How about using a secure hash algorithm that's implemented in HW when
available. It doesn't eliminate the issue on systems that lack this support
but at least it limits the scope of the problem.
Of course some testing would need to be done to make sure the
Changes by Alex Gaynor alex.gay...@gmail.com:
--
nosy: +alex
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14621
___
___
Python-bugs-list mailing
Changes by Jesús Cea Avión j...@jcea.es:
--
nosy: +jcea
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2275
___
___
Python-bugs-list mailing list
Václav Šmilauer added the comment:
I added the test, with a module Modules/_testimportmultiple.c.
The test uses the (undocumented) imp module, but all othet tests in
Lib/test/test_imp.py do the same, so I assume it is OK?
--
Added file:
Christian Heimes added the comment:
Our hash randomization will always leak some information about the
randomization keys. The only way to properly secure our secrets is a
cryptographic secure algorithms, for example a crypto hashing function in
combination with a message authentication code
Changes by Jesús Cea Avión j...@jcea.es:
--
nosy: +jcea
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16388
___
___
Python-bugs-list mailing list
Changes by Jesús Cea Avión j...@jcea.es:
--
nosy: +jcea
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16389
___
___
Python-bugs-list mailing list
Christian Heimes added the comment:
I deem hash randomization and collision counting as a poor man's workaround for
the actual issue. Perhaps we shouldn't try too hard to fix an unsuitable data
type. Hash maps have a known worst case complexity of O(n). A O(log n)
algorithm should be used to
Giovanni Bajo added the comment:
Christian, there are good semi-crypto hash functions that don't leak as bad as
Python's own modified FNV hash, without going all the way to HMAC.
SipHash has very good collision resistance and doesn't leak anything:
https://www.131002.net/siphash/
(notice: they
Serhiy Storchaka added the comment:
I am absolutely sure this was working in my original submission, I had even
added unit tests for it:
It can't be working in any implementation.
os.makedirs('a{b,c}d/e')
os.listdir('a{b,c}d')
['e']
glob.glob('a{b,c}d/*')
[]
Was ['a{b,c}d/e'] in 3.3.
Brett Cannon added the comment:
It's fine to cheat in tests, although test_imp predates importlib which is why
it uses an undocumented API.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16421
Serhiy Storchaka added the comment:
I think the lru_cache should be kept if possible (i.e. I'm -0.5 on your
patch).
This patch is only to show the upper level to which should be sought. I tried
to optimize lru_cache(), but got only 15%. I'm afraid that serious
optimization is impossible
Christian Heimes added the comment:
Thanks!
SipHash looks interesting. It's using a XOR + ROT approach with a seed. And
it's written by DJB which is usually a good sign. He writes secure code with
good quality. Just his coding style tends to be ... unique. :)
I'm going to try the algorithm.
Tim Golden added the comment:
Well even in the original [working] version, the scope of this change
was limited to glob.glob. os.listdir doesn't currently support any form
of expansion (at least not on Windows) and nor does os.makedirs. I don't
see any problem in restricting this change -- and
Serhiy Storchaka added the comment:
I'm talking about glob.glob(), not about os.listdir(). Bakward incompatible
features should be off by default.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9584
Tim Golden added the comment:
Sorry, I misunderstood the point you were making with the
os.listdir/makedirs examples. Fair point about backwards compatibility.
This may make this change untenable as no-one will want a series of
use_feature_xxx flags, one for each change we introduce to
Christian Heimes added the comment:
I modified crypto_auth() a bit:
Py_uhash_t crypto_auth(const unsigned char *in, unsigned long long inlen)
...
u64 k0 = _Py_HashSecret.prefix;
u64 k1 = _Py_HashSecret.suffix;
...
return (Py_uhash_t)b;
and replaced the loop in _Py_HashBytes() with a
Giovanni Bajo added the comment:
For short strings, you might want to have a look at the way you fetch the final
partial word from memory.
If the string is = 8 bytes, you can fetch the last partial word as an
unaligned memory fetch followed by a shift, instead of using a switch like in
the
Christian Heimes added the comment:
We can explore the various optimization options later. Also unaligned memory
address is not allowed on some architectures like SPARC.
If somebody likes to play with the algorithm:
http://hg.python.org/sandbox/cheimes/shortlog/2cb7e97ca8d0
--
Serhiy Storchaka added the comment:
This may make this change untenable as no-one will want a series of
use_feature_xxx flags, one for each change we introduce to glob.glob.
Unless we throw in every known expansion / matching right now and have a
single use-extended-features flag.
This is
Andrew Svetlov added the comment:
Confirm it for SL4A Python 3.2
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16353
___
___
Python-bugs-list
Taras Lyapun added the comment:
Andrew, do you mean that Christian Heimes last snippet working on Android?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16353
___
Andrew Svetlov added the comment:
Reviewed and commented the last patch.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16421
___
___
Pino Toscano added the comment:
*_MAX constants are usually defined when the system declares that the maximum
limit for that option exist and is already known at compile time.
Python should simply not rely on XATTR_LIST_MAX and XATTR_SIZE_MAX being
defined, but just grow the buffers as needed
Andrew Svetlov added the comment:
I mean the last available SL4A doesn't have os.confstr
Fallback should work, os.environ['PATH'] contains '/system/bin' where 'sh' is
living.
--
___
Python tracker rep...@bugs.python.org
Serhiy Storchaka added the comment:
$ ./python -m timeit -s x = b'a' * int(1E7) hash(x)
Note that hash calculated only once. Add -n 1 option and use a larger data.
If somebody likes to play with the algorithm:
$ ./python -m timeit -n 1 -s t = 'abcdefgh' * 10**8 hash(t)
1 loops, best of 3:
Mahmood Hikmet added the comment:
I solved the problem - sorry it's taken me so long to reply. I know how
frustrating it is when people don't respond with what they found out in the end.
Turns out there's no bug as you said and it was based around something I did
(as these things usually
Roumen Petrov added the comment:
HI, Ambroz
Ambroz Bizjak wrote:
I've applied all patches from py3k-20121004-CROSS.tgz to Python 3.3.0 except
2, 4, and 9 (which didn't apply), but it's not working. After it builds the
built in modules, it tries to run the parser generator which was
Serhiy Storchaka added the comment:
What if just add 0x?
--
nosy: +serhiy.storchaka
versions: +Python 3.4
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12848
___
Serhiy Storchaka added the comment:
Ah, for unpacking 32-bit unsigned big-endian bytes you can use len =
int.from_bytes(self.read(4), 'big').
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12848
Serhiy Storchaka added the comment:
Or you can use len = struct.unpack('I', self.read(4)).
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12848
___
Sandeep Mathew added the comment:
Hey,
I was given access to HP's open source VMS cluster, Many thanks to HP. I should
be able to continue python development for VMS. I shall ping you guys in case I
get stuck. I should be good to go
--Thomas
--
Christian Heimes added the comment:
Thanks for your response! I'm closing the ticket.
--
nosy: +christian.heimes
resolution: - invalid
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11631
Rui Carmo added the comment:
Should one look into the source and make effort to submit a patch, or is
this being handled somehow?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2275
___
Roundup Robot added the comment:
New changeset de8cf1ece068 by Victor Stinner in branch 'default':
Issue #16414: Add support.FS_NONASCII and support.TESTFN_NONASCII
http://hg.python.org/cpython/rev/de8cf1ece068
--
nosy: +python-dev
___
Python tracker
Roundup Robot added the comment:
New changeset 0e9fbdda3c92 by Victor Stinner in branch 'default':
Issue #16414: Fix support.TESTFN_UNDECODABLE and
test_genericpath.test_nonascii_abspath()
http://hg.python.org/cpython/rev/0e9fbdda3c92
--
___
Python
Serhiy Storchaka added the comment:
Why were you add '- ' suffix to TESTFN_NONASCII?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16414
___
Serhiy Storchaka added the comment:
I don't see U+00A0 and U+20AC in the changeset.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16414
___
___
Roundup Robot added the comment:
New changeset 55710b8c6670 by Victor Stinner in branch 'default':
Issue #16414: Fix typo in support.TESTFN_NONASCII (useless space)
http://hg.python.org/cpython/rev/55710b8c6670
--
___
Python tracker
Changes by STINNER Victor victor.stin...@gmail.com:
Added file: http://bugs.python.org/file27912/brute2.py
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16414
___
Roundup Robot added the comment:
New changeset 7f90305d9f23 by Victor Stinner in branch 'default':
Issue #16414: Test more characters for support.FS_NONASCII
http://hg.python.org/cpython/rev/7f90305d9f23
--
___
Python tracker rep...@bugs.python.org
Alexandre Vassalotti added the comment:
pickle.py is the buggy one here. Its use of the marshal module is really a
hack. Plus, it is slower than both struct and int.from_bytes.
14:40:57 [~/cpython]$ ./python -m timeit int.from_bytes(b'\xff\xff\xff\xff',
'big')
100 loops, best of 3: 0.209
R. David Murray added the comment:
It looks like there is a patch, so a patch review would be the next step (as
indicated by the stage, not that we always remember to update that...)
Reading the issue carefully and making sure that all the concerns are addressed
is also required. A comitter
New submission from Yury Selivanov:
Right now decimal.py defines 'ROUND_DOWN' as 'ROUND_DOWN' (string), whereas C
version define it as 1 (integer).
While using constant values directly in your code is not a good idea, there is
another case where it doesn't work: if you serialize decimal
Roundup Robot added the comment:
New changeset fce9e892c65d by Victor Stinner in branch 'default':
Issue #16414: Fix test_os on Windows, don't test os.listdir() with undecodable
http://hg.python.org/cpython/rev/fce9e892c65d
--
___
Python tracker
STINNER Victor added the comment:
Why were you add '- ' suffix to TESTFN_NONASCII?
Oops, the space was a mistake. I add - just for the readability of the
generated filename.
I don't see U+00A0 and U+20AC in the changeset.
Oh, I forgot to update the patch with the latest results of
Changes by Mark Dickinson dicki...@gmail.com:
--
nosy: +mark.dickinson
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16422
___
___
Mark Dickinson added the comment:
I think it's already true that pickling a Decimal context on Python 3.2 and
unpickling on Python 3.3 doesn't work. Stefan: do I recall that this is a
known issue?
--
___
Python tracker rep...@bugs.python.org
Nadeem Vawda added the comment:
I suspect that it will be slower than the decompress_into() approach, but
as you say, we need to do benchmarks to see for sure.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15955
Stefan Krah added the comment:
Pickling changed in 3.3 to make the C and Python versions compatible. So pickled
contexts in 3.3 are actually interchangeable.
Pickling a list of rounding modes is not compatible.
--
___
Python tracker
Yury Selivanov added the comment:
Well, I don't care about py 3.2 3.3 pickle compatibility in this particular
issue. This one is about compatibility of py c decimal modules in 3.3.
--
___
Python tracker rep...@bugs.python.org
Nadeem Vawda added the comment:
These were not idle questions. I wrote the patch, and I had to know
what behavior is correct.
Ah, sorry. I assumed you were going to submit a separate patch to fix the
unconsumed_tail issues.
Here's the patch. It fixes potential memory bug (unconsumed_tail
Stefan Krah added the comment:
So what data structure are you trying to serialize interchangeably?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16422
___
STINNER Victor added the comment:
Handling non-ASCII paths is always a pain. I don't plan to backport
support.FS_NONASCII to Python 3.3 right now, but I may backport it later.
--
resolution: - fixed
status: open - closed
versions: -Python 3.3
___
Roundup Robot added the comment:
New changeset 7ed9993d53b4 by Victor Stinner in branch 'default':
Close #16311: Use the _PyUnicodeWriter API in text decoders
http://hg.python.org/cpython/rev/7ed9993d53b4
--
nosy: +python-dev
resolution: - fixed
stage: - committed/rejected
status:
Stefan Krah added the comment:
I see that you mentioned the use case in your first mail. Yes, that isn't
possible right now.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16422
___
Yury Selivanov added the comment:
Right ;)
Is there any chance we can fix that in next 3.3 point release or 3.4?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16422
___
Richard Oudkerk added the comment:
Maybe lru_cache() should have a key argument so you can specify a specialized
key function. So you might have
def _compile_key(args, kwds, typed):
return args
@functools.lru_cache(maxsize=500, key=_compile_key)
def _compile(pattern,
Christian Heimes added the comment:
Thanks to Snakebit I was able to tests the code on a 32bit BSD installation
with GCC 4.2. The ASCII unicode and bytes performance is about 8% slower, UCS2
unicode is about 37% slower. There might be room for improvements, though.
% ./python -m timeit -r20
Eran Rundstein added the comment:
Hello
I have attached a patch that includes a (slightly broken) fix and a test case.
Note that there is currently an unresolved issue:
If the user reads the exact amount of bytes the server sent, read() on the
socket will never have a chance to return '' and
Christian Heimes added the comment:
Serhiy's trick
#define U8TO64_LE(p) ((u64)((u32 *)(p))[0] | ((u64)((u32 *)(p))[1] 32))
gives a nice speedup. Now UCS2 is down to 0.133 usec (12% slower than the
current algorithm) and ASCII down to 0.105 usec (3% faster).
--
New submission from Mathias Panzenböck:
I think it would be really helpful if urllib would support data URLs. However,
I was told on the python-ideas mailing list that it would probably only added
as recipe in the documentation. The attached patch adds such an recipe to the
urllib.request
Changes by Peter Eisentraut pete...@gmx.net:
--
nosy: +petere
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue444582
___
___
Python-bugs-list
Peter Eisentraut added the comment:
I ran into a similar instance of this problem today and would like to add my
support for just getting rid of the rpm calls and just call rpmbuild in all
cases. The last release where rpm was used for building was more than 10
years ago.
--
nosy:
Changes by Senthil Kumaran sent...@uthcode.com:
--
assignee: docs@python - orsenthil
nosy: +orsenthil
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16423
___
Todd Rovito added the comment:
Chris,
That is an excellent suggestion. I modified my OSRenameCombinations.py
program and attached. This program prints a table with the src parameters as
columns and the dst as rows. Hopefully it will show up ok in the bug tracker.
For Unix
New submission from anatoly techtonik:
Windows.
Python 3:
import os.path as osp
osp.split('//hostname/foo/')
('//hostname/foo/', '')
Python 2:
osp.split('//hostname/foo/')
('//hostname/foo', '')
But Python 3 again:
osp.split('//hostname/foo/bar/')
('//hostname/foo/bar', '')
--
Serhiy Storchaka added the comment:
Sorry. Here is a patch.
--
Added file: http://bugs.python.org/file27916/zlib_unused_data_3.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16350
___
Serhiy Storchaka added the comment:
'//hostname/foo/' is an UNC path. Now splitunc() deprecated and splitdrive()
works with an UNC paths.
ntpath.splitdrive('//hostname/foo/')
('//hostname/foo', '/')
--
nosy: +serhiy.storchaka
___
Python tracker
Serhiy Storchaka added the comment:
% ./python -m timeit -r20 -n100 -s h = hash; x = 'a' * 10**7 -- h(x)
Here is only one hash calculation and 99 cached calls.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14621
Serhiy Storchaka added the comment:
I tested different kind of strings.
$ ./python -m timeit -n 1 -s t = b'a' * 10**8 hash(t)
$ ./python -m timeit -n 1 -s t = 'a' * 10**8 hash(t)
$ ./python -m timeit -n 1 -s t = '\u0100' * 10**8 hash(t)
$ ./python -m timeit -n 1 -s t = '\U0001' * 10**8
98 matches
Mail list logo