[issue9561] distutils: set encoding to utf-8 for input and output files

2010-09-13 Thread Toshio Kuratomi
Toshio Kuratomi added the comment: >>> - RPM spec files, which use ASCII or UTF-8 according to >>> http://en.opensuse.org/openSUSE:Specfile_guidelines#Specfile_Encoding but >>> it’s not confirmed in >>> http://www.rpm.org/max-rpm/s1-rpm-build-creating-spe

[issue1538778] pyo's are not overwritten by different optimization levels

2010-09-13 Thread Toshio Kuratomi
Toshio Kuratomi added the comment: Here's a usage where this matters. It's a simplification of the bug report that I got that prompted me to open this. Let's say I have the following code: /usr/lib/python2.7/site-packages/foo.py:: def help(): """

[issue1538778] pyo's are not overwritten by different optimization levels

2010-09-13 Thread Toshio Kuratomi
Toshio Kuratomi added the comment: It doesn't fix the problem as it falls into the third class of solutions (one that requires cooperation by the system administrator to diagnose and fix). OTOH, at this point in time I'm putting all of my packages in system packages where the

[issue11200] Addition of abiflags breaks distutils

2011-02-22 Thread Toshio Kuratomi
Toshio Kuratomi added the comment: Distribute issue opened and patch based on Antoine's comments attached. https://bitbucket.org/tarek/distribute/issue/191/distribute-fails-unittests-on-python-32 -- ___ Python tracker <http://bugs.py

[issue10838] subprocess __all__ is incomplete

2011-01-05 Thread Toshio Kuratomi
New submission from Toshio Kuratomi : I have a compatibility module for subprocess in python-2.7 for people who are stuck on python-2.4 (without check_call) and they got a traceback from trying to use compat.subprocess.list2cmdline(). In order to use the stdlib's subprocess if it&#

[issue10838] subprocess __all__ is incomplete

2011-01-05 Thread Toshio Kuratomi
Toshio Kuratomi added the comment: IIRC, it was more along the lines of: all private names should be underscored. The difference being that we get to choose whether currently non-underscored names should get underscored, should be deprecated and then underscored, or should be made public

[issue10838] subprocess __all__ is incomplete

2011-01-05 Thread Toshio Kuratomi
Toshio Kuratomi added the comment: For other's reference, there were three threads in November2010 that touch on this: :About removing argparse.__all__ or adding more methods to it: http://mail.python.org/pipermail/python-dev/2010-November/105147.html :Removing tk interface in

[issue11200] Addition of abiflags breaks distutils

2011-02-12 Thread Toshio Kuratomi
New submission from Toshio Kuratomi : When trying to build distribute on the latest python-3.2rc I get the following traceback in the unittests (two others that are similar as well): == ERROR: test_develop

[issue11200] Addition of abiflags breaks distutils

2011-02-20 Thread Toshio Kuratomi
Toshio Kuratomi added the comment: Ha! Your reply jogged my memory. MvL mentioned exactly the potential for this backwards incompatibility here: http://mail.python.org/pipermail/python-dev/2010-December/106351.html when talking about whether other API changes could go into distutils to

[issue2211] Cookie.Morsel interface needs update

2008-08-04 Thread Toshio Kuratomi
Changes by Toshio Kuratomi <[EMAIL PROTECTED]>: -- nosy: +a.badger ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2211> ___ __

[issue3991] urllib.request.urlopen does not handle non-ASCII characters

2008-09-28 Thread Toshio Kuratomi
New submission from Toshio Kuratomi <[EMAIL PROTECTED]>: Tested on python-3.0rc1 -- Linux Fedora 9 I wanted to make sure that python3.0 would handle url's in different encodings. So I created two files on an apache server which were named ½ñ.html. One of the filenames was encoded i

[issue3991] urllib.request.urlopen does not handle non-ASCII characters

2008-09-29 Thread Toshio Kuratomi
Toshio Kuratomi <[EMAIL PROTECTED]> added the comment: Possibly. This is a change from python-2.x's urlopen() which escaped the URL automatically, though. I can see the case for having the user call an escape function themselves instead of having urlopen() perform the escape for the

[issue3991] urllib.request.urlopen does not handle non-ASCII characters

2008-09-30 Thread Toshio Kuratomi
Toshio Kuratomi <[EMAIL PROTECTED]> added the comment: The purpose of such a function would be to take something that is not a valid uri but 1) is a common way of expressing the way to get to the resource and 2) follows certain rules and turns that into something that is a valid uri. non

[issue3991] urllib.request.urlopen does not handle non-ASCII characters

2008-09-30 Thread Toshio Kuratomi
Toshio Kuratomi <[EMAIL PROTECTED]> added the comment: Oh, that's cool. I've been fine with this being a request for a needed function to quote and unquote full urls rather than a bug in urlopen(). I think iri's are a distraction here, though. The RFC for iris even say

[issue4006] os.getenv silently discards env variables with non-UTF-8 values

2008-10-01 Thread Toshio Kuratomi
New submission from Toshio Kuratomi <[EMAIL PROTECTED]>: On a Linux system with a locale setting whose encoding is utf-8, if you set an environment variable to have a non-utf-8 chanacter, that environment variable silently does not appear in os.environ:: mkdir ñ convmv -f utf-8 -t l

[issue4006] os.getenv silently discards env variables with non-UTF-8 values

2008-10-02 Thread Toshio Kuratomi
Toshio Kuratomi <[EMAIL PROTECTED]> added the comment: It's not a feature it's a bug! :-) (I hope you meant to have a smiley too ;-) As stated in the os.listdir() related bug, on Unix filesystems filenames are a sequence of bytes. The system encoding allows the user-level tool

[issue4126] remove not decodable environment variables

2008-10-14 Thread Toshio Kuratomi
Toshio Kuratomi <[EMAIL PROTECTED]> added the comment: Yep :-) I am against throwing away valid data just because we can't interpret it automatically. Environment variables in Unix hold bytes. Those bytes are usually ASCii characters, however, they do not have to be. This is a ca

[issue4036] Support bytes for subprocess.Popen()

2008-10-15 Thread Toshio Kuratomi
Changes by Toshio Kuratomi <[EMAIL PROTECTED]>: -- nosy: +a.badger ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4036> ___ __

[issue4126] remove not decodable environment variables

2008-10-15 Thread Toshio Kuratomi
Toshio Kuratomi <[EMAIL PROTECTED]> added the comment: """ About your subprocess example: we choose to refuse it because we don't mix bytes (your non decodable PATH) and unicode ('myapp.sh') """ If python3 is doing things right we shouldn

[issue4359] at runtime, distutils uses buildtime files

2008-11-19 Thread Toshio Kuratomi
New submission from Toshio Kuratomi <[EMAIL PROTECTED]>: When using some distutils functions, distutils attempts to use buildtime files like Makefile and pyconfig*.h as data sources. For instance, this snippet:: from distutils.command.install import install from distutils.core

[issue4006] os.getenv silently discards env variables with non-UTF-8 values

2008-11-23 Thread Toshio Kuratomi
Toshio Kuratomi <[EMAIL PROTECTED]> added the comment: Pardon, but when you close something as wontfix it's polite to say why. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.

[issue1208304] urllib2's urlopen() method causes a memory leak

2008-11-23 Thread Toshio Kuratomi
Toshio Kuratomi <[EMAIL PROTECTED]> added the comment: I tried to repeat the test in http://bugs.python.org/msg60749 and found that the descriptors will close if you read from the file before closing. so this leads to open descriptors:: import urllib2 f = urllib2.urlopen

[issue1208304] urllib2's urlopen() method causes a memory leak

2008-11-23 Thread Toshio Kuratomi
Toshio Kuratomi <[EMAIL PROTECTED]> added the comment: One further data point. On two rhel5 systems with identical kernels, both x86_64, both python-2.4.3... basically, everything I've thought to check identical, I ran the test code with f.read() in an infinite loop. One system o

[issue4006] os.getenv silently discards env variables with non-UTF-8 values

2008-11-23 Thread Toshio Kuratomi
Toshio Kuratomi <[EMAIL PROTECTED]> added the comment: Is it a bug? If so, then it should be retargetted to 3.1 instead of closed wontfix. If it's not a bug then there should be an explanation of why it's not a bug. As for fixing it there are several inelegant methods that

[issue4006] os.getenv silently discards env variables with non-UTF-8 values

2008-11-23 Thread Toshio Kuratomi
Toshio Kuratomi <[EMAIL PROTECTED]> added the comment: I'm sorry but "For the moment, this case is just not supported." is not an explanation of why this is not a bug. It is a statement that the interpreter cannot handle a situation that has arisen. If you said, "

[issue4006] os.getenv silently discards env variables with non-UTF-8 values

2008-11-24 Thread Toshio Kuratomi
Toshio Kuratomi <[EMAIL PROTECTED]> added the comment: ''' @a.badger: The behaviour (drop non encodable strings) is not really a problem if you configure correctly your program and computer. Eg. you spoke about CGI-WSGI: if your website also speak UTF-8, you will

[issue4006] os.getenv silently discards env variables with non-UTF-8 values

2008-11-24 Thread Toshio Kuratomi
Toshio Kuratomi <[EMAIL PROTECTED]> added the comment: > The bug tracker is maybe not the right place to discuss a new Python3 feature. It's a bug! But if you guys want it to be a feature, then what mailing list do I need to join? Is there one devoted to Unicode or is python-de

[issue44383] argparse.BooleanOptionalAction interacts poorly with ArgumentDefaultsHelpFormatter

2021-07-08 Thread Toshio Kuratomi
Toshio Kuratomi added the comment: I believe this is a duplicate of https://bugs.python.org/issue38956 and could be closed in favor of that issue. 38956 also has a Pull Request to fix the issue which is awaiting a re-review. -- nosy: +a.badger

[issue44587] BooleanOptionalAction displays default=SUPPRESS unlike other action types

2021-07-08 Thread Toshio Kuratomi
New submission from Toshio Kuratomi : This is related to https://bugs.python.org/issue38956 but a different symptom (and the current proposed fix for 38956 will not fix this. My proposed fixes for this would also fix 38956). I have the following code which uses BooleanOptionalAction along

[issue44587] argparse BooleanOptionalAction displays default=SUPPRESS unlike other action types

2021-08-17 Thread Toshio Kuratomi
Change by Toshio Kuratomi : -- pull_requests: +26275 pull_request: https://github.com/python/cpython/pull/27808 ___ Python tracker <https://bugs.python.org/issue44

[issue44587] argparse BooleanOptionalAction displays default=SUPPRESS unlike other action types

2021-08-17 Thread Toshio Kuratomi
Toshio Kuratomi added the comment: PR Opened. A fix for this should be backported as well. However, if you decide you don't want the refactor backported, you can merely continue to change the condition inside of BooleanOptionalAction to repeat all of the same checks as are contain

[issue40917] pickling exceptions with mandatory keyword args will traceback

2020-06-08 Thread Toshio Kuratomi
New submission from Toshio Kuratomi : I was trying to use multiprocessing (via a concurrent.futures.ProcessPoolExecutor) and encountered an error when pickling a custom Exception. On closer examination I was able to create a simple test case that only involves pickle: import pickle class

[issue40917] pickle exceptions with mandatory keyword args will traceback

2020-06-08 Thread Toshio Kuratomi
Change by Toshio Kuratomi : -- title: pickling exceptions with mandatory keyword args will traceback -> pickle exceptions with mandatory keyword args will traceback ___ Python tracker <https://bugs.python.org/issu

[issue40917] pickle exceptions with mandatory keyword args will traceback

2020-06-11 Thread Toshio Kuratomi
Toshio Kuratomi added the comment: Thanks! I confirm that your PR https://github.com/python/cpython/pull/11580 for https://bugs.python.org/issue27015 fixes this problem. Closing this one. -- resolution: -> duplicate stage: -> resolved status: open -&g

[issue36998] distutils sdist command fails to create MANIFEST if any filenames are undecodable

2019-05-21 Thread Toshio Kuratomi
New submission from Toshio Kuratomi : An sdist may contain files whose names are undecodable in the current locale. For instance, the sdist might include some files for testing whose filenames are undecodable because that's the format of the input for that application. Currently, tryi

[issue36998] distutils sdist command fails to create MANIFEST if any filenames are undecodable

2019-05-21 Thread Toshio Kuratomi
Change by Toshio Kuratomi : -- keywords: +patch pull_requests: +13378 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue36998> ___ _

[issue36998] distutils sdist command fails to create MANIFEST if any filenames are undecodable

2019-05-21 Thread Toshio Kuratomi
Toshio Kuratomi added the comment: I like the idea of defaulting to UTF-8 (although I think you'll have to build consensus as to whether that's the right thing to do here) but it won't handle the use case here. There's a need to handle files which are undecodable an

[issue36998] distutils sdist command fails to create MANIFEST if any filenames are undecodable

2019-05-21 Thread Toshio Kuratomi
Toshio Kuratomi added the comment: >From my initial description: "An sdist may contain files whose names are undecodable in the current locale. For instance, the sdist might include some files for testing whose filenames are undecodable because that's the format of the i

[issue36998] distutils sdist command fails to create MANIFEST if any filenames are undecodable

2019-05-21 Thread Toshio Kuratomi
Toshio Kuratomi added the comment: Uploading a minimal test case. $ tar -xzvf test-case.tar.gz $ python3.7 setup.py sdist running sdist running check warning: sdist: standard file not found: should have one of README, README.txt, README.rst reading manifest template 'MANIFEST.in

[issue36998] distutils sdist command fails to create MANIFEST if any filenames are undecodable

2019-05-21 Thread Toshio Kuratomi
Toshio Kuratomi added the comment: Okay, pushed a fix for regenerating the MANIFEST as well. -- ___ Python tracker <https://bugs.python.org/issue36998> ___ ___

[issue36998] distutils sdist command fails to create MANIFEST if any filenames are undecodable

2019-05-21 Thread Toshio Kuratomi
Toshio Kuratomi added the comment: Are the distutils unittests disabled? And if so is there a reason? I was looking to add test cases to my PR and found that I couldn't get them (or indeed any distutils unittests) to run when trying to only target the distutils unittests. >From

[issue36998] distutils sdist command fails to create MANIFEST if any filenames are undecodable

2019-05-21 Thread Toshio Kuratomi
Toshio Kuratomi added the comment: Figured out the answer to my last question while looking into fixing it. The devguide documents both running tests via regrtest and running them via unittest test discovery. regrtest works: ./python -m test -v distutils.test But unittest doesn&#

[issue36165] DOC: ssl.rst is missing formatting on two links

2019-05-06 Thread Toshio Kuratomi
Toshio Kuratomi added the comment: I'll take a look at this one. -- nosy: +a.badger ___ Python tracker <https://bugs.python.org/issue36165> ___ ___ Pytho

[issue36165] DOC: ssl.rst is missing formatting on two links

2019-05-06 Thread Toshio Kuratomi
Change by Toshio Kuratomi : -- keywords: +patch pull_requests: +13046 stage: needs patch -> patch review ___ Python tracker <https://bugs.python.org/issu

[issue24263] unittest cannot load module whose name starts with Unicode

2019-05-06 Thread Toshio Kuratomi
Change by Toshio Kuratomi : -- pull_requests: +13064 stage: test needed -> patch review ___ Python tracker <https://bugs.python.org/issue24263> ___ ___ Python-

[issue24263] unittest cannot load module whose name starts with Unicode

2019-05-07 Thread Toshio Kuratomi
Toshio Kuratomi added the comment: I've opened a new PR at https://github.com/python/cpython/pull/13149 with the commit from https://github.com/python/cpython/pull/1338 and some additional changes to address the review comments given by serhiy.storchaka and rbcollins --

[issue36812] posix_spawnp returns error when used with file_actions

2019-05-07 Thread Toshio Kuratomi
Toshio Kuratomi added the comment: The error message is reporting the path. However, it is only the path component that is specified in the call to the function. This behaviour is not limited to the posix_spawnp() function but happens with any interface that can look up a command in the

[issue36656] Allow os.symlink(src, target, force=True) to prevent race conditions

2019-05-07 Thread Toshio Kuratomi
Toshio Kuratomi added the comment: Additionally, the os module is supposed to closely follow the behaviour of the underlying operating system functions: https://docs.python.org/3/library/os.html > The design of all built-in operating system dependent modules of Python is > such t

[issue35924] curses segfault resizing window

2019-05-07 Thread Toshio Kuratomi
Toshio Kuratomi added the comment: I'm still debugging this but it may be an off-by-one error in ncurses, wresize.c. I've found that if I modify the following section in ncurses, our problem goes away: /* * Dispose of unwanted memory. */ if (!(win->_fl

[issue36812] posix_spawnp returns error when used with file_actions

2019-05-07 Thread Toshio Kuratomi
Toshio Kuratomi added the comment: Ah okay, I'll see what information posix_spawnp() (the C function) returns on error for that case. -- ___ Python tracker <https://bugs.python.org/is

[issue36812] posix_spawnp returns error when used with file_actions

2019-05-08 Thread Toshio Kuratomi
Toshio Kuratomi added the comment: Yeah, I've verified what Victor said about the OS not giving us enough information to tell what file is causing the issue. However, I wonder if we should change the error message to be less confusing? I'm a godawful C programmer but maybe some

[issue35924] curses segfault resizing window

2019-05-08 Thread Toshio Kuratomi
Toshio Kuratomi added the comment: I've diagnosed this a bit further and have a workaround for you. It appears that using addstr() with a string with embedded newlines is a piece of the problem. If I modify your example program so that we add each line as a separate string inste

[issue35924] curses segfault resizing window

2019-05-08 Thread Toshio Kuratomi
Toshio Kuratomi added the comment: My upstream (ncurses) bug report: http://lists.gnu.org/archive/html/bug-ncurses/2019-05/msg00010.html -- ___ Python tracker <https://bugs.python.org/issue35

[issue35924] curses segfault resizing window

2019-05-08 Thread Toshio Kuratomi
Change by Toshio Kuratomi : -- keywords: +patch pull_requests: +13120 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue35924> ___ _

[issue6981] locale.getdefaultlocale() envvars default code and documentation mismatch

2019-05-08 Thread Toshio Kuratomi
Toshio Kuratomi added the comment: Hey doko, I was just looking through the oldest gettext bugs and found this bug open. It was caused by your commits here: https://bugs.python.org/issue1166948 . It feels like we have a few choices: * revert the LANGUAGE ordering change which would take

[issue14353] Proper gettext support in locale module

2019-05-08 Thread Toshio Kuratomi
Toshio Kuratomi added the comment: As this problem does not affect Python3 I think it's up to the 2.7 release manager to decide if it should be merged. benjamin, what do you think? If you want it, I'll open a PR on github for it. -- nosy: +a.badger, benjami

[issue36310] pygettext3.7 Does Not Recognize gettext Calls Within fstrings

2019-05-09 Thread Toshio Kuratomi
Toshio Kuratomi added the comment: Eric, I'm CC'ing you on this issue because I'm not sure if you've considered f-strings and gettext and figured out a way to make them work together. If you have, I can look into adding support for extracting the strings to pygettext bu

[issue36837] Make il8n tools available from `python -m`

2019-05-09 Thread Toshio Kuratomi
Toshio Kuratomi added the comment: Note, I've been doing some tests of how our gettext module differs from GNU gettext and run into a few bugs and lack of features which make msgfmt unusable and limit pygettext's usefulness. * msgfmt doesn't seem to store the charset from th

[issue36837] Make il8n tools available from `python -m`

2019-05-09 Thread Toshio Kuratomi
Toshio Kuratomi added the comment: A note about the msgfmt problem. It looks like GNU gettext's msgfmt has a similar problem but the msgfmt from pybabel does not. This may mean that we need to change the gettext *Translation objects to be more tolerant of non-ascii encodings (pe

[issue24263] unittest cannot load module whose name starts with Unicode

2019-05-10 Thread Toshio Kuratomi
Toshio Kuratomi added the comment: >From the description, I think the bug is that filenames that *begin* with >non-ascii are not searched for tests. Looking at the test_dir.tar.gz >contents, this is the test case that I'd use: Broken: $ python3 -m unittest discover -vv -p

[issue36837] Make il8n tools available from `python -m`

2019-05-11 Thread Toshio Kuratomi
Toshio Kuratomi added the comment: Scratch what I said in https://bugs.python.org/issue36837?@ok_message=msg%20342005%20created%0Aissue%2036837%20message_count%2C%20messages%20edited%20ok&@template=item#msg342005 GNU msgfmt does extract the charset correctly. (My previous test faile

[issue20044] gettext.install() ignores previous call to locale.setlocale()

2019-05-12 Thread Toshio Kuratomi
Toshio Kuratomi added the comment: I tested a small C program and found that setlocale takes precedence for LC_ALL, LC_MESSAGES, and LANG but not for LANGUAGE. int main(int argc, char **argv) { char *message1; //setlocale (LC_ALL, ""); setlocale (LC_ALL, &q

[issue14353] Proper gettext support in locale module

2019-05-12 Thread Toshio Kuratomi
Change by Toshio Kuratomi : -- pull_requests: +13173 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue14353> ___ ___ Python-bugs-lis

[issue35924] curses segfault resizing window

2019-05-12 Thread Toshio Kuratomi
Toshio Kuratomi added the comment: Hi Josiah, I've tested my sample program and it looks like the segmentation fault is fixed with ncurses-6.1-20190511: http://lists.gnu.org/archive/html/bug-ncurses/2019-05/msg00013.html Are you able to give that a try and see whether it resolves the

[issue34369] kqueue.control() documentation and implementation mismatch

2018-08-09 Thread Toshio Kuratomi
New submission from Toshio Kuratomi : The current kqueue documentation specifies that timeout is a keyword argument but it can only be passed as a positional argument right now: >>> import select >>> ko = select.kqueue() >>> ko.control([1], 0, timeout=10) Trace

[issue34369] kqueue.control() documentation and implementation mismatch

2018-08-10 Thread Toshio Kuratomi
Toshio Kuratomi added the comment: I don't believe (kqueue.control at least) is a regression from Argument Clinic. Both the documentation and the behaviour are the same in Python-2.7. -- ___ Python tracker <https://bugs.python.org/is

[issue18713] Enable surrogateescape on stdin and stdout when appropriate

2013-08-20 Thread Toshio Kuratomi
Toshio Kuratomi added the comment: Nick and I had talked about this at a recent conference and came to it from different directions. On the one hand, Nick made the point that any encoding of surrogateescape'd text to bytes via a different encoding is corrupting the data as a whole. O

[issue17997] ssl.match_hostname(): sub string wildcard should not match IDNA prefix

2013-09-02 Thread Toshio Kuratomi
Toshio Kuratomi added the comment: So, is this a security issue? I've been wondering if I should apply the attached patch to the backports-ssl_match_hostname module on pypi. I was hoping there'd be some information here as to whether this will be going into the stdlib in the fut

[issue4963] mimetypes.guess_extension result changes after mimetypes.init()

2014-04-14 Thread Toshio Kuratomi
Toshio Kuratomi added the comment: Took a look at this and was able to reproduce it on Fedora Linux 20 and current cpython head. It is somewhat random though. I'm able to get reasonably consistent failures using image/jpeg and iterating the test case about 20 times. Additionally, it

[issue19846] Python 3 raises Unicode errors with the C locale

2013-12-09 Thread Toshio Kuratomi
Toshio Kuratomi added the comment: Ahh... added to the nosy list and bug closed all before I got up for the day ;-) A few words: I do think that python is broken here. I do not think that translating everything to utf-8 if ascii is the locale's encoding is the solution. As I would sta

[issue19846] Python 3 raises Unicode errors with the C locale

2013-12-10 Thread Toshio Kuratomi
Toshio Kuratomi added the comment: Looking at the glib code, this looks like the SO post is closer to the truth. The API documentation for g_filename_to_utf8() is over-simplified to the point of confusion. This section of the glib API document is closer to what the code is doing: https

[issue19846] Python 3 raises Unicode errors with the C locale

2013-12-10 Thread Toshio Kuratomi
Toshio Kuratomi added the comment: Yes, it returns a list but unless I'm missing something in the general case it's the caller's responsibility to loop through the charsets to test for failure and try again. This is not done automatically. In the specific case we're

[issue19846] Python 3 raises Unicode errors with the C locale

2013-12-13 Thread Toshio Kuratomi
Toshio Kuratomi added the comment: It's not a bug for upstart, systemd, sysvinit, cron, etc to use LANG=C. The POSIX locale is the only locale guaranteed to exist on a system. Therefore these low level services should be using LANG=C. Embedded systems, thin clients, and other low memo

[issue19977] Use "surrogateescape" error handler for sys.stdin and sys.stdout on UNIX for the C locale

2013-12-13 Thread Toshio Kuratomi
Toshio Kuratomi added the comment: My impression was that python3 was supposed to help get rid of UnicodeError tracebacks, not mojibake. If mojibake was the problem then we should never have gone down the surrogateescape path for input

[issue644744] bdist_rpm fails when installing man pages

2009-11-23 Thread Toshio Kuratomi
Toshio Kuratomi added the comment: sed is one of the programs we assume is always present when we build packages in Fedora which is probably also what is wanted here. (A default install of Fedora will include sed but someone might be able to create a minimal install that did not include it

[issue644744] bdist_rpm fails when installing man pages

2009-11-23 Thread Toshio Kuratomi
Toshio Kuratomi added the comment: Agreed. The substitution is still needed. -- ___ Python tracker <http://bugs.python.org/issue644744> ___ ___ Python-bug

[issue4359] at runtime, distutils uses buildtime files

2009-12-18 Thread Toshio Kuratomi
Toshio Kuratomi added the comment: Hey tarek, the main thrust of this bug for me was storing the data in an inappropriate format and not having an API to get at it; things that I think the sysconfig branch will address. Does it make sense to have a bug to track that progress? Does it make

[issue17429] platform.platform() can throw Unicode error

2013-03-15 Thread Toshio Kuratomi
New submission from Toshio Kuratomi: Tested on python-3.2 and python-3.3. platform.platform() looks for a file in /etc/ that looks like it will contain the name of the Linux distribution that python3 is running on. Once found, it reads the contents of the file to have a name for the Linux

[issue17429] platform.platform() can throw Unicode error

2013-03-15 Thread Toshio Kuratomi
Changes by Toshio Kuratomi : -- keywords: +patch Added file: http://bugs.python.org/file29416/00175-platform-unicode.patch ___ Python tracker <http://bugs.python.org/issue17

[issue17429] platform.platform() can throw Unicode error

2013-03-15 Thread Toshio Kuratomi
Toshio Kuratomi added the comment: I agree. In my experience, utf-8 is the most common encoding. Updated patch that defaults to utf-8 instead of the user's locale is attached. -- Added file: http://bugs.python.org/file29420/00175-platform-unicode.

[issue16310] zipfile: allow surrogates in filenames

2013-03-15 Thread Toshio Kuratomi
Toshio Kuratomi added the comment: I found some "standards" docs that could bear on this: http://www.pkware.com/documents/casestudies/APPNOTE.TXT Appendix D: "D.1 The ZIP format has historically supported only the original IBM PC character encoding set, commonly referred to a

[issue17429] platform.platform() can throw Unicode error

2013-03-16 Thread Toshio Kuratomi
Toshio Kuratomi added the comment: I'm at pycon. I'll find someone during the sprints to teach me how the unittests are organized. -- ___ Python tracker <http://bugs.python.o

[issue17467] Enhancement: give mock_open readline() and readlines() methods

2013-03-18 Thread Toshio Kuratomi
New submission from Toshio Kuratomi: unittest.mock provides a mock_open convenience function[1]. The convenience function handled file.read() but does not handle file.readline() or file.readlines(). I'll attach a patch that adds support for both of these methods. [1]:

[issue16754] Incorrect shared library extension on linux

2013-03-19 Thread Toshio Kuratomi
Toshio Kuratomi added the comment: Matthias, Barry, and I looked at this at pycon today. It looks a bit like the original intent was to have SO = ".so" SOABI = "cpython-32mu" and then CPython extension module suffixes would be: if SOABI: so_ext = ''.join(&q

[issue17467] Enhancement: give mock_open readline() and readlines() methods

2013-03-19 Thread Toshio Kuratomi
Toshio Kuratomi added the comment: Updated patch that includes unittests and fixes readlines() newline behaviour. -- Added file: http://bugs.python.org/file29479/01000-mock_open-methods.patch ___ Python tracker <http://bugs.python.org/issue17

[issue17467] Enhancement: give mock_open readline() and readlines() methods

2013-03-19 Thread Toshio Kuratomi
Toshio Kuratomi added the comment: 3rd version of the patch. * Added some documentation to untitest.mock.rst * Changed the code so that read, readline, and readlines all deplete the same copy of read_data. -- Added file: http://bugs.python.org/file29484/01000-mock_open-methods.patch

[issue17429] platform.platform() can throw Unicode error

2013-03-20 Thread Toshio Kuratomi
Toshio Kuratomi added the comment: Okay, new version of the patch with a unittest. Re: os-release; I don't believe the current code can handle that file. i\It changes format from a simple string (in most Linux distros) to key value pairs. We'll probably need an update to the co

[issue17429] platform.platform() can throw Unicode error

2013-03-20 Thread Toshio Kuratomi
Toshio Kuratomi added the comment: Added NEWS file. Rebased against hg default. Ready for review. -- Added file: http://bugs.python.org/file29509/00175-platform-unicode.patch ___ Python tracker <http://bugs.python.org/issue17

[issue16310] zipfile: allow surrogates in filenames

2013-03-20 Thread Toshio Kuratomi
Toshio Kuratomi added the comment: Okay, here's the first version of a patch to add surrogate support to a zipfile. I think it's the minimum required to fix this bug. When archiving, if a filename contains surrogateescape'd bytes, it switches to cp437 when it saves the fi

[issue16310] zipfile: allow surrogates in filenames

2013-03-21 Thread Toshio Kuratomi
Toshio Kuratomi added the comment: Version 2 of the patch * fixes for the style problems noted by ezio.melotti -- Added file: http://bugs.python.org/file29531/python3-zipfile-surrogate.patch ___ Python tracker <http://bugs.python.org/issue16

[issue17429] platform.platform() can throw Unicode error

2013-03-25 Thread Toshio Kuratomi
Toshio Kuratomi added the comment: Patch fixing the issues raised in r.david.murray's review: * Merged _find_linux_release_file() back into linux_distribution() and broke out _UNIXCONFDIR module level variable to enable mocking of the unittest data * Fix already present style iss

[issue23966] More clearly expose/explain native and cross-build target information

2015-04-21 Thread Toshio Kuratomi
Toshio Kuratomi added the comment: Note for doko/barry: The multiarch/Tuples page should have a section on how the MultiArch Tuples interact with hwcaps (or a link to such a section in a different document). The rationale for not using Gnu-Triplets in MulitArch/Tuples currently says that we