New submission from Damian :
Hi, when using terminal coloring codes (for instance '\x1b[32mhello
world\x1b[0m' for a green 'hello world') the raw_input function and readline
module behave well except under a very specific use case...
=
Damian added the comment:
Retested with Python 3.1.1 and this issue doesn't manifest. This can be
resolved - sorry about the noise. :)
--
nosy: +atagar
___
Python tracker
<http://bugs.python.org/is
New submission from Damian :
Hi, in switching to Python 3.0 I've run into an issue with displaying
Unicode characters via curses. In Python 2.x a simple hello-world looks
like:
#!/usr/bin/python
# coding=UTF-8
import curses
import locale
locale.setlocale(locale.LC_ALL,"")
def
Damian added the comment:
My OS is Ubuntu 8.04 (Hardy) and the locale is utf-8:
>>> locale.setlocale(locale.LC_ALL,"")
'en_US.UTF-8'
You do mean the Python 3.0 example didn't work, right? The Python3.0
header is:
Python 3.0 (r30:67503, Dec 21 2008, 02:16:52)
Damian added the comment:
Ack - sorry, typo. I meant "You do mean the Python 3.0 example did work,
right?"
___
Python tracker
<http://bugs.python.org/issue4787>
___
__
Damian added the comment:
Doing a checkout of the trunk - I'll let you know if it works. Thanks!
___
Python tracker
<http://bugs.python.org/issue4787>
___
___
Pytho
Damian added the comment:
Just finished recompiling and works perfectly. My hat's off to you -
many thanks! -Damian
___
Python tracker
<http://bugs.python.org/i
Damian added the comment:
Looks like this was my mistake, not a bug. According to:
http://mail.python.org/pipermail/python-list/2007-July/450133.html
Python 2.5 also requires the addition of libcursesw but it was working
for the Ubuntu release because they specifically added it. There'
New submission from Damian :
The threading module's isAlive() method had an is_alive() alias first created
in python 2.6. The documentation page doesn't mention this...
http://docs.python.org/library/threading.html#threading.Thread.is_alive
However, this is noted for other method
Damian added the comment:
I'm gonna hazard the guess that other methods like currentThread() and
current_thread() are the same...
http://docs.python.org/library/threading.html#threading.current_thread
--
___
Python tracker
<http://bugs.py
Damian added the comment:
Just a quick comment that I ran into this again, but turns out that it's not an
issue with python. Rather, this is a quirk with how readline works...
https://stackoverflow.com/questions/9468435/look-how-to-fix-column-calculation-in-python-readline-if-use-color-p
New submission from Damian:
Hi. While porting a library of mine from python 2.7 to 3.2 I noticed that
tarfile.is_tarfile() now raises an AttributeError rather than IOError when it
lacks read permissions...
atagar@morrigan:~$ touch dummy_file.tar
atagar@morrigan:~$ chmod 000 dummy_file.tar
New submission from Damian:
Hi. While porting a library of mine (https://stem.torproject.org/) to python 3
I've been reliably encountering a python segmentation fault while running its
integration tests. After many hours of head scratching I've narrowed the repro
to the follow
Damian added the comment:
Thanks. I snagged the 3.3 tarball from 'http://www.python.org/download/' after
your first comment. Compilation just finished and it works there...
atagar@morrigan:~$ ~/Desktop/Python-3.3.0/python --version
Python 3.3.0
atagar@morrigan:~$ ~/Desktop/Python-3.
New submission from Damian Yurzola :
In the following example the last line throws as 'NameError: name 'Level1A' is
not defined' for both 3.7 and 3.8
I assumed that Level1A should already be in scope while defining the insides of
Level1B. But it isn't.
Is th
Damian Yurzola added the comment:
This is even a better example:
Level1A is available to inherit from, but not to type with.
Example:
from typing import List
class Level0A:
pass
class Level0B:
class Level1A:
pass
class Level1B(Level1A):
pass
class
Change by Damian Yurzola :
--
versions: +Python 3.7
___
Python tracker
<https://bugs.python.org/issue40033>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Damian Barabonkov :
The way the resource tracker is used in /Lib/multiprocessing/shared_memory.py
leads to it issuing warnings/errors, even when resources are cleaned up
properly.
Attached are two simple demo files copied from the documentation example
(https
Damian Barabonkov added the comment:
As per Guido's comment
(https://github.com/python/cpython/pull/21516#issuecomment-668110711), I'm
going to use this space to discuss ways to go forward with resource tracking
and SharedMemory.
Taking inspiration from Vinay (https://bugs.
Damian Barabonkov added the comment:
Unless the resource_tracker also dies along with the process. In which case,
I'm not sure what there is there to do.
I believe the resource_tracker actually spawns a process alongside the process
that uses it. So if the parent process seg-faults
Damian Barabonkov added the comment:
Agreed.
--
___
Python tracker
<https://bugs.python.org/issue38119>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Damian Yurzola :
Last night I discovered we have datetime.datetime.today alongside
datetime.datetime.now and datetime.date.today.
- datetime.now
- date.today
Both make semantic sense.
datetime.datetime.today returns a datetime, which make no semantic sense and
causes
Damian Yurzola added the comment:
Thanks for your prompt answer Steven.
I was inspired to file this bug after reading through a multiplicity of bugs
introduced by folks confused by the library's behavior. So there's good
precedent.
While granted, the documentation is explic
Damian Yurzola added the comment:
I searched all of github and there seem to be ~350K entries for datetime.today
I think this supports steven.daprano point against removal.
I could not spot any major library in a quick cursory look.
However I do see many calls that look a lot like they
Damian Yurzola added the comment:
It took me a while to collect my thoughts but here you go.
Advanced users don't have a problem. They'll trade in date or datetime objects
explicitly. The "proof" is I could not find any github repo with more than one
start that
Damian Yurzola added the comment:
Sorry I got my "current" wrong and I can't find the edit button
Here again:
> "How long is it until Christmas?"
# Current implementation
In [23]: datetime.datetime(2020, 12, 25) - datetime.datetime.today()
Out[23]: datetime.time
New submission from Damian Yurzola :
'root' should be a reserved name to avoid this:
>>> import logging
>>> a = logging.getLogger()
>>> b = logging.getLogger('root')
>>> a.name
'root'
>>> b.name
'root'
>>
New submission from Damian Eads :
The instructions for the C interface to the Python set class
http://docs.python.org/c-api/set.html
say to use PyObject_GetIter and follow the iterator protocol. After
following the instructions for the iterator protocol here,
http://docs.python.org/c-api
New submission from Damian Myerscough:
I have been running a simple script inside a Docker container to cause the
container to trigger oom-killer.
>>> mem = {}
>>> for i in range(65535):
... mem[i] = "A" * 65535
When oom-killer is trigger I see a large n
Damian Myerscough added the comment:
@rbcollins there is nothing else running in the Docker container other than the
python interpreter. I did an `strace` of the process
mmap(NULL, 3149824, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7effc2d0c000
munmap(0x7effc300d000, 790528
Damian Myerscough added the comment:
Thanks for the feedback, I will continue to dig into this.
I know processes go crazy sometimes when OOM killer kicks off, I just wanted to
rule out a Python bug or if anyone in the community has seen this before.
Thanks
Changes by Damian Kotlar :
--
assignee: docs@python
components: 2to3 (2.x to 3.x conversion tool), Cross-Build, Demos and Tools,
Documentation, Extension Modules, Installation, Interpreter Core, Library
(Lib), SSL, Tests, XML, email
files: samsungapps.html
nosy: Alex.Willmer, barry
32 matches
Mail list logo