Vajrasky Kok added the comment:
Fails on Windows Vista.
...s..s..s..s...F.
..
==
FAIL: test_mkdir_parents (__main__.PathTest)
New submission from Serhiy Storchaka:
Repr test for cell is empty. Proposed patch implements it.
--
components: Tests
files: test_cell_repr.patch
keywords: patch
messages: 205528
nosy: serhiy.storchaka, zach.ware
priority: normal
severity: normal
stage: patch review
status: open
title:
Charles-François Natali added the comment:
The test is failing on Windows buildbot:
http://buildbot.python.org/all/builders/x86%20Windows%20Server%202003%20%5BSB%5D%203.x/builds/1851/steps/test/logs/stdio
==
ERROR:
Gregory P. Smith added the comment:
upstream simplejson (of which json is an earlier snapshot of) has an encoding
parameter on its dump and dumps method. Lets NOT break compatibility with that
API.
Our users use these modules interchangeably today, upgrading from stdlib json
to simplejson
Vajrasky Kok added the comment:
Hi Claudiu, thanks for the review and the knowledge that on Windows, we don't
have attribute getuid of os. Here is the updated patch. I do not check
specifically for Windows but only whether the platform can import spwd module
or not. That should be enough.
Gregory P. Smith added the comment:
So why not put a dump_bytes into upstream simplejson first, then pull in a
modern simplejson?
There might be some default flag values pertaining to new features that need
changing for stdlib backwards compatible behavior but otherwise I expect it's a
good
Serhiy Storchaka added the comment:
I have added few comments on Rietveld.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19572
___
___
New submission from Charles-François Natali:
This is a spinoff of issue #19506: currently, subprocess.communicate() uses a
4K buffer when reading data from pipes.
This was probably optimal a couple years ago, but nowadays most operating
systems have larger pipes (e.g. Linux has 64K), so we
Vinay Sajip added the comment:
I will look at doing a distlib update shortly - but there's another issue
(#19913) that might also require an update - it' not clear yet.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19766
Vinay Sajip added the comment:
I'll close this for now as the failures seem to have stopped. Though I only
added some diagnostics, that might have changed the relative timings enough so
the race doesn't surface (for now).
--
resolution: - works for me
status: open - closed
Serhiy Storchaka added the comment:
Thank you Vajrasky. Now this check is skipped on Windows.
--
Added file: http://bugs.python.org/file33042/pathlib_mkdir_mode_4.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19921
STINNER Victor added the comment:
Antoine Pitrou added the comment:
Python uses the fact that the filesystem encoding is the locale
encoding in various places.
The patch doesn't change that.
Nick Coghlan added the comment:
Note that the *only* change Antoine's patch makes is that:
- *if*
STINNER Victor added the comment:
Where is the buffer size? The hardcoded 4096 value in Popen._communicate()?
data = os.read(key.fd, 4096)
I remember that I asked you where does 4096 come from when you patched
subprocess to use selectors (#18923):
http://bugs.python.org/review/18923/#ps9827
STINNER Victor added the comment:
Oh, Charles-François Natali replied to my review by email, and it's not
archived on Rietveld. Copy of him message:
http://bugs.python.org/review/18923/diff/9757/Lib/subprocess.py#newcode420
Lib/subprocess.py:420: _PopenSelector = selectors.SelectSelector
alexd2 added the comment:
I encountered the same inconsistent behavior. That is, I don't get the same
rounding from the two following commands:
print %.f %.f %(0.5, 1.5) # Gives -- 0 2
print %.f %.f %(round(0.5), round(1.5)) # Gives -- 1 2
I also get:
print round(0.5),
Vinay Sajip added the comment:
I've updated distlib to use dummy_threading where threading isn't available -
see
https://bitbucket.org/pypa/distlib/commits/029fee573900765729402203e39b2171d7ae0784
Can someone please test with this version vendored into pip to check that the
failures no
New submission from Serhiy Storchaka:
os.makedirs() can't create a directory with cleared write or list permission
bits for owner when parent directories aren't created. This is because for
parent directories same mode is used as for final directory.
Note that the mkdir utility creates parent
Changes by Serhiy Storchaka storch...@gmail.com:
--
keywords: +patch
nosy: +loewis
Added file: http://bugs.python.org/file33043/os_makedirs_mode.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19930
STINNER Victor added the comment:
Here is a work-in-progress patch.
PyMarshal_ReadShortFromFile() and PyMarshal_ReadLongFromFile() are still wrong:
new Unsigned version should be added to marshal.c. I don't know if a C cast to
unsigned is enough because long can be larger than 32-bit (ex: on
Nick Coghlan added the comment:
Yes, that's the point. *Every* case I've seen where the locale encoding has
been reported as ASCII on a modern Linux system has been because the
environment has been configured to use the C locale, and that locale has a
silly, antiquated, encoding setting.
Changes by Nick Coghlan ncogh...@gmail.com:
--
title: print() and write() are relying on sys.getfilesystemencoding() instead
of sys.getdefaultencoding() - Setting LANG=C breaks Python 3
___
Python tracker rep...@bugs.python.org
STINNER Victor added the comment:
I don't like generic except OSError: pass. Here is a first patch for epoll()
to use except FileNotFoundError: pass instead. Kqueue selector should also be
patched.
I tested to close epoll FD (os.close(epoll.fileno())): on Linux 3.11,
epoll.unregister(fd) and
STINNER Victor added the comment:
2013/12/8 Nick Coghlan rep...@bugs.python.org:
Yes, that's the point. *Every* case I've seen where the locale encoding has
been reported as ASCII on a modern Linux system has been because the
environment has been configured to use the C locale, and that
Antoine Pitrou added the comment:
If you use a different encoding but only just for filenames, you will
get mojibake when you pass a filename on the command line or in an
environment varialble.
That's not what the patch does.
--
___
Python
Changes by Nick Coghlan ncogh...@gmail.com:
--
assignee: - ncoghlan
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19700
___
___
Python-bugs-list
STINNER Victor added the comment:
2013/12/8 Antoine Pitrou rep...@bugs.python.org:
Python uses the fact that the filesystem encoding is the locale
encoding in various places.
The patch doesn't change that.
You wrote: - With the patch: utf-8 utf-8 utf-8 ANSI_X3.4-1968, so
os.get
Serhiy Storchaka added the comment:
Setting sys.stderr encoding to UTF-8 on ASCII locale is wrong. sys.stderr has
the backslashreplace error handler by default, so it newer fails and should
newer produce non-ASCII data on ASCII locale.
--
nosy: +serhiy.storchaka
Charles-François Natali added the comment:
STINNER Victor added the comment:
I don't like generic except OSError: pass. Here is a first patch for
epoll() to use except FileNotFoundError: pass instead. Kqueue selector
should also be patched.
Except that it can fail with ENOENT, but also
Charles-François Natali added the comment:
STINNER Victor added the comment:
Since Popen.communicate() returns the whole content of the buffer, would it
be safe to increase the buffer size? For example, use 4 GB as the buffer size?
Sure, if you want to pay the CPU and memory overhead of
Larry Hastings added the comment:
Brett, could you weigh in please?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19927
___
___
Larry Hastings added the comment:
Antoine: are you characterizing this as a bug rather than a new feature?
I'd like to see more of a consensus before something like this gets checked in.
Right now I see a variety of opinions.
When I think conservative approach and knows about system encoding
Antoine Pitrou added the comment:
Or said differently, the filesystem encoding is different than the
locale encoding.
Indeed, but the FS encoding and the IO encoding are the same.
locale encoding doesn't really matter here, as we are assuming that it's
wrong.
--
Nick Coghlan added the comment:
OK, I just noticed that importlib.find_spec copies the annoying-as-hell
behaviour of importlib.find_loader where it doesn't work with dotted names. Can
we fix that please? It's stupid that pkgutil.get_loader has to exist to
workaround that design flaw for
Christian Heimes added the comment:
Vinay, thanks for your fast response! :) #19913 should be resolved, too. A
couple of months ago several people complained about a new file that looked
like a ZIP bomb. This virus warnings looks even more severe although it's
probably a false positive. Could
Larry Hastings added the comment:
I can live with this in 3.4 if you check it in before beta 2.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19343
___
alexd2 added the comment:
Note:
I have python2.7.3 in Ubuntu 12.04.3 installed in a VirtualBox VM on a Windows
7 32-bit and an Intel(R) Core(TM)2 Duo CPU U9300 @ 1.20GHz (2 CPUs), ~1.2GHz
processor
--
___
Python tracker rep...@bugs.python.org
Christian Heimes added the comment:
Thanks Larry!
--
resolution: - fixed
stage: patch review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19343
Roundup Robot added the comment:
New changeset ad2cd599f1cf by Christian Heimes in branch 'default':
Issue #19343: Expose FreeBSD-specific APIs in resource module. Original patch
by Koobs.
http://hg.python.org/cpython/rev/ad2cd599f1cf
--
nosy: +python-dev
Christian Heimes added the comment:
Claudiu, I'm really sorry. :( The patch was originally developed by you, not by
koobs. All credits to you!
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19343
Nick Coghlan added the comment:
Deleted a bunch of code, and runpy now correctly sets both __file__ and
__cached__ (runpy previously never set the latter properly).
You can also see the reason for my rant above in the form of
runpy._fixed_find_spec. importlib.find_loader was always kind of
Nick Coghlan added the comment:
Victor, people set LANG=C for all sorts of reasons, and we have no
control over how operating systems define that locale. The user
perception is Python 3 doesn't work properly when you ssh into
systems, not Gee, I wish operating systems defined the C locale more
Roundup Robot added the comment:
New changeset 4221d5d9ac84 by Christian Heimes in branch 'default':
Attempt to fix OpenIndiana build issue introduced by #19922
http://hg.python.org/cpython/rev/4221d5d9ac84
--
___
Python tracker
Roundup Robot added the comment:
New changeset 1d0b7e90da4d by doko in branch 'default':
- Issue #19736: Add module-level statvfs constants defined for GNU/glibc
http://hg.python.org/cpython/rev/1d0b7e90da4d
--
nosy: +python-dev
___
Python tracker
Nikolay Bogoychev added the comment:
Hey,
it has been more than an year since the last activity.
Is there anything else I should do in order for someone of the python devs team
to review my changes and perhaps give some feedback?
Nick
--
___
Changes by Bastien Montagne b.mon...@gmail.com:
--
nosy: +mont29
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11299
___
___
Python-bugs-list
Roundup Robot added the comment:
New changeset 55a748f6e396 by Nadeem Vawda in branch '2.7':
Closes #19878: Fix segfault in bz2 module.
http://hg.python.org/cpython/rev/55a748f6e396
--
nosy: +python-dev
resolution: - fixed
stage: needs patch - committed/rejected
status: open - closed
Serhiy Storchaka added the comment:
What is the status of this issue?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5845
___
___
Vajrasky Kok added the comment:
Fails on Windows Vista.
==
FAIL: test_mode (__main__.MakedirTests)
--
Traceback (most recent call last):
File
Roundup Robot added the comment:
New changeset 42d3afd29460 by Serhiy Storchaka in branch '2.7':
Issue #19099: The struct module now supports Unicode format strings.
http://hg.python.org/cpython/rev/42d3afd29460
--
nosy: +python-dev
___
Python
Serhiy Storchaka added the comment:
Fixed. Thank you Musashi for your report.
--
resolution: - fixed
stage: patch review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19099
Antoine Pitrou added the comment:
Linux, 64-bit quad core:
With 4K buffer:
$ time ./python test_sub_read.py
0.25217683400114765
real0m0.296s
user0m0.172s
sys 0m0.183s
With 64K buffer:
$ time ./python test_sub_read.py
0.0925754177548
real0m0.132s
user0m0.051s
sys
Francisco Martín Brugué added the comment:
If performance is the reason for the feature: My impression is that
the goal of the struct module is not necessarily top performance.
I'm not sure if it applies but on #19905 (message 205345 [1])
is said its a dependency for that issue
[1]
Brett Cannon added the comment:
Actually, ignore the __init__() part of my last comment since it's set to False
directly.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18864
___
Brett Cannon added the comment:
(c) it is then! I would just take the time to call bool() on the arg to
coalesce it into a True/False thing (which maybe makes sense in __init__() as
well).
--
___
Python tracker rep...@bugs.python.org
Brett Cannon added the comment:
I'm fine with the suggestions Nick made. While loaders are not technically
immutable (and thus technically probably shouldn't define __hash__), they have
not been defined to be mutable and mucked with anyway, so I have no issue if
someone breaks the hash of a
Roundup Robot added the comment:
New changeset 910b1cb5176c by Serhiy Storchaka in branch '3.3':
Issue #19535: Fixed test_docxmlrpc when python is run with -OO.
http://hg.python.org/cpython/rev/910b1cb5176c
New changeset e71142abf8b6 by Serhiy Storchaka in branch 'default':
Issue #19535: Fixed
Changes by Serhiy Storchaka storch...@gmail.com:
--
resolution: - fixed
stage: patch review - committed/rejected
status: open - closed
versions: -Python 2.7
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19535
Brett Cannon added the comment:
Can you file a separate bug, Nick, for the importlib.find_spec() change you are
after? I don't want to lose track of it (and I get what you are after but we
should discuss why importlib.find_loader() was designed the way it was
initially).
--
Changes by Serhiy Storchaka storch...@gmail.com:
--
nosy: +haypo
stage: - patch review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19830
___
Serhiy Storchaka added the comment:
Thank you Christian and Eric.
--
resolution: - fixed
stage: - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19758
Serhiy Storchaka added the comment:
Thank you Vajrasky. Now this check is skipped on Windows.
--
Added file: http://bugs.python.org/file33047/os_makedirs_mode_2.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19930
Ned Batchelder added the comment:
I'll add my voice to those asking for a way to put docstrings on namedtuples.
As it is, namedtuples get automatic docstrings that seem to me to be almost
worse than none. Sphinx produces this:
```
class Key
Key(scope, user_id, block_scope_id,
Changes by Serhiy Storchaka storch...@gmail.com:
--
status: closed - open
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16669
___
___
Serhiy Storchaka added the comment:
Unhide this discussion.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16669
___
___
Python-bugs-list
New submission from Ned Batchelder:
When I make a namedtuple, I get automatic docstrings that use a lot of words to
say very little. Sphinx autodoc produces this:
```
class Key
Key(scope, user_id, block_scope_id, field_name)
__getnewargs__()
Return self as a plain tuple.
Changes by Serhiy Storchaka storch...@gmail.com:
--
nosy: +rhettinger
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19931
___
___
Python-bugs-list
Francisco Martín Brugué added the comment:
Just feedback on windows7. I tried the tests inside IDLE and done 'Run Module'
(F5) (deleting the directories between tests):
test_A:
import os, shutil
os.makedirs('foo')
os.makedirs('bar/boo')
shutil.move('foo/', 'bar/')
test_B:
import os, shutil
Charles-François Natali added the comment:
Looks like a kernel bug.
errno 512 is ERESTARTSYS, which shouldn't leak to user-mode.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19923
___
Arfrever Frehtes Taifersar Arahesis added the comment:
Somehow these errors do not occur today. Maybe they were side effects of other
failures in test_json. Closing for now.
--
resolution: - fixed
stage: - committed/rejected
status: open - closed
Serhiy Storchaka added the comment:
Thank you Francisco for testing. Here is different bug than I expected.
Looks as shutil.move() can't move a directory in non-empty directory on Windows.
--
nosy: +hynek, tarek
title: Possible bug in shutil.move() on Windows - shutil.move() can't move
Vinay Sajip added the comment:
This commit in distlib uses uncompressed launcher executables which pass the
virustotal.com checks:
https://bitbucket.org/pypa/distlib/commits/e23c9e4fd3125fa88063de4dec80367b1ac82aff
--
___
Python tracker
Vinay Sajip added the comment:
This commit in distlib uses uncompressed launcher executables which pass the
virustotal.com checks:
https://bitbucket.org/pypa/distlib/commits/e23c9e4fd3125fa88063de4dec80367b1ac82aff
--
___
Python tracker
Roundup Robot added the comment:
New changeset 5ca6e8af0aab by Nadeem Vawda in branch '3.3':
#18430: Document that peek() may change the position of the underlying file for
http://hg.python.org/cpython/rev/5ca6e8af0aab
New changeset 0f587fe304be by Nadeem Vawda in branch 'default':
Closes
Charles-François Natali added the comment:
Roundup Robot added the comment:
New changeset 03a056c3b88e by Gregory P. Smith in branch '3.3':
Fixes issue #19929: Call os.read with 32768 within subprocess.Popen
http://hg.python.org/cpython/rev/03a056c3b88e
Not that it bothers me, but AFAICT
Roundup Robot added the comment:
New changeset 03a056c3b88e by Gregory P. Smith in branch '3.3':
Fixes issue #19929: Call os.read with 32768 within subprocess.Popen
http://hg.python.org/cpython/rev/03a056c3b88e
New changeset 4de4b5a4e405 by Gregory P. Smith in branch 'default':
Fixes issue
Gregory P. Smith added the comment:
I saw a small regression over 4k when using a 64k buffer on one of my machines
(dual core amd64 linux). With 32k everything (amd64 linux, armv7l 32-bit
linux, 64-bit os x 10.6) showed a dramatic improvement on the microbenchmark.
approaching 50% less cpu
Antoine Pitrou added the comment:
I would say it's now closed. If there's some fine tuning needed, separate
issues should be opened.
--
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5845
Antoine Pitrou added the comment:
Instead of copy.deepcopy, why not call itertools.tee?
For the record, pickling a live generator implies pickling a frame object. We
wouldn't be able to guarantee cross-version compatibility for such pickled
objects.
--
Gregory P. Smith added the comment:
comments added to the patch.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19883
___
___
Python-bugs-list
Alexandre Vassalotti added the comment:
The issue here is copy.deepcopy will raise an exception whenever it encounters
a generator. We would like to do better here. Unfortunately, using
itertools.tee is not a solution here because it does not preserve the type of
the object.
--
Ram Rachum added the comment:
Instead of copy.deepcopy, why not call itertools.tee?
It's hard for me to give you a good answer because I submitted this ticket 2
years ago, and nowadays I don't have personal interest in it anymore.
But, I think `itertools.tee` wouldn't have worked for me,
Antoine Pitrou added the comment:
The issue here is copy.deepcopy will raise an exception whenever it
encounters a generator. We would like to do better here.
Unfortunately, using itertools.tee is not a solution here because it
does not preserve the type of the object.
Indeed, itertools.tee
Changes by Ned Deily n...@acm.org:
--
nosy: +fdrake, pitrou
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19542
___
___
Python-bugs-list mailing
Bastien Montagne added the comment:
Yes, itertools.tee just keep in memory elements produced by the most advanced
iterator, until the least advanced iterator consumes them. It may not be a
big issue in most cases, but I can assure you that when you have to iter
several times over a million of
Antoine Pitrou added the comment:
Unless I misunderstood things, and deepcopying a generator would imply
to also copy its whole source of data?
deepcopying is deep, and so would have to recursively deepcopy the
generator's local variables...
--
Antoine Pitrou added the comment:
I think the underlying question is: are weak dicts otherwise MT-safe?
--
versions: +Python 3.4
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19542
___
anon added the comment:
Then I think we're in agreement with regards to bits_at. :) What should happen
next?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19915
___
New submission from Ziyuan Lin:
In Include\import.h, line 89-97:
PyAPI_FUNC(PyObject *)_PyImport_FindBuiltin(
const char *name/* UTF-8 encoded string */
);
PyAPI_FUNC(PyObject *)_PyImport_FindExtensionObject(PyObject *, PyObject *);
PyAPI_FUNC(int)_PyImport_FixupBuiltin(
Guido van Rossum added the comment:
I don't think we should be more selective about the errno values, the try block
is narrow enough (just one syscall) and we really don't know what the kernel
will do on different platforms. And what would we do about it anyway?
I will look into the Windows
Charles-François Natali added the comment:
I will look into the Windows problem, but I suspect the best we can do there
is skip the test.
I already took care of that:
http://hg.python.org/cpython/rev/01676a4c16ff
--
___
Python tracker
Guido van Rossum added the comment:
Then here's a hopeful fix for the Windows situation that relies on the
socketpair() operation reusing FDs from the lowest value. I'm adding asserts to
check that this is actually the case. (These are actual assert statements to
indicate that they are
Armin Rigo added the comment:
As you can see in x.py, the underlying question is rather: are weakdicts usable
in a single thread of a multithreaded program? I believe that this question
cannot reasonably be answered No, independently on the answer you want to give
to your own question.
Ziyuan Lin added the comment:
To see the errors, one can install PyCUDA and Theano, and run code at
http://deeplearning.net/software/theano/tutorial/using_gpu.html#id1 :
import numpy, theano
import theano.misc.pycuda_init
from pycuda.compiler import SourceModule
import theano.sandbox.cuda as
STINNER Victor added the comment:
haypo: title: Setting LANG=C breaks Python 3 - print() and write() are
relying on sys.getfilesystemencoding() instead of sys.getdefaultencoding()
Oh, I didn't want to change the title of the issue, it's a bug in Roundup when
I reply by email :-/
--
Changes by STINNER Victor victor.stin...@gmail.com:
--
title: print() and write() are relying on sys.getfilesystemencoding() instead
of sys.getdefaultencoding() - Setting LANG=C breaks Python 3
___
Python tracker rep...@bugs.python.org
Julian Gindi added the comment:
Just wanted to check to see if there was anything else I should do regarding
this issue.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18983
___
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
nosy: +ezio.melotti
stage: needs patch - patch review
versions: +Python 3.5 -Python 3.4
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18983
Serhiy Storchaka added the comment:
Extracting sign, exponent and significand fields from the binary
representation of a float is at least one thing I'd use this for.
You don't need special function for bit operations. Float values are short (32
or 64 bits) and any bit operations are O(1).
Antoine Pitrou added the comment:
Ah, you're right. We just need to cook up a patch then.
--
stage: - needs patch
type: - behavior
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19542
___
STINNER Victor added the comment:
Or said differently, the filesystem encoding is different than the
locale encoding.
Indeed, but the FS encoding and the IO encoding are the same.
locale encoding doesn't really matter here, as we are assuming that
it's wrong.
Oh, I realized that FS
1 - 100 of 144 matches
Mail list logo