New submission from Muhammad Hallaj Subery:
I think the default behavior of os.path.join() when None is passed as the first
argument should be to translate it to '' by default.
import os
os.path.join(None, 'somewhere')
'somewhere'
vs the current
import os
os.path.join(None, 'somewhere')
Muhammad Hallaj Subery added the comment:
I believe this can be easily archived by adding the following changes:
64c64
path = a or ''
---
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17556
Changes by Raymond Hettinger raymond.hettin...@gmail.com:
--
assignee: - docs@python
components: +Documentation -Library (Lib)
nosy: +docs@python
title: rename type returned by locals() to livedict - Document the
circumstances where the locals() dict gets updated
Changes by Tyler Doyle kingt...@gmail.com:
Removed file: http://bugs.python.org/file29576/inspect.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17526
___
Changes by Tyler Doyle kingt...@gmail.com:
Removed file: http://bugs.python.org/file29577/test_inspect.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17526
___
Changes by Ross Lagerwall rosslagerw...@gmail.com:
--
nosy: +rosslagerwall
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17552
___
___
Changes by Tyler Doyle kingt...@gmail.com:
Added file: http://bugs.python.org/file29591/17526_getsource.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17526
___
Charles-François Natali added the comment:
That's due to a leak in forker-registered handlers:
The _afterfork_registry is never cleared, so spawning processes recursively
keeps feeling it, which ends up consuming a huge amount of memory and slowing
process creation greatly.
Could you try the
Changes by Charles-François Natali cf.nat...@gmail.com:
--
nosy: +sbt
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17555
___
___
Python-bugs-list
New submission from Ned Deily:
Due to a change in behavior for OS X 10.8 (seen with 10.8.3), the code added to
posixmodule.c in Issue7900 to handle an unlimited number of groups no longer
works. The code depends on the documented behavior of getgroups(2) failing
with EINVAL when the
anatoly techtonik added the comment:
Raymond, could you please get the title back? You unintentionally hijacked the
issue. The Document the circumstances where the locals() dict gets updated is
not a describing title for this issue - it is one of the possible action items.
I'd prefer to see a
Amaury Forgeot d'Arc added the comment:
The previous title, rename type returned by locals() to livedict did not
describe the reality, since locals() returns a regular dict.
[Would you call x.__dict__ a livedict?]
So either this issue should be closed as invalid, because it's based on
Richard Oudkerk added the comment:
It seems to be a problem with ForkAwareThreadLock. Could you try the attached
patch?
--
Added file: http://bugs.python.org/file29593/forkawarethreadlock.patch
___
Python tracker rep...@bugs.python.org
Richard Oudkerk added the comment:
_afterfork_registry is not supposed to be cleared. But the problem with
ForkAwareThreadLocal meant that the size of the registry at generation n is
2**n!
--
___
Python tracker rep...@bugs.python.org
anatoly techtonik added the comment:
Eric, here is the code that confirms changed behavior under trace function for
both Python 2 and 3 - http://bugs.python.org/file15081/localstest.py
I agree that the documentation fix is necessary, and if you say that it is an
easier sell - I tend to
anatoly techtonik added the comment:
Amaury, from user's point of view (I am not a core developer - I just need to
troubleshoot complicated Python code) the object (the internal structure)
returned by locals() has different behavior than a normal dict.
Normal dict in Python is updated by user
Michael Foord added the comment:
Yes this is still relevant and needs doing (and is easy).
The implementation should be similar to:
def patch(self, *args, **kwargs):
# lazy import
from unittest.mock import patch
p = patch(*args, **kwargs)
result = p.start()
Amaury Forgeot d'Arc added the comment:
Normal dict in Python is updated by user code (which I as a user can
see and can inspect for further troubleshooting) and for locals's dict
this is not correct.
Do you have an example?
--
___
Python tracker
Michael Foord added the comment:
My preferred fix is to wrap an exception during import as a test that fails
instead of an AttributeError. This would definitely be a new feature rather
than a bugfix - so it could only be in 3.4.
It could be made available to Python 2.7 through the unittest2
Domen Kožar added the comment:
One relevant use case is the following:
https://github.com/Pylons/venusian/issues/23
Here the module is supposed to raise an ImportError.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7559
Brett Cannon added the comment:
So are you saying you want both the short-form output while running but then
the whole output upon completion, David? I can understand wanting the summaries
still in order to sort the skipped tests vs. failures, but not outputting every
test that succeeded
Amaury Forgeot d'Arc added the comment:
Does it change something if you insert in your script (in 3.3):
import msvcrt
msvcrt.SetErrorMode(msvcrt.SEM_FAILCRITICALERRORS)
--
nosy: +amaury.forgeotdarc
___
Python tracker rep...@bugs.python.org
anatoly techtonik added the comment:
Example:
l = locals()
z = dict(a=5, b=3)
lc = dict(l)
zc = dict(z)
print(lc == l)
print(zc == z)
Gives:
False
True
--
___
Python tracker rep...@bugs.python.org
Michael Foord added the comment:
For features like test skipping I would prefer to keep all the documentation
together.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17329
___
Kenneth O'Brien added the comment:
I have created a simple patch that solves this problem. Depending on whether
panel.h or ncurses/panel.h are found, the appropriate one is included.
--
nosy: +Kenneth.O'Brien
Added file: http://bugs.python.org/file29594/ken_ncurses.patch
bob gailer added the comment:
On 3/27/2013 9:48 AM, anatoly techtonik wrote:
anatoly techtonik added the comment:
Example:
l = locals()
z = dict(a=5, b=3)
lc = dict(l)
zc = dict(z)
print(lc == l)
print(zc == z)
Gives:
False
True
Expected
Amaury Forgeot d'Arc added the comment:
This is expected: zc = xxx updates locals!
but not the copy.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17546
___
New submission from Marcus Cobden:
I've made some tweaks to the libpython.py util functions to better pick up
python frames when using a normal python interpreter.
It's not by any means perfect, but it works on my ubuntu-shipped python
interpreter (with debugging symbols installed, but not
New submission from Gaëtan de Menten:
In isspace, isalpha, isalnum and isdigit, I see code like:
/* Shortcut for single character strings */
if (PyString_GET_SIZE(self) == 1
isspace(*p))
return PyBool_FromLong(1);
Is it intentional to not use:
if (PyString_GET_SIZE(self) == 1))
anatoly techtonik added the comment:
I as a user can
see and can inspect for further troubleshooting
This doesn't work for this example, which was your question.
I still feel like this needs further clarification. For a user this behavior is
not expected. User is someone who doesn't know
Éric Araujo added the comment:
FTR the shlex unicode bug reports are #6988 and #1170, and the cStringIO bug is
#1548891.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17536
___
Éric Araujo added the comment:
To build Python itself you need to use the Makefile and the
Misc/RPM/python-2.7.spec file. The doc you’re referring to talks about
building rpm packages for Python libraries, not CPython itself.
--
nosy: +eric.araujo
Sean Carolan added the comment:
Éric Araujo, if that is the case then why does it build what looks like a
*.spec file for Python itself?
[scarolan@titania:~/Python-2.7.3]$ head -10
./build/bdist.linux-x86_64/rpm/SPECS/Python.spec
%define name Python
%define version 2.7.3
%define
Éric Araujo added the comment:
Sorry, I don’t understand the question.
The point still stands: one should not use setup.py build_rpm to build an RPM
for CPython. Please read Misc/RPM/README.
--
___
Python tracker rep...@bugs.python.org
New submission from mrjbq7:
I ran into a problem using multiprocessing to create large data objects (in
this case numpy float64 arrays with 90,000 columns and 5,000 rows) and return
them to the original python process.
It breaks in both Python 2.7 and 3.3, using numpy 1.7.0 (but with
Antoine Pitrou added the comment:
A multiprocessing queue currently uses a 32-bit signed int to encode object
length (in bytes):
def _send_bytes(self, buf):
# For wire compatibility with 3.2 and lower
n = len(buf)
self._send(struct.pack(!i, n))
# The
Sean Carolan added the comment:
Ok, thanks for clearing that up. Maybe the documentation could be updated to
explicitly state this to avoid confusion, eg:
NOTE: You cannot use setup.py to build a Python RPM. It is only for building
Python modules.
--
Bob Alexander added the comment:
Thanks for the prompt reply!
Your suggested change does change the behavior to exactly the way I think
it should work by default. Tried it on both Windows 7 and Vista; no popups
when accessing a mobile mount drive with nothing in it, just quietly
reports False.
Changes by Éric Araujo mer...@netwok.org:
--
assignee: - docs@python
components: +Distutils, Documentation -Build
keywords: +easy
nosy: +docs@python, tarek
stage: - needs patch
title: python setup.py bdist_rpm is broken - Note that distutils’ bdist_rpm
command is not used to build a
anatoly techtonik added the comment:
Attached localtest2.py where an empty locals() call changes behavior.
--- localtest.pyWed Mar 27 19:48:06 2013
+++ localtest2.py Wed Mar 27 19:45:19 2013
@@ -3,6 +3,7 @@
def X():
l = locals()
i = foo
+locals()
print(Is 'i'
Changes by Jesús Cea Avión j...@jcea.es:
--
nosy: +jcea
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17557
___
___
Python-bugs-list mailing list
New submission from Giampaolo Rodola':
Here's a function similar to socket.create_connection() which addresses all the
repetitive tasks needed to order to create an IPv4/IPv6 agnostic server socket.
--
components: Library (Lib)
files: socket.patch
keywords: easy, needs review, patch
Eric Snow added the comment:
Thanks for the script Anatoly. That's pretty much what I was imagining from
your description. This definitely reinforces my belief that profiling.
--
versions: +Python 3.3, Python 3.4
___
Python tracker
Changes by Antoine Pitrou pit...@free.fr:
--
nosy: +gvanrossum
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17561
___
___
Python-bugs-list
Richard Oudkerk added the comment:
I *think* we need to keep compatibility with the wire format, but perhaps
we could use a special length value (-1?) to introduce a longer (64-bit)
length value.
Yes we could, although that would not help on Windows pipe connections (where
byte oriented
mrjbq7 added the comment:
On a machine with 256GB of RAM, it makes more sense to send arrays of this size
than say on a laptop...
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17560
___
Terry J. Reedy added the comment:
Calling locals() updates the dict, just as documented.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7083
___
Amaury Forgeot d'Arc added the comment:
So sysconfig.get_config_var('SO') will change in a micro release?
Won't this break working user code? Give unexpected file names?
--
nosy: +amaury.forgeotdarc
status: pending - open
___
Python tracker
Richard Oudkerk added the comment:
On 27/03/2013 5:13pm, mrjbq7 wrote:
On a machine with 256GB of RAM, it makes more sense to send arrays
of this size than say on a laptop...
I was thinking more of speed than memory consumption.
--
___
Python
Charles-François Natali added the comment:
Also, does pickle currently handle byte strings larger than 4GB?
The 2.7 failure is indeed a pickle limitation, which should now be fixed by
issue #13555.
On a machine with 256GB of RAM, it makes more sense to send arrays
of this size than say on
Eric Snow added the comment:
Okay, I found it. sys.settrace() ultimately results in the setting of
tstate-use_tracing to true and sets tstate-c_tracefunc and tstate_c_traceobj
(see sys_settrace() in Python/sysmodule.c and PyEval_SetTrace() in
Python/ceval.c). tstate-c_tracefunc() gets set
mrjbq7 added the comment:
Richard was saying that you shouldn't serialize such a large array,
that's just a huge performance bottleneck. The right way would be
to use a shared memory.
Gotcha, for clarification, my original use case was to *create* them
in the other process (something which
Eric Snow added the comment:
I should also point out that the following from that note may actually also be
a CPython implementation detail:
Each call to locals() will return the same dictionary, updated to
the contents of the current local symbol table.
We'd want to be sure that such
Changes by Ned Batchelder n...@nedbatchelder.com:
--
nosy: +nedbat
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17546
___
___
Python-bugs-list
Roundup Robot added the comment:
New changeset cd5c23583fa5 by Ezio Melotti in branch '3.2':
#17329: document unittest.SkipTest. Initial patch by Zachary Ware.
http://hg.python.org/cpython/rev/cd5c23583fa5
New changeset 4bf2a53b53b6 by Ezio Melotti in branch '3.3':
#17329: merge with 3.2.
Ezio Melotti added the comment:
Fixed, thanks for the patch!
--
resolution: - fixed
stage: needs patch - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17329
Charles-François Natali added the comment:
I think that's a good idea.
However, there's a problem with the implementation: if one passes or None as
address on a dual-stack node, the resulting socket will be either IPv4 bound to
INADDR_ANY, or IPv6 bound to IN6ADDR_ANY, whereas one would
R. David Murray added the comment:
No, what I'd prefer is that the current print it as it runs behavior not
change, but that the list of skip reasons be displayed at the end. after all
the tests have completed. This is probably not a realistic request, so I'm
fine with just having Ezio's
R. David Murray added the comment:
I think it is probably better to keep the error, myself. It seems to me that a
None creeping in is more likely to be an error in the program. But I could be
convinced otherwise :)
What is your use case?
--
nosy: +r.david.murray
versions: -Python
Brett Cannon added the comment:
I say move forward and put it behind a flag (w/ quiet is fine, maybe some arg
to specify quietness or -qq much like -vv?).
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17554
Richard Oudkerk added the comment:
On 27/03/2013 5:47pm, Charles-François Natali wrote:
multiprocessing currently only allows sharing of such shared arrays
using inheritance.
You mean through fork() COW?
Through fork, yes, but shared rather than copy-on-write.
Perhaps we need a
Eric V. Smith added the comment:
I agree with David. This is a programming error, and should result in an
exception.
--
nosy: +eric.smith
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17556
Charles-François Natali added the comment:
Through fork, yes, but shared rather than copy-on-write.
There's a subtlety: because of refcounting, just treating a COW object
as read-only (e.g. iteratin on the array) will trigger a copy
anyway...
I assume you mean shared memory and shm_open(),
Changes by Ashwini Chaudhary monty.sin...@gmail.com:
--
nosy: +montysinngh
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13510
___
___
Giampaolo Rodola' added the comment:
What you say is right but whether the kernel supports an hybrid IPv4/6 stack or
not there's not much we can do about it anyway.
Exactly what are you suggesting with the ServerSocket class you mentioned? What
do you expect it to do?
Note that platforms
Giampaolo Rodola' added the comment:
Side note: this is how in pyftpdlib I determine whether a platform supports the
dual stack:
def support_hybrid_ip_v4_v6():
# Note: IPPROTO_IPV6 constant is broken on Windows, see:
# http://bugs.python.org/issue6926
sock = None
try:
Richard Oudkerk added the comment:
On 27/03/2013 7:27pm, Charles-François Natali wrote:
Charles-François Natali added the comment:
Through fork, yes, but shared rather than copy-on-write.
There's a subtlety: because of refcounting, just treating a COW object
as read-only (e.g. iteratin on
Guido van Rossum added the comment:
Tulip has something similar. Someone should compare the two and make sure they
are equivalent or similar.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17561
Charles-François Natali added the comment:
Apart from creating, unlinking and resizing the file I don't think there
should be any disk I/O.
On Linux disk I/O only occurs when fsync() or close() are called.
What?
Writeback occurs depending on the memory pressure, percentage of used
pages,
Charles-François Natali added the comment:
What you say is right but whether the kernel supports an hybrid IPv4/6 stack
or not there's not much we can do about it anyway.
Exactly what are you suggesting with the ServerSocket class you mentioned?
What do you expect it to do?
There's a
Richard Oudkerk added the comment:
On 27/03/2013 8:14pm, Charles-François Natali wrote:
Charles-François Natali added the comment:
Apart from creating, unlinking and resizing the file I don't think there
should be any disk I/O.
On Linux disk I/O only occurs when fsync() or close() are
New submission from Konstantin:
LinkedIn
I'd like to add you to my professional network on LinkedIn.
- Konstantin
Konstantin Aslanidi
Author of opentradingsystem.com
Greater New York City Area
Confirm that you know Konstantin Aslanidi:
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
Removed message: http://bugs.python.org/msg185376
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17562
___
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
nosy: -Aslanidi
resolution: - invalid
stage: - committed/rejected
status: open - closed
title: Invitation to connect on LinkedIn - spam
___
Python tracker rep...@bugs.python.org
Charles-François Natali added the comment:
I meant when there is no memory pressure.
http://lwn.net/Articles/326552/
The kernel page cache contains in-memory copies of data blocks
belonging to files kept in persistent storage. Pages which are written
to by a processor, but not yet written to
Changes by R. David Murray rdmur...@bitdance.com:
--
nosy: +dmalcolm
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17558
___
___
Python-bugs-list
New submission from Mark Shannon:
If a dict is used a cache, e.g. in functools.lru_cache,
the reduced resize factor in 3.3 can cause excessive resizing.
This can lead to a significant performance regression.
When the the number of deletions and insertions is roughly in balance
the reduced head
New submission from Mark Shannon:
The test_urllib2_localnet test fails when run with a clean build from a clean
checkout.
Machine:
Ubuntu 12.04 LTS, 64 bit
Intel i3-2370M CPU @ 2.40GHz × 4
Test output:
$ ./python -m test -v test_urllib2_localnet
== CPython 3.4.0a0 (default:53cc3dbb1918,
Senthil Kumaran added the comment:
Are you behind some kind of a proxy? This is seen when you are running the
tests and your interent connection is via proxy (and that is handling this
invalid URL test)
--
nosy: +orsenthil
status: open - pending
Ezio Melotti added the comment:
There's a comment in the test that says it might be because of the ISP.
What happens if you try to open that address in a browser or using something
like wget?
--
nosy: +ezio.melotti
status: pending - open
___
Python
R. David Murray added the comment:
Indeed, this is almost always a (common) ISP DNS server misconfiguration.
Well, they would claim they are helping their users, but we know better.
Not much we can do about it, except perhaps add an explanatory note to the test
failure message (if
Mark Shannon added the comment:
Bah, stupid BT :(
I opened the URL in my browser and got a helpful message telling me Sorry,
the website sadflkjsasf.i.nvali.d. cannot be found
Perhaps we should just remove this test?
I suspect this is only going to become more common.
--
Richard Oudkerk added the comment:
On 27/03/13 21:09, Charles-François Natali wrote:
I could, but I don't have to: a shared memory won't incur any I/O or
copy (except if it is swapped). A file-backed mmap will incur a *lot*
of I/O: really, just try writting a 1GB file, and you'll see your
R. David Murray added the comment:
I think we should instead have it email the ISP that their DNS is broken :)
Seriously, though, complain to your ISP. My ISP at least provides name servers
that don't have this feature if you prefer to use them, and they are the
default for business
Charles-François Natali added the comment:
Hummm...
For those experiencing failures when /proc is mounted: do you have a
grsecurity-patched kernel?
If RBAC is enabled, /proc/self/fd is empty, so this approach won't work...
--
nosy: +neologix
___
Mark Shannon added the comment:
This issue should be considered closed.
PyType_GenericNew is a convenience function for typeobjects to put in their
tp_new slots. Calling it directly only works for some types.
It worked in 3.2 for dict, but that was happenstance.
You could use
((PyTypeObject
Radu Voicilas added the comment:
Is there anything else that I have to do in order for this patch to be looked
at ? I am holding off a similar one for print_exception vs. format_exception
--
___
Python tracker rep...@bugs.python.org
New submission from Daniele Raimondi:
pickle and cPickle cause really often segfaults when dumping or loading user
defined classes. It happens with python 2.7.3 on 64bits architecture, with any
protocol (0,1,2).
I attach an example of class afflicted by this problem.
Solutions anyone?
Changes by Radu Voicilas radu.voici...@gmail.com:
--
nosy: +raduv
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17502
___
___
Python-bugs-list
Changes by STINNER Victor victor.stin...@gmail.com:
--
nosy: +haypo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17563
___
___
Python-bugs-list
Benjamin Peterson added the comment:
Please provide a self-contained explain, we can reproduce.
--
nosy: +benjamin.peterson
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17565
___
Changes by Benjamin Peterson benja...@python.org:
--
resolution: - invalid
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16676
___
Benjamin Peterson added the comment:
Thank you for the patch. It seems like it would make more sense to implement
print_tb in terms of extract_tb. That is, print_tb should iterate through the
result of extract_tb and do its printing.
--
nosy: +benjamin.peterson
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
nosy: +benjamin.peterson, ezio.melotti, haypo, serhiy.storchaka
versions: +Python 3.4
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17559
Benjamin Peterson added the comment:
The shortcut seems fairly pointless to me.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17559
___
___
STINNER Victor added the comment:
If you would like to improve Python, you have to focus on the development
version which is Python 3.4. In this version, the code is different:
if (length == 1)
return PyBool_FromLong(
Py_UNICODE_ISSPACE(PyUnicode_READ(kind, data, 0)));
Benjamin Peterson added the comment:
There's still stuff in bytes_methods.c which looks like the old string code.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17559
___
STINNER Victor added the comment:
ModelSettings.py requires globalSettings which is not attached.
--
nosy: +haypo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17565
___
Changes by Terry J. Reedy tjre...@udel.edu:
--
stage: - committed/rejected
status: open - closed
superseder: - Implement generator interface in itertools.chain.
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17433
STINNER Victor added the comment:
I'm not sure that it is a good idea to patch such major function (macro) in a
minor version (ex: Python 2.7.x). I changed the Versions field to only select
Python 3.4.
--
nosy: +haypo
versions: -Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python
1 - 100 of 110 matches
Mail list logo