R. David Murray added the comment:
Ah yes. I remember there being a discussion somewhere about the differences
between comparison operator inverses and the arithmetic 'r' methods, but I
can't find it at the moment. I *thought* there was a full discussion of the
logic involved in these
Changes by Wolfgang Maier wolfgang.ma...@biologie.uni-freiburg.de:
--
nosy: +wolma
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9882
___
___
New submission from Facundo Batista:
Currently (tested on py3.4):
from datetime import datetime, date
d = datetime.now()
date(d)
Traceback (most recent call last):
File stdin, line 1, in module
TypeError: an integer is required (got type datetime.datetime)
IMO, it's like doing int(float),
Serhiy Storchaka added the comment:
The patch was not committed to 2.7 and now this bug causes an error on buildbot.
http://buildbot.python.org/all/builders/AMD64%20Debian%20root%202.7/builds/303/steps/test/logs/stdio
==
Zachary Ware added the comment:
Victor: Sorry for the delay in getting back to this. I'm attaching your full
patch again; the diff you posted is a diff against your first patch, while what
we need to be able to review it properly is a diff against the tip of the
'default' branch. You may be
New submission from Hoxily:
refer to http://hg.python.org/cpython/file/5d70ac83d104/Lib/asynchat.py#l123
--
components: Library (Lib)
hgrepos: 265
messages: 223842
nosy: brett.cannon, hoxily, tim.peters
priority: normal
severity: normal
status: open
title: incorrect type conversion
wjssz added the comment:
I wrote this code, but I don't know how to make a patch.
Insert these codes in C:\Python34\Lib\idlelib\IOBinding.py
Around line 234, before this line:
self.text.delete(1.0, end)
# check non-bmp characters
line_count = 1
position_count = 1
Roundup Robot added the comment:
New changeset 841cdb6145e9 by Serhiy Storchaka in branch '2.7':
Issue #1730136: Fix comparison between a tk Font object and an object of a
http://hg.python.org/cpython/rev/841cdb6145e9
--
nosy: +python-dev
___
Python
Changes by Hoxily hox...@qq.com:
--
hgrepos: -265
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22059
___
___
Python-bugs-list mailing list
wjssz added the comment:
Changing the second if to elif is better.
I'm sorry, I have never submitted patch.
If somebody gives a hand, feel free to modify those codes.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21084
Zachary Ware added the comment:
Mo Jia: are you still having issues with this?
--
resolution: - works for me
status: open - pending
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21623
___
Changes by Facundo Batista facu...@taniquetil.com.ar:
--
title: datetime.datetime() should accept a datetime.date as constructor -
datetime.datetime() should accept a datetime.date as init parameter
___
Python tracker rep...@bugs.python.org
Zachary Ware added the comment:
Mark, would you like to update your patch to address my review comments?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19980
___
Changes by Serhiy Storchaka storch...@gmail.com:
--
status: open - pending
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9882
___
___
Ezio Melotti added the comment:
See https://docs.python.org/devguide/patch.html
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21084
___
___
R. David Murray added the comment:
There is already a spelling for that operation, and it is d.date(). I'm not
sure that there is a strong enough argument for adding a second way to spell
it, but I won't close this yet to see what other people think.
Personally I don't think it has ever
Zachary Ware added the comment:
How about this? Should apply equally to 3.4 and default, 2.7 is different but
can use the same concept (with s/_winapi/_subprocess/ among other changes).
--
nosy: +zach.ware
stage: test needed - patch review
versions: +Python 3.4, Python 3.5 -Python
R. David Murray added the comment:
So you are saying that that if will never trigger and can be deleted?
--
nosy: +r.david.murray
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22059
___
STINNER Victor added the comment:
That's not what I'm answering to, though. See option B above.
Again, what's wrong with passing the socket as a fileno?
There is nothing wrong, it's just that I prefer option (C) over the option
(B).
Quick poll in the Python stdlib for functions accepting
Alexander Belopolsky added the comment:
+1
There is currently no obvious way to convert either date or datetime instance
to date.
The best solution I can think of is date(*x.timetuple()[:3]):
d = date.today()
t = datetime.now()
date(*d.timetuple()[:3])
datetime.date(2014, 7, 24)
Changes by Dan O'Reilly oreil...@gmail.com:
Removed file: http://bugs.python.org/file36059/map_chunksize.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11271
___
Changes by Dan O'Reilly oreil...@gmail.com:
Added file: http://bugs.python.org/file36064/map_chunksize.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11271
___
Changes by Dan O'Reilly oreil...@gmail.com:
Removed file: http://bugs.python.org/file36058/test_mult.py
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11271
___
Changes by Dan O'Reilly oreil...@gmail.com:
Added file: http://bugs.python.org/file36065/test_mult.py
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11271
___
Demian Brecht added the comment:
I've attached a patch that solves the issue I encountered. It would be great if
you could confirm whether or not it also resolves the issue as reported.
--
keywords: +patch
Added file: http://bugs.python.org/file36066/issue22041.patch
Changes by Dan O'Reilly oreil...@gmail.com:
Removed file: http://bugs.python.org/file36064/map_chunksize.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11271
___
Changes by Dan O'Reilly oreil...@gmail.com:
Added file: http://bugs.python.org/file36067/map_chunksize.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11271
___
Dan O'Reilly added the comment:
I've added new versions of the patch/demonstration that ensures we actually
submit all the futures before trying to yield from the returned iterator.
Previously we were just returning a generator object when map was called,
without actually submitting any
Alecz added the comment:
Actually, because of issue 18543, urlopen will not use the custom opener if one
was defined, instead, it will create a new opener with check_hostname = True.
So it is impossible to skip hostname checking without overriding the urlopen
method.
I don't understand why
Zachary Ware added the comment:
Hoxily: It's best to spell out the bug you have found, preferably with an
error/exception message and a way to reproduce it.
My best guess at the problem you're reporting (after looking at that line about
4 times) is that bytes(str, self.encoding) should be
Changes by STINNER Victor victor.stin...@gmail.com:
--
nosy: +haypo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22059
___
___
Python-bugs-list
Changes by STINNER Victor victor.stin...@gmail.com:
--
resolution: - duplicate
status: open - closed
superseder: - handle EINTR in the stdlib
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11266
Changes by STINNER Victor victor.stin...@gmail.com:
--
Removed message: http://bugs.python.org/msg172160
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16133
___
R. David Murray added the comment:
I have updated your patch, changing wording of some of the documentation, and
applying style tweaks to the code. I have also done the refactoring of the
_set_xxx_state method that I suggested. Seemed easier to show you what I meant
in code rather than try
R. David Murray added the comment:
This issue was about setting hostname checking to false when the cert was being
checked, and we rejected making that even possible in urlopen.
If there is an issue with not being able to use a custom opener, that would be
a different issue and you should
Roundup Robot added the comment:
New changeset b7f144d14798 by Victor Stinner in branch '3.4':
Issue #16133: The asynchat.async_chat.handle_read() method now ignores
http://hg.python.org/cpython/rev/b7f144d14798
New changeset aa150c7a5d24 by Victor Stinner in branch 'default':
(Merge 3.4) Issue
Roundup Robot added the comment:
New changeset d422062d7d36 by Victor Stinner in branch '2.7':
Issue #16133: The asynchat.async_chat.handle_read() method now ignores
http://hg.python.org/cpython/rev/d422062d7d36
--
___
Python tracker
STINNER Victor added the comment:
I modified EWOULDBLOCK.patch to use BlockingIOError on Python 3 and I added a
unit test. I also added EALREADY and EINPROGRESS which are used by the
BlockingIOError in Python 3, just in case.
Thanks Xavier for your patch, sorry for the delay.
--
Changes by STINNER Victor victor.stin...@gmail.com:
--
resolution: - duplicate
status: open - closed
superseder: - asyncore.dispatcher.recv doesn't handle EAGAIN / EWOULDBLOCK
___
Python tracker rep...@bugs.python.org
Tim Peters added the comment:
Was the title of this meant to be
datetime.date() should accept a datetime.datetime as init parameter
instead? That's what the example appears to be getting at.
If so, -1. Datetime objects already have .date(), .time(), and .timetz()
methods to extract,
STINNER Victor added the comment:
The test fails on AMD64 OpenIndiana 2.7:
http://buildbot.python.org/all/builders/AMD64%20OpenIndiana%202.7/builds/2354/steps/test/logs/stdio
test test_readline failed -- Traceback (most recent call last):
File
Ned Deily added the comment:
The changes are also causing segfaults when readline is linked with BSD libedit
(the default on OS X) rather than GNU readline:
==
FAIL: test_init (test.test_readline.TestReadline)
Alexander Belopolsky added the comment:
some_datetime_object.date() is the obvious way to extract a
date object from a datetime object.
Sorry if I was not clear enough about my use case. I often have to deal with
functions that are designed to take either date or datetime object as an
Alexander Belopolsky added the comment:
Another solution is date(2001, 1, 1).__lt__(x), but this is even uglier than
the one with timetuple.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22058
Charles-François Natali added the comment:
Here's a patch.
--
keywords: +patch
Added file: http://bugs.python.org/file36070/find_unused_race.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19875
Dan O'Reilly added the comment:
How are you importing JoinableQueue? You'll see this error if you import it
from multiprocessing.queues instead of directly from multiprocessing. This is
because multiprocessing.JoinableQueue is now a function:
def JoinableQueue(self, maxsize=0):
Changes by Dan O'Reilly oreil...@gmail.com:
--
components: +Library (Lib) -Interpreter Core
type: compile error - behavior
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21367
___
Charles-François Natali added the comment:
As I said offline to Victor, I think it would be better to have a single
function, i.e. keep set_wakeup_fd(). It makes the API simpler, less confusing
and error prone: some people will wonder which one they should use, might end
up using the wrong
Tim Peters added the comment:
Alexander, I don't see a need to make everything a one-liner. Dealing with a
mix of dates and datetimes is easily sorted out with an `if` statement, like
def func(thedate):
if isinstance(thedate, datetime.datetime):
thedate = thedate.date()
# and
Guido van Rossum added the comment:
I find Charles' argument pretty convincing. The whole point of this API is to
have another thing you can add to the selector to deal with a race condition.
You then pass this thing's fileno() to signal.set_wakeup_fd(). That should be
totally portable.
I'm
STINNER Victor added the comment:
The changes are also causing segfaults when readline is linked with BSD
libedit (the default on OS X) rather than GNU readline:
Oh wow. Do you have an idea of to fix the issue with libedit? Or make
the code condition, only use it with native readline?
Charles-François Natali added the comment:
The patch looks good.
I just think it would be nice to expose _fdcount() in test.support.
--
nosy: +neologix
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18174
Charles-François Natali added the comment:
I'm closing, since it's amlost certainly an OS-X bug (similar to time-wit
socket exhaustion Co).
--
resolution: - third party
stage: - resolved
status: open - closed
___
Python tracker
Alexander Belopolsky added the comment:
It is not as mush about avoiding a one-liner as it is about duck-typing. IMO,
dates and datetime objects are numbers in disguise. Many functions that are
nominally numeric, can work with date/datetime/timedelta objects without
modification. The fact
Charles-François Natali added the comment:
Closing as wont't fix, since we now have asyncio which handles this much better.
--
resolution: - wont fix
stage: needs patch - resolved
status: open - closed
___
Python tracker rep...@bugs.python.org
Charles-François Natali added the comment:
Shall we close this, since realpath(3) is fundamentally broken, and pathlib now
does The Right Thing?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12801
Ned Deily added the comment:
Currently, readline.c uses #ifdef __APPLE__ to guard libedit-specific code
(there is another open issue to generalize libedit support to other platforms).
--
___
Python tracker rep...@bugs.python.org
STINNER Victor added the comment:
Ok, let's go with the option (B): use set_wakeup_fd() on all platforms, but
only accept socket handles on Windows.
New patch wakeup_fd-7.patch:
- signal.set_wakeup_fd() now only accepts socket handles (int) on Windows, it
raises TypeError for files. Note: it
STINNER Victor added the comment:
Why not using os.fstat() instead of os.dup() to check if a file descriptor is
open or not?
It's strange to create a new file descriptor with os.dup() to count the file
descriptors.
--
___
Python tracker
Charles-François Natali added the comment:
Why not using os.fstat() instead of os.dup() to check if a file descriptor is
open or not?
I asked myself the same question, but IIRC, fstat() doesn't always
work on Windows (of course).
--
___
Python
STINNER Victor added the comment:
I agree, Python should not use the C function realpath() for all the reasons
give in the issue.
--
resolution: - not a bug
status: open - closed
___
Python tracker rep...@bugs.python.org
Guido van Rossum added the comment:
I think if it's not a socket (or a closed one) it should raise ValueError or
perhaps OSError -- TypeError would mean that it's not an int.
--
___
Python tracker rep...@bugs.python.org
STINNER Victor added the comment:
I asked myself the same question, but IIRC, fstat() doesn't always
work on Windows (of course).
Can you please elaborate?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18174
STINNER Victor added the comment:
I think if it's not a socket (or a closed one) it should raise ValueError or
perhaps OSError -- TypeError would mean that it's not an int.
Oh, you're right. Updated patch, version 8, now raises a ValueError.
--
Added file:
Charles-François Natali added the comment:
STINNER Victor added the comment:
I asked myself the same question, but IIRC, fstat() doesn't always
work on Windows (of course).
Can you please elaborate?
Not really, since I don't know much about Windows, but that's
something I think I heard.
Roundup Robot added the comment:
New changeset f0ab6f9f0603 by Victor Stinner in branch '2.7':
Issue #19884, readline: calling rl_variable_bind (enable-meta-key, off)
http://hg.python.org/cpython/rev/f0ab6f9f0603
New changeset 3f08c1156050 by Victor Stinner in branch '3.4':
Issue #19884,
Facundo Batista added the comment:
El 24/07/14 a las 15:01, Tim Peters escibió:
datetime.date() should accept a datetime.datetime as init
parameter
instead? That's what the example appears to be getting at.
If so, -1. Datetime objects already have .date(), .time(), and
.timetz()
STINNER Victor added the comment:
The issue is just an example of the main issue #18885 which proposes to retry
interrupted syscalls. I hesitate to mark it as duplicate, but it contains an
interesting patch.
--
___
Python tracker
New submission from Zachary Ware:
Attached is a patch that aims to clean up the ctypes tests a bit, namely by
removing the custom resource management (which conflicts with regrtest), the
custom test discovery (which is better left to unittest), and the custom test
running (which is better
Charles-François Natali added the comment:
Ok, let's go with the option (B): use set_wakeup_fd() on all platforms, but
only accept socket handles on Windows.
Sorry, why restrict it to sockets on Windows?
If someone wants to pass e.g. a pipe, why prevent it?
--
Zachary Ware added the comment:
Apologies for the delay in answering, Emily. And, unfortunately, I don't have
a good answer. If you would like to write a patch, I would suggest just
sticking the documentation wherever you think is best and make sure there is a
link to it from the Symbols
Alecz added the comment:
I just want to point out that the documentation states that an opener can be
used with urlopen:
urllib.request.install_opener(opener)
Install an OpenerDirector instance as the default global opener. Installing
an opener is only necessary if you want urlopen to
Alex Gaynor added the comment:
The attached patch (drafted by myself, and David Reid) backports all of the SSL
module (and tests!!!) to Python 2.7. All tests pass on my machine (OS X 10.9),
I haven't tested against other platforms.
I /suspect/ the best way to review this patch will be by
Alecz added the comment:
If this request was rejected shouldn't the Resolution be something such as
Rejected, Not a Bug, or Wont fix?
At the first glance, I believe it is very misleading to see this as fixed.
I even installed the latest version and was surprised to see that the fix did
not
STINNER Victor added the comment:
Sorry, why restrict it to sockets on Windows?
If someone wants to pass e.g. a pipe, why prevent it?
Pipes cannot be configured in non-blocking mode on Windows. It sounds dangerous
to call a blocking syscall in a signal handler.
In fact, it works to write
Changes by Ian Cordasco graffatcolmin...@gmail.com:
--
nosy: +icordasc
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21308
___
___
Changes by Antoine Pitrou pit...@free.fr:
--
nosy: +ncoghlan
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13533
___
___
Python-bugs-list mailing
Antoine Pitrou added the comment:
In fact, it works to write the signal number into a pipe on Windows, but I'm
worried about the blocking behaviour.
It wasn't different before, so I'm not sure why we should start to worry about
it?
--
___
Python
New submission from Lita Cho:
I updated my source code, and it looks like turtledemo doesn't launch anymore.
I get the following error:
Traceback (most recent call last):
File /Users/litacho/Development/cpython/Lib/runpy.py, line 170, in
_run_module_as_main
__main__, mod_spec)
File
Terry J. Reedy added the comment:
Posted today on python-ideas with the mistaken title os.path.argparse -
optional startdir argument by Wolfgang Maier (wolma). (He corrected in a
second post, but too late.) Juancarlo Añez pointed to pathlib.Path.resolve as
a better alternative. Path joins
Lita Cho added the comment:
Looks like this method was not doing anything. I removed it and the demo is
working just fine. Here is a patch.
--
keywords: +patch
Added file: http://bugs.python.org/file36076/tk_menubar_fix.patch
___
Python tracker
New submission from Terry J. Reedy:
1. The pattern argument for .(r)glob must be relative. I think the docstrings
and doc should say so. /pattern/relative pattern/
For rglob: '''This is like calling glob() with “**” added in front of the given
pattern:'''
2. Currently glob() links to the
R. David Murray added the comment:
Do non-relative patterns even make sense? I was surprised to get a
NotImplementedError instead of a ValueError.
--
nosy: +r.david.murray
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22062
Nick Coghlan added the comment:
Changing this isn't really feasible with the current design of the
initialisation code - we call Py_FatalError in various places because we don't
have the infrastructure set up to do anything else.
PEP 432 should help (and the basic design there still seems
Lita Cho added the comment:
Here is an updated version of the patch now that Terry submitted the changes
from issue21597.
--
Added file: http://bugs.python.org/file36077/window_pane_font_size_v3.patch
___
Python tracker rep...@bugs.python.org
STINNER Victor added the comment:
In fact, it works to write the signal number into a pipe on Windows, but I'm
worried about the blocking behaviour.
It wasn't different before, so I'm not sure why we should start to worry
about it?
Does you have an idea if set_wakeup_fd() is used on
David Wilson added the comment:
This new patch abandons the buffer interface and specializes for Bytes per the
comments on this issue.
Anyone care to glance at least at the general structure?
Tests could probably use a little more work.
Microbenchmark seems fine, at least for construction.
Roundup Robot added the comment:
New changeset 5ce01ee2a8f4 by Victor Stinner in branch 'default':
Issue #22018: Fix test_set_wakeup_fd_result(), use assertEqual() not
http://hg.python.org/cpython/rev/5ce01ee2a8f4
--
___
Python tracker
New submission from STINNER Victor:
The sock_xxx() methods of asyncio.BaseEventLoop don't make the socket
non-blocking, and the documentation doesn't require that sockets are already
set to non-blocking mode.
It looks like a bug, at least in the documentation.
If these methods should make
Demian Brecht added the comment:
Attached a new patch with with a simple test.
--
Added file: http://bugs.python.org/file36079/issue22041_1.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22041
STINNER Victor added the comment:
Does you have an idea if set_wakeup_fd() is used on Windows? It's not
possible to use it with select.select() because on Windows this function only
accepts sockets. I don't know if it's possible to watch a pipe using IOCP. Is
set_wakeup_fd() used by
wjssz added the comment:
Feel free to modify this patch.
--
Added file: http://bugs.python.org/file36080/nonbmp_except_check.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21084
___
Lita Cho added the comment:
Here is a new patch where it checks to see if turtledemo exists first before
loading it onto the bindings.
--
Added file: http://bugs.python.org/file36081/turtle_demo_v2.patch
___
Python tracker rep...@bugs.python.org
Guido van Rossum added the comment:
PEP 3156 is clear: The socket argument has to be a non-blocking socket. So
it's a documentation issue.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22063
wjssz added the comment:
nonbmp_except_check_v2.patch changes character numbers to 0-based, same as IDLE.
Quote from www.tkdocs.com :
for historical conventions related to how programmers normally refer to lines
and characters, line numbers are 1-based, and character numbers are 0-based.
paul j3 added the comment:
Note that
'-t 1 2 3'.split()
becomes
['-t', '1', '2', '3']
Your 'type' function sees those 3 strings individually. Try printing 'string'
the first thing in your function to see what we mean.
--
nosy: +paul.j3
paul j3 added the comment:
That's an artifact of how the group usage is formatted (which isn't very
robust). It's not designed to handle nested groups.
Mutually exclusive groups aren't meant to nest inside other mutually exclusive
groups. While it possible, it doesn't help you.
Serhiy Storchaka added the comment:
Indeed, unlike to other removed methods which raised an exception, removing
this doing nothing method can break existing code. We should restore it and add
deprecation warning.
Of course the use of obsolete method should be removed from turtledemo.
101 - 198 of 198 matches
Mail list logo