Ned Deily added the comment:
The result of PATH= is also platform dependent. Testing on OS X which has a BSD
heritage rather a Linux one:
$ PATH= /usr/bin/which python
./python
# without patch
$ PATH= ./python -c 'import shutil; print(shutil.which(python))'
python
$ ./python -c 'import
Chris Withers added the comment:
Some background: I hit this problem when adding Python 3 compatibility
to one of my libraries, where I had the following code:
from types import ClassType
...
class_ = ClassType(n, (sometype, ), dict(class_attr1='foo',
class_attr2='bar')
It wasn't at all
Ned Deily added the comment:
Serhiy, I think your patch is ready to commit and close this issue as it
prevents the crash. A test would be nice if a reliable test could be devised
without too much effort but it's not mandatory, IMO. Any tangential issues or
more complex solutions can be
Changes by Jesús Cea Avión j...@jcea.es:
--
nosy: +jcea
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17223
___
___
Python-bugs-list mailing list
New submission from william wu:
I install python 2.7 in windows xp 32bit.
I try to open idle using C:\Python27python.exe Lib\idlelib\idle.py, But
return error as following:
Traceback (most recent call last):
File Lib\idlelib\idle.py, line 11, in module
idlelib.PyShell.main()
File
Changes by Serhiy Storchaka storch...@gmail.com:
--
components: +IDLE
nosy: +kbk
type: - behavior
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17224
___
Serhiy Storchaka added the comment:
Thank you for report, Arfrever. I'll see how epydoc uses MAXREPEAT. Maybe it
requires larger changes.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13169
Roundup Robot added the comment:
New changeset a80ea934da9a by Serhiy Storchaka in branch '2.7':
Fix issue #13169: Reimport MAXREPEAT into sre_constants.py.
http://hg.python.org/cpython/rev/a80ea934da9a
New changeset a6231ed7bff4 by Serhiy Storchaka in branch '3.2':
Fix issue #13169: Reimport
Serhiy Storchaka added the comment:
Thank you for the report. I'm surprised that the tests are not caught it.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6975
___
Nick Coghlan added the comment:
For the simple case where you don't need to provide a metaclass hint, the
simplest conversion is actually directly to the 3-argument form of type().
As far as the docstring goes, I don't want to make it as long as the full docs,
but it could probably stand to
Roundup Robot added the comment:
New changeset 50ed06b3d419 by Serhiy Storchaka in branch '2.7':
Fix posixpath.realpath() for multiple pardirs (fixes issue #6975).
http://hg.python.org/cpython/rev/50ed06b3d419
New changeset cb3fbadb65aa by Serhiy Storchaka in branch '3.2':
Fix
Roundup Robot added the comment:
New changeset bb5a8564e186 by Serhiy Storchaka in branch '2.7':
Issue #13153: Tkinter functions now raise TclError instead of ValueError when
http://hg.python.org/cpython/rev/bb5a8564e186
New changeset 9904f245c3f0 by Serhiy Storchaka in branch '3.2':
Issue
Changes by Serhiy Storchaka storch...@gmail.com:
--
assignee: asvetlov - serhiy.storchaka
resolution: - fixed
stage: commit review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13153
Changes by Serhiy Storchaka storch...@gmail.com:
--
resolution: - fixed
stage: - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6975
___
Serhiy Storchaka added the comment:
Here is an updated patch. Changes for unittest and doctest reverted.
--
Added file: http://bugs.python.org/file29113/NEWS-3.4_2.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17221
Marc Schlaich added the comment:
I'm +1 for a warning. The current behavior is really unexpectable:
In [6]: sorted([nan, 0, 1, -1])
Out[6]: [nan, -1, 0, 1]
In [7]: sorted([0, 1, -1, nan])
Out[7]: [-1, 0, 1, nan]
In [8]: sorted([0, nan, 1, -1])
Out[8]: [0, nan, -1, 1]
--
nosy:
Roundup Robot added the comment:
New changeset 3c5517c4fa5d by Serhiy Storchaka in branch '2.7':
Disable posixpath.realpath() tests on Windows (fix for issue #6975).
http://hg.python.org/cpython/rev/3c5517c4fa5d
New changeset 0bbf7cdea551 by Serhiy Storchaka in branch '3.2':
Disable
Changes by Serhiy Storchaka storch...@gmail.com:
--
resolution: - fixed
stage: - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13169
___
Harvey Ormston added the comment:
Thanks Sebastian. That makes sense. I've tried the updated patch and it works
just fine for me.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16525
___
Richard Oudkerk added the comment:
I did not realize there was a 'Extension Modules' section. I have been putting
changes to C extensions in the 'Library' section instead. It looks like most
people do the same as me.
--
nosy: +sbt
___
Python
Antoine Pitrou added the comment:
I did not realize there was a 'Extension Modules' section. I have
been putting changes to C extensions in the 'Library' section
instead. It looks like most people do the same as me.
I prefer Library as well. I think the Extension Modules section
should be
Serhiy Storchaka added the comment:
Was not it be yanked in 1fabff717ef4?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17221
___
___
New submission from Ferdinand Beyer:
The linecol() function in json/decoder.py computes the line and column numbers
for a byte offset in a string. Both numbers are expected to start with 1 (as
in text editors).
If the position is in the first line, the returned column is off by one (or
Changes by Serhiy Storchaka storch...@gmail.com:
--
assignee: - serhiy.storchaka
nosy: +ezio.melotti, pitrou, rhettinger, serhiy.storchaka
stage: - needs patch
versions: -Python 2.6, Python 3.1, Python 3.5
___
Python tracker rep...@bugs.python.org
Thomas Kluyver added the comment:
Updated version of the patch.
Changed from review:
- Included test.bytecode_helper module used by some tests
- Updated docs to indicate that the changes are new in 3.4
- ByteCode - Bytecode
- Added meaningful repr for Bytecode
Still to do:
- ? Re-expose
Antoine Pitrou added the comment:
I've lost track of why this new exception was needed. Could someone provide a
summary? Thanks :-)
--
nosy: +pitrou
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15767
Nick Coghlan added the comment:
This actually came up on the core-mentorship list (someone was trying to
translate old mod-formatting code that used a colon in the lookup names and
discovered this odd behaviour)
My own preference is to let this quote from PEP 3101 dominate the behaviour:
The
uservorname usernachname added the comment:
Thanks for your hints.
I got installed openssl-1.0.1d and ssl in
fes-a120d19nas:/backup/fes-a120d19nas/Python-3.3.0# whereis openssl
openssl: /usr/bin/openssl /usr/include/openssl
fes-a120d19nas:/backup/fes-a120d19nas/Python-3.3.0# whereis ssl
ssl:
Richard Oudkerk added the comment:
Was not it be yanked in 1fabff717ef4?
Looks like it was reintroduced by this merge changeset:
http://hg.python.org/cpython/rev/30fc620e240e
--
___
Python tracker rep...@bugs.python.org
Changes by Serhiy Storchaka storch...@gmail.com:
--
nosy: +gregory.p.smith
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17221
___
___
Ronald Oussoren added the comment:
Why are zipfiles without entries for directories broken? When you don't care
about directory permissions (such as when the zipfile won't be extracted at
all) the entries for directories are not necessary. Also, AFAIK the zipfile
specification
New submission from Alan Hourihane:
The configure.ac script detects libintl but can depend on libiconv.
I added this to force it and to demonstrate, but I think this is not 100%
correct and should be massaged into the libintl tests.
--- configure.ac.old2013-02-16 09:34:55.0 +
Changes by Jesús Cea Avión j...@jcea.es:
--
nosy: +jcea
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17170
___
___
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/issue16061
___
___
Python-bugs-list mailing list
Gregory P. Smith added the comment:
re-yank it. that was unintentional. less sections == better.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17221
___
Changes by Michele Orrù maker...@gmail.com:
--
nosy: -maker
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15767
___
___
Python-bugs-list mailing
Serhiy Storchaka added the comment:
Here is a patch. This change breaks tests, but unlikely anything except tests
depends on exact error message.
--
keywords: +patch
stage: needs patch - patch review
Added file: http://bugs.python.org/file29115/json_first_line_columns.patch
Changes by Jesús Cea Avión j...@jcea.es:
--
nosy: +jcea
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17044
___
___
Python-bugs-list mailing list
Serhiy Storchaka added the comment:
Here is an updated patch. Re-yanked Extension Modules section. Changes for
3.4 sorted in chronological order.
--
Added file: http://bugs.python.org/file29116/NEWS-3.4_3.patch
___
Python tracker
Changes by Brett Cannon br...@python.org:
--
nosy: -brett.cannon
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14905
___
___
Python-bugs-list
Brett Cannon added the comment:
It all LGTM. Nice cleanup! Totally didn't remember about to_bytes and
from_bytes.
If you are feeling adventurous you can look at possibly porting the changes you
made to _path_join() and _path_split() to os.py since I mostly copied them.
--
assignee:
Brett Cannon added the comment:
TL;DR for Antoine: when using a fromlist, import failures from that list are
silently ignored. Because ImportError is overloaded in terms of what it means
(e.g. bag magic number, module not found) there needs to be a clean way to tell
the import failed because
Serhiy Storchaka added the comment:
_path_join() and _path_split() do not look as join() and split() from ntpath or
posixpath. They rather look as very simplified and limited versions of join()
and split(). Perhaps they are enough for _bootstrap.py, but real os.path
functions are more
Brett Cannon added the comment:
So py_compile always replaced the file, even in Python 3.3:
http://hg.python.org/cpython/file/79ea59b394bf/Lib/py_compile.py#l141 (this is
why I changed the title of the bug). What did change, though, is that
py_compile now writes bytecode files just as import
Arfrever Frehtes Taifersar Arahesis added the comment:
In case of /dev/null, the main problem is that it became a regular file. It was
previously a character device. Writing to character devices should not replace
them.
What about problem with symlinks?:
$ cd /tmp
$ touch test.py
$ ln -s
Berker Peksag added the comment:
New patch attached.
Changes:
* Addressed msg107402. I will update the C code if this implementation
is correct.
* Added more tests
* Converted classmethods to staticmethods
* Removed doctests
* Updated documentation
--
nosy: +berker.peksag
Added
Arfrever Frehtes Taifersar Arahesis added the comment:
py_compile.compile() was always replacing contents of target file, but was not
causing that a given link name would refer to a different inode.
builtins.open() has correct behavior:
# stat /dev/null
File: ‘/dev/null’
Size: 0
New submission from Antoine Pitrou:
If you look e.g. here:
http://docs.python.org/devguide/faq.html#communications
you'll see that all questions are numbered 25, while the upper headings are
numbered 25.1, 25.2, etc.
Other places in the devguide seem fine, e.g.
Chris Jerdonek added the comment:
from foo import bar
Here bar can be not module, but an attribute of foo (for example, os.path).
Serhiy: What exception is raised in that situation is controlled by the eval
loop, not importlib so that would be a separate change.
Just to clarify from this
New submission from Richard Yao:
The preprocessor definition for uint is only defined when building with
PYMALLOC, which breaks builds without PYMALLOC. There is a Gentoo bug report on
this issue:
https://bugs.gentoo.org/show_bug.cgi?id=458168
I have attached a patch that I wrote that
Julian Scheid added the comment:
FWIW, I've run into the same issue in a homegrown application with 2.6.8, 2.7.2
and 2.7.3 (these were the only versions I've tested).
Looking around a little bit, I suspect this might be a bug in
SCDynamicStoreCopyProxies that's only present on OS X 10.7 and
Muflone added the comment:
Confirmed for Arch Linux x86_64 with python version 2.7.3
--
nosy: +Muflone
versions: +Python 3.3
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15976
___
New submission from Samwyse:
When a URL is opened, the opener-director is responsible for locating the
proper handler for the specified protocol. Frequently, an existing protocol
handler will be subclassed and then added to the collection maintained by the
director. When urlopen is called,
Changes by Serhiy Storchaka storch...@gmail.com:
--
stage: - needs patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17119
___
___
Changes by Serhiy Storchaka storch...@gmail.com:
--
stage: - patch review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15301
___
___
anatoly techtonik added the comment:
CVE-2011-4944
--
nosy: +techtonik
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13512
___
___
Ned Deily added the comment:
Do you have a use case where this is needed? As far as I know, Python itself
doesn't reference libiconv directly. libintl may but we're not building it,
merely using it. If libintl does reference it, the linker in use should try to
satisfy the dependency for
Changes by Chris Jerdonek chris.jerdo...@gmail.com:
--
nosy: +chris.jerdonek
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17227
___
___
New submission from jort bloem:
When calling os.fork() without a tty, a process reporting the parent's pid runs
code BEFORE the fork().
When running on a tty, it behaves as expected: both parent and child continue
running from statement immediately after os.fork()
See attached test.py,
STINNER Victor added the comment:
There is no attached file.
I don't think that it's a bug that the child starts before the parent. It
depends on the OS, OS version and many other things. You should use a
synchronization mechanism to ensure the execution order.
--
nosy: +haypo
Alan Hourihane added the comment:
Hi Yes, when Python is built as static only, on a system when no dynamic
loading is available. You have to explicitly link libiconv when libintl
references it.
--
___
Python tracker rep...@bugs.python.org
R. David Murray added the comment:
Haypo: I think he's saying that a statement in the source before the os.fork
call is executed in the child, which seem rather unlikely. Your suggestion may
be what is happening to confuse him into thinking that, but without the sample
program we can't
jort bloem added the comment:
Try attachment again.
--
Added file: http://bugs.python.org/file29119/test.py
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17230
___
jort bloem added the comment:
haypo: I understand that, after a fork, parent and child instructions are run
in parallel; which one prints first is a matter of chance.
However, commands BEFORE THE FORK should not be re-run.
See test script. I would expect one Start pid, followed by a parent
R. David Murray added the comment:
Stefan, IIRC you reworked some of the buffer/memoryview code. Do you know if
what is reported here is still an issue, and if so if it is worth fixing?
--
nosy: +r.david.murray, skrah
___
Python tracker
R. David Murray added the comment:
I only see Start printed once (on linux). What OS are you running this on?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17230
___
STINNER Victor added the comment:
I can reproduce the issue using python test.py|cat. The problem is that
sys.stdout is buffered and the buffer is flushed twice: once in the parent,
once in the child. Just call sys.stdout.flush() before os.fork() should fix
your issue.
I don't think that
Changes by STINNER Victor victor.stin...@gmail.com:
--
nosy: +haypo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17119
___
___
Python-bugs-list
Todd Rovito added the comment:
Over the weekend I caught this terrible cold and have not been able to work on
this issue much. Hopefully I can complete by next weekend 2/25/2013 thanks for
your understanding.
--
___
Python tracker
R. David Murray added the comment:
This appears to be out of date. The output matches that of the interpreter (no
extra newline) for 2.6.8, 2.7.3 and 3.2.1. The carrot in this particular
example points to the ) and not the newline; I'm not sure if that is ideal, but
it is consistent and, as
Ned Deily added the comment:
That helps a bit but, to be able to even test this, we would still need a
specific example of a platform and a configuration where this is the case.
It's not necessary or desirable to add on most platforms, I think.
--
R. David Murray added the comment:
I've reviewed these docs again, and I don't see anything left to update
(everything in the current 2.7 tutorial appears to be accurate). I also did a
grep on the FAQs, and don't see any prints that are statements, so those must
have gotten fixed as part of
Roundup Robot added the comment:
New changeset b5adf2a30b73 by R David Murray in branch '3.2':
#7963: fix error message when 'object' called with arguments.
http://hg.python.org/cpython/rev/b5adf2a30b73
New changeset 0e438442fddf by R David Murray in branch '3.3':
#7963: fix error message when
Roundup Robot added the comment:
New changeset 0082b7bf9501 by R David Murray in branch '2.7':
#7963: fix error message when 'object' called with arguments.
http://hg.python.org/cpython/rev/0082b7bf9501
--
___
Python tracker rep...@bugs.python.org
R. David Murray added the comment:
I've applied this. Note that this makes the object.__new__ message consistent
with, say, str.__new__. That is, 'str.__new__(str, 2, 3)' results in the
message TypeError: str() argument 2 must be str, not int. So the new object
error message is consistent
Raymond Hettinger added the comment:
-1 for a warning. A should really have *no* expectations about a NaNs sort
order. For the most part, Python does not get into warnings business for every
possible weird thing you could tell it to do (especially something as harmless
as this).
Also
jort bloem added the comment:
I agree that it is reasonable NOT to flush stdout on fork().
I don't think the outcome is reasonable.
What about voiding all buffers after the fork for the child?
--
___
Python tracker rep...@bugs.python.org
New submission from Maciej Fijalkowski:
Here: http://docs.python.org/2/reference/datamodel.html, as per python-dev
discussion
--
assignee: docs@python
components: Documentation
messages: 182364
nosy: docs@python, fijall
priority: normal
severity: normal
status: open
title: Mark __del__
New submission from Maciej Fijalkowski:
This is what the current documentation says:
-O
Turn on basic optimizations. This changes the filename extension for compiled
(bytecode) files from .pyc to .pyo. See also PYTHONOPTIMIZE.
-OO
Discard docstrings in addition to the -O optimizations.
As
Gregory P. Smith added the comment:
os.fork() is a low level system call wrapper. Anyone using it needs to deal
with flushing whatever buffers their application has before forking among many
many other things. There is a reason it lives in the os module.
It is already a dangerous system
New submission from Kim Gräsman:
Python 3.2.3 on 64-bit Windows 7.
When I set debuglevel on HTTPConnection to 1, the output seems jumbled, and I'm
having trouble interpreting it.
Attached is a full, anonymized log from a conversation I was troubleshooting.
Here's an excerpt:
send: b'GET /a
81 matches
Mail list logo