[issue33057] logging.Manager.logRecordFactory is never used

2018-03-14 Thread Ben Feinstein
Ben Feinstein added the comment: Here is a code that demonstrate the bug: ```python import logging class LogRecordTypeFilter(logging.Filter): def __init__(self, cls): self.cls = cls def filter(self, record): t = type(record) if t is not self.cls

[issue33057] logging.Manager.logRecordFactory is never used

2018-03-15 Thread Ben Feinstein
Ben Feinstein added the comment: I use the logging module to log records of lab experiments. I have two types of loggers, one for experiment results ("data") and another for general information. I think that having a different managers for data loggers is the easiest way to do it. O

[issue33057] logging.Manager.logRecordFactory is never used

2018-03-16 Thread Ben Feinstein
Ben Feinstein added the comment: General loggers are used in the standard way (message, args, etc), but data loggers are used for different types of data. Instead of message, they receive the experiment results (dict/list/np.array/binary data) and their `formatMessage()` method should be

[issue1222585] C++ compilation support for distutils

2018-04-02 Thread Ben Elliston
Ben Elliston added the comment: Is there a simple workaround that one can put into setup.py in the meantime? I tried using compiler.compiler.remove('-Wstrict-prototypes') to no avail. -- nosy: +bje ___ Python tracker <https://bu

[issue33275] glob.glob should explicitly note that results aren't sorted

2018-04-13 Thread Ben FrantzDale
New submission from Ben FrantzDale : The sortedness of glob.glob's output is platform-dependent. While the docs do not mention sorting, and so are strictly correct, if you are on a platform where its output is sorted, it's easy to believe that the output is always sorted. I propose

[issue33275] glob.glob should explicitly note that results aren't sorted

2018-04-13 Thread Ben FrantzDale
Ben FrantzDale added the comment: Fascinating. That seems like an even wilder gotcha: It sounds like a script assuming sorted results would work in one directory (on one filesystem) but not on another. Or even weirder, if I had a mounted scratch partition, the script could work until I (or a

[issue33275] glob.glob should explicitly note that results aren't sorted

2018-04-24 Thread Ben FrantzDale
Ben FrantzDale added the comment: Great point. Looks like the phrase is "in arbitrary order" in the docs for those (both 2.7 and 3), which is better than saying nothing. I'd still prefer a bit more specificity about the potential gotcha since "arbitrary" seems a lo

[issue33275] glob.glob should explicitly note that results aren't sorted

2018-05-02 Thread Ben FrantzDale
Ben FrantzDale added the comment: I looked into it a bit more. With python 2.7 on macOS High Sierra on APFS (Encrypted) with a FAT32 thumb drive... I have a directory that glob.glob('/Volumes/thumb/tmp/*') shows as sorted. I cp -r that to /tmp with bash. glob.glob('/tmp/tmp

[issue22729] concurrent.futures `wait` and `as_completed` depend on private api

2017-10-03 Thread Ben Mather
Ben Mather added the comment: The patch is indeed a little outdated, but I would be happy to pick it and get it working again. First we need a resolution to #22630 though. Currently calling `cancel` will invoke callbacks, but waiters won't be triggered until `set_running_or_notify_cance

[issue22729] concurrent.futures `wait` and `as_completed` depend on private api

2017-10-03 Thread Ben Mather
Ben Mather added the comment: @Nathaniel RE `remove_done_callback`: This was added as an optimisation to allow the `as_completed` iterator to remove callbacks for future that it has visited instead of having to store a separate set of visited futures and ignore them when their callbacks are

[issue31707] Irrational fractions

2017-10-05 Thread Ben Burrill
New submission from Ben Burrill : fractions.Fraction enforces its numerator and denominator to be rational. This is a good idea for purely numeric fractions, but the abstractions that fractions.Fraction offers would also be useful for more abstract fractions. Some places where this might be

[issue31707] Irrational fractions

2017-10-05 Thread Ben Burrill
Change by Ben Burrill : -- nosy: +mark.dickinson, rhettinger ___ Python tracker <https://bugs.python.org/issue31707> ___ ___ Python-bugs-list mailing list Unsub

[issue31707] Irrational fractions

2017-10-05 Thread Ben Burrill
Ben Burrill added the comment: The core operators, like multiplication and division, should work for any type that defines the right operators. Hashing is tricky, and reducing the fraction is pretty much off the table. This is why I suggested a superclass. I'll try making a patch som

[issue31736] PEP 485 tiny typo

2017-10-09 Thread Ben Bolker
New submission from Ben Bolker : In two places in https://www.python.org/dev/peps/pep-0485/ floating point numbers are incorrectly formatted: 1-e8 and 1-e9 rather than 1e-8 and 1e-9 ("absolute tolerance default", para. 3 and "relative tolerance default", para. 1) ---

[issue31803] Remove not portable time.clock(), replaced by time.perf_counter() and time.process_time()

2017-10-17 Thread Ben Hoyt
Ben Hoyt added the comment: I don't think this is a good idea. I still use time.clock() out of habit (on Windows), and from the PR it's clear that the standard library and tests do too. I wouldn't be at all surprised to find others do as well. I realize it's been depre

[issue21720] "TypeError: Item in ``from list'' not a string" message

2017-10-24 Thread Ben Finney
Ben Finney added the comment: On 23-Oct-2017, Serhiy Storchaka wrote: > Is it all with this issue? I accept Nick's reasoning: > As a general principle, we don't give value information in type > errors, since the error is structural rather than value based. as suff

[issue32038] Add API to intercept socket.close()

2017-11-15 Thread Ben Darnell
Ben Darnell added the comment: It's worse than a resource leak - the same file descriptor number could be reused for a different file/socket, and then depending on the selector in use, you could see the data from a completely different connection. I did see a bug like this years ag

[issue32038] Add API to intercept socket.close()

2017-11-16 Thread Ben Darnell
Ben Darnell added the comment: Note that a guard on socket objects can only solve part of the problem: in the case where i've seen this bug, it was with raw file descriptors from libcurl, and there's nothing python can do about that because there are no (python) sock

[issue32281] bdist_rpm v.s. the Macintosh

2017-12-11 Thread Ben Hyde
New submission from Ben Hyde : With the fix below is becomes possible to build rpms on the Mac. The developer will need to install rpm tooling. That's easy via "brew install rpm". That, for example, installs /usr/local/bin/rpmbuild. Sadly bdist_rpm.py only supports rpmbuil

[issue18533] Avoid error from repr() of recursive dictview

2017-12-12 Thread Ben North
Ben North added the comment: PR4823 created as per msg308086. -- ___ Python tracker <https://bugs.python.org/issue18533> ___ ___ Python-bugs-list mailin

[issue32137] Stack overflow in repr of deeply nested dicts

2017-12-12 Thread Ben North
Change by Ben North : -- pull_requests: +4716 ___ Python tracker <https://bugs.python.org/issue32137> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue14102] argparse: add ability to create a man page

2018-06-14 Thread Ben Finney
Ben Finney added the comment: On 14-Jun-2018, Pablo Galindo Salgado wrote: > I think this should be something that is not included in argparse > itself. I can imagine a scenario in which the manpage is accessible > through `./python foo.py --manpage` but the manpage is not

[issue14102] argparse: add ability to create a man page

2018-06-14 Thread Ben Finney
Ben Finney added the comment: On Thu, 2018-06-14 20:02 +, Pablo Galindo Salgado wrote: > The (possible) confusion is the existence of a manpage only available > though argparse (`./python foo.py --manpage`) This report isn't asking for that. (I see only one person propos

[issue14102] argparse: add ability to create a man page

2018-06-14 Thread Ben Finney
Ben Finney added the comment: On Thu, 2018-06-14 23:46 +, Aaron Meurer wrote: > Couldn't such a tool exist outside the standard library. I've tried writing such a tool. It would ideally re-use as much as feasible of the functionality that assembles the usage message

[issue2651] Strings passed to KeyError do not round trip

2018-07-27 Thread Ben Doremus
Ben Doremus added the comment: Did this patch die? I ran into the same issue noted in the SO post. It's bizarre that KeyError is the only error message to handle things this way. -- nosy: +bdoremus ___ Python tracker <https://bugs.py

[issue1016626] distutils support for swig is under par

2018-08-18 Thread Ben McGinnes
Change by Ben McGinnes : -- versions: +Python 3.4, Python 3.5, Python 3.6, Python 3.7 ___ Python tracker <https://bugs.python.org/issue1016626> ___ ___ Python-bug

[issue5166] ElementTree and minidom don't prevent creation of not well-formed XML

2018-09-10 Thread Ben Spiller
Ben Spiller added the comment: Hi it's been a few years now since this was reported and it's still a problem, any chance of a fix for this? The API gives the impression that if you pass python strings to the XML API then the library will generate valid XML. It takes care of t

[issue34700] typing.get_type_hints doesn't know about typeshed

2018-09-15 Thread Ben Darnell
New submission from Ben Darnell : Currently, most type annotations for the standard library are provided in typeshed rather than in the library itself. Not all consumers of type annotations are aware of typeshed, and this can cause problems. Specifically, Sphinx 1.8 accesses type hints via

[issue34712] Style fixes in examples of "Input and Output" tutorial section

2018-09-17 Thread Ben Hoyt
New submission from Ben Hoyt : There are a couple of examples in the "Input and Output" section of the tutorial that use an unusual / non-PEP 8 Python style or whitespace. I think our examples, especially in the tutorial, should reflect good, PEP 8 style. I'll fix these in

[issue34712] Style fixes in examples of "Input and Output" tutorial section

2018-09-17 Thread Ben Hoyt
Change by Ben Hoyt : -- keywords: +patch pull_requests: +8784 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue34712> ___ ___ Python-

[issue34712] Style fixes in examples of "Input and Output" tutorial section

2018-09-17 Thread Ben Hoyt
Ben Hoyt added the comment: GitHub PR link with changes and commit notes attached. -- ___ Python tracker <https://bugs.python.org/issue34712> ___ ___ Python-bug

[issue34700] typing.get_type_hints doesn't know about typeshed

2018-09-24 Thread Ben Darnell
Ben Darnell added the comment: Yeah, I think that would work at least for the sphinx use case. It seems like a strange partially-degraded mode and anything that needs structured access to the annotation would still need typeshed, but just getting the string would probably be enough for a

[issue5166] ElementTree and minidom don't prevent creation of not well-formed XML

2018-10-19 Thread Ben Spiller
Ben Spiller added the comment: To help anyone else struggling with this bug, based on https://lsimons.wordpress.com/2011/03/17/stripping-illegal-characters-out-of-xml-in-python/ the best workaround I've currently found is to define this: def escape_xml_illegal_chars(unicodeS

[issue31122] SSLContext.wrap_socket() throws OSError with errno == 0

2018-10-19 Thread Ben Darnell
Ben Darnell added the comment: We have an easy reproduction of this "[Errno 0] Error" on the server side in https://github.com/tornadoweb/tornado/issues/2504#issuecomment-426782158 It is triggered by a connection from `nc -z` (which I think is doing a TCP handshake and shuttin

[issue5166] ElementTree and minidom don't prevent creation of not well-formed XML

2018-11-07 Thread Ben Spiller
Change by Ben Spiller : -- nosy: +Ben Spiller ___ Python tracker <https://bugs.python.org/issue5166> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35185] Logger race condition - loses lines if removeHandler called from another thread while logging

2018-11-07 Thread Ben Spiller
New submission from Ben Spiller : I just came across a fairly serious thread-safety / race condition bug in the logging.Loggers class, which causes random log lines to be lost i.e. not get passed to some of the registered handlers, if (other, unrelated) handlers are being added/removed using

[issue32281] bdist_rpm v.s. the Macintosh

2018-11-07 Thread Ben Hyde
Ben Hyde added the comment: ping -- ___ Python tracker <https://bugs.python.org/issue32281> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue18167] cgi.FieldStorage fails to handle multipart/form-data when \r\n appears at end of 65535 bytes without other newlines

2013-06-11 Thread Ben Hearsum
Changes by Ben Hearsum : -- nosy: +Ben.Hearsum ___ Python tracker <http://bugs.python.org/issue18167> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12645] test.support. import_fresh_module - incorrect doc

2013-07-07 Thread Ben Finney
Ben Finney added the comment: I'm reading the existing `test.support.import_fresh_module` docstring, and have re-formatted it for PEP 257 compliance and for reading clarity. -- keywords: +patch nosy: +bignose Added file: http://bugs.python.org/file30857/issue12645.reformat_docs

[issue12645] test.support. import_fresh_module - incorrect doc

2013-07-07 Thread Ben Finney
Ben Finney added the comment: > import_fresh_module raises an ImportError if *name* can't be imported, or > returns None if the fresh module is not found. The implementation doesn't seem to raise ImportError when a module import fails. Instead, from what I can tell,

[issue12014] str.format parses replacement field incorrectly

2013-07-15 Thread Ben Wolfson
Ben Wolfson added the comment: Ping. -- ___ Python tracker <http://bugs.python.org/issue12014> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue18533] Avoid error from repr() of recursive dictview

2013-07-22 Thread Ben North
New submission from Ben North: #18019 noted the following crash in earlier 2.7: >>> d={} >>> d[42]=d.viewvalues() >>> d This issue has been fixed; the behaviour now is that a RuntimeError is produced for a recursive dictionary view: >>> d={} >>&

[issue18533] Avoid error from repr() of recursive dictview

2013-07-23 Thread Ben North
Ben North added the comment: New patch including tests attached, against 3.3. Terry Reedy's example above now gives >>> d = {} >>> d[1] = d.keys() >>> d[2] = d.values() >>> d {1: dict_keys([1, 2]), 2: dict_values([dict_keys([1,

[issue18533] Avoid error from repr() of recursive dictview

2013-07-23 Thread Ben North
Ben North added the comment: New patch, fixing nit noted in msg193624: non-error-recursive-dictview-3.3-1.patch Otherwise same as previous non-error-recursive-dictview-3.3.patch -- Added file: http://bugs.python.org/file31025/non-error-recursive-dictview-3.3-1.patch

[issue18533] Avoid error from repr() of recursive dictview

2013-07-30 Thread Ben North
Changes by Ben North : Added file: http://bugs.python.org/file31089/against-9bf89c909bd4-3.3-1.patch ___ Python tracker <http://bugs.python.org/issue18533> ___ ___ Pytho

[issue18533] Avoid error from repr() of recursive dictview

2013-07-30 Thread Ben North
Ben North added the comment: I'll attach fresh patches, one against latest 2.7 and one against latest 3.3 (unchanged apart from headers from previous patch). Both branches pass ./python -m test.regrtest -R20:30 test_dictviews -- ___ P

[issue18533] Avoid error from repr() of recursive dictview

2013-07-30 Thread Ben North
Changes by Ben North : Added file: http://bugs.python.org/file31088/against-6e1dd1ce95b8-2.7-1.patch ___ Python tracker <http://bugs.python.org/issue18533> ___ ___ Pytho

[issue12645] test.support. import_fresh_module - incorrect doc

2013-08-04 Thread Ben Finney
Ben Finney added the comment: On 01-Aug-2013, Eli Bendersky wrote: > Ben, would you like to provide an updated patch? Unfortunately, contributions are not accepted under the Apache Software Foundation License (as I had thought), but also require assigning extra privileges to the Pyt

[issue15207] mimetypes.read_windows_registry() uses the wrong regkey, creates wrong mappings

2013-08-11 Thread Ben Hoyt
Ben Hoyt added the comment: Thanks, Tim! Works for me! A couple of code review comments: 1) On 2.7, guess_type(s)[0] is a byte string as usual if the type doesn't exist in the registry, but it's a unicode string if it came from the registry. Seems like it should be a byte string in

[issue15207] mimetypes.read_windows_registry() uses the wrong regkey, creates wrong mappings

2013-08-12 Thread Ben Hoyt
Ben Hoyt added the comment: All looks great. I like what you've done with default_encoding now. Thanks, Tim (and Dave for the original report). -- ___ Python tracker <http://bugs.python.org/is

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

2013-08-12 Thread Ben Darnell
Changes by Ben Darnell : -- nosy: +Ben.Darnell ___ Python tracker <http://bugs.python.org/issue17997> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue18533] Avoid error from repr() of recursive dictview

2013-08-15 Thread Ben North
Ben North added the comment: Is anything further needed from me before this can be reviewed? -- ___ Python tracker <http://bugs.python.org/issue18533> ___ ___

[issue18956] Document useful functions in ‘pydoc’ module

2013-09-06 Thread Ben Finney
New submission from Ben Finney: The library documentation for ‘pydoc’ expects that the ‘pydoc’ module will only ever be run as a command-line program. This ignores the general usefulness of several of the functions in that module when imported from the library. The documentation should

[issue12916] Add inspect.splitdoc

2013-09-08 Thread Ben Finney
Changes by Ben Finney : -- nosy: +bignose ___ Python tracker <http://bugs.python.org/issue12916> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12014] str.format parses replacement field incorrectly

2012-05-19 Thread Ben Wolfson
Ben Wolfson added the comment: Ping! -- ___ Python tracker <http://bugs.python.org/issue12014> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12014] str.format parses replacement field incorrectly

2012-05-22 Thread Ben Wolfson
Ben Wolfson added the comment: > Are you still willing to rework the patches? Sure. Now that I've actually looked at unicode_format.h it looks like the biggest (relevant) difference might just be that the file isn't named string_format.h, so I suspect it will be pretty st

[issue12014] str.format parses replacement field incorrectly

2012-05-24 Thread Ben Wolfson
Ben Wolfson added the comment: Here's a patch that works against the current unicode_format.h and implements what Petri suggested. -- Added file: http://bugs.python.org/file25699/strformat-no-braces.diff ___ Python tracker <http://bugs.py

[issue12014] str.format parses replacement field incorrectly

2012-06-17 Thread Ben Wolfson
Ben Wolfson added the comment: I can certainly address those issues---I'll hold off on doing so, though, until it's clearer whether more substantive things come up, so I can just do it in a swoop. -- ___ Python tracker <http://bu

[issue15196] os.path.realpath gets confused when symlinks include '..'

2012-06-26 Thread Ben Longbons
New submission from Ben Longbons : I encountered this bug with the following filesystem layout project/build/bin/main-gdb.py -> ../src/main-gdb.py project/build/src -> ../src/ project/src/main-gdb.py -> ../py/main-gdb.py project/py/main-gdb.py where root/py/main-gdb.py contains import

[issue15196] os.path.realpath gets confused when symlinks include '..'

2012-06-26 Thread Ben Longbons
Ben Longbons added the comment: Yeah, this is a duplicate of issue 6975. Sorry also about the version thing. Although I can set this as closed: duplicate, I don't seem to be able to set what bug this is a duplicate of. -- resolution: -> duplicate status: open ->

[issue6975] symlinks incorrectly resolved on Linux

2012-06-26 Thread Ben Longbons
Ben Longbons added the comment: After filing a duplicate, issue 15196, I analyzed this: What happens: test/one/that_dir test/one/../two/this_dir/this_dir/this_dir/this_dir test/two/this_dir/this_dir/this_dir/this_dir test/two/this_dir/this_dir/this_dir/../two test/two/this_dir/this_dir/two

[issue15248] In "TypeError: 'tuple' object is not callable", suggest a comma.

2012-07-03 Thread Ben Longbons
New submission from Ben Longbons : I frequently construct lists of tuples, such as: [ (1, 2, 3) # oops, missing comma! (4, 5, 6) ] It would be nice if the error message gave a hint on what was *actually* wrong. Although I always use homogeneous containers, the type that's not cal

[issue15248] In "TypeError: 'tuple' object is not callable", explain that a comma may be missing

2012-07-05 Thread Ben Longbons
Ben Longbons added the comment: This kind of "debug your code" is the kind of thing I've gotten used to from the Clang C/C++ compiler. Granted, compiled languages have an advantage here, but enough residual information remains for the interpreter at runtime. And I am in no

[issue12014] str.format parses replacement field incorrectly

2012-07-21 Thread Ben Wolfson
Ben Wolfson added the comment: Ping! -- ___ Python tracker <http://bugs.python.org/issue12014> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue15626] unittest.main negates -bb option and programmatic warning configuration

2012-08-11 Thread Ben Darnell
New submission from Ben Darnell: In python 3.2, unittest.main by default modifies the warning configuration if no -W options were given on the command line. This undoes the effect of -bb, turning BytesWarning back into a warning instead of an error. If both -bb and -Werror::BytesWarning are

[issue8240] ssl.SSLSocket.write may fail on non-blocking sockets

2012-08-18 Thread Ben Darnell
Ben Darnell added the comment: Related pypy issue: https://bugs.pypy.org/issue1238 -- nosy: +Ben.Darnell ___ Python tracker <http://bugs.python.org/issue8

[issue8810] TZ offset description is unclear in docs

2012-08-19 Thread Ben Finney
Ben Finney added the comment: Here is an updated patch. I examined the implementation in the code for UTC offset and DST handling, and updated the code comments, the docstrings, and the library documentation. -- keywords: +patch nosy: +bignose, ncoghlan Added file: http

[issue15731] Mechanism for inheriting docstrings and signatures

2012-08-19 Thread Ben Finney
Ben Finney added the comment: Attached is a patch which is more comprehensive (covering the additional locations pointed out to me by ncoghlan), and also consolidating the details into the library documentation so they're not verbosely repeated in so many places. I agree with Nick'

[issue15731] Mechanism for inheriting docstrings and signatures

2012-08-19 Thread Ben Finney
Ben Finney added the comment: Apologies, my previous comment and patch was sent to the wrong issue (should have gone to #8810). -- ___ Python tracker <http://bugs.python.org/issue15

[issue8810] TZ offset description is unclear in docs

2012-08-19 Thread Ben Finney
Ben Finney added the comment: Attached is a patch which is more comprehensive (covering the additional locations pointed out to me by ncoghlan), and also consolidating the details into the library documentation so they're not verbosely repeated in so many places. I agree with Nick'

[issue10551] mimetypes read from the registry should not overwrite standard mime mappings

2012-10-09 Thread Ben Hoyt
Ben Hoyt added the comment: This is definitely a real issue, and makes mimetypes.guess_type() useless out of the box on Windows. However, I believe the reason it's broken is that the fix for Issue4969 doesn't actually work, and I'm not sure this is possible with the Windows reg

[issue16255] subrocess.Popen needs /bin/sh but Android only has /system/bin/sh

2012-10-16 Thread Ben Rousch
New submission from Ben Rousch: The subprocess.Popen function uses /bin/sh in Unix environments. Android is detected as a Unix environemnt, but has moved that executable to /system/bin/sh. This can be worked around by adding a parameter "executable='/system/bin/sh'" to

[issue16255] subrocess.Popen needs /bin/sh but Android only has /system/bin/sh

2012-10-16 Thread Ben Rousch
Ben Rousch added the comment: @rpetrov thanks for finding that - I was having trouble hunting down what the standard is. I think you're quoting from http://pubs.opengroup.org/onlinepubs/009695399/utilities/sh.html -- ___ Python tracker

[issue16255] subrocess.Popen needs /bin/sh but Android only has /system/bin/sh

2012-10-19 Thread Ben Rousch
Ben Rousch added the comment: > Is there some document describing procedure for > building/installing/running_tests at Android device? I'm using the android-python27 project, but you can also reproduce it under SL4A: Start SL4A Menu -> View -> Interpreters Python 2.6.2 or P

[issue10782] Not possible to cross-compile due to poor detection of %lld support in printf

2012-10-29 Thread Ben Gamari
Changes by Ben Gamari : -- status: open -> languishing ___ Python tracker <http://bugs.python.org/issue10782> ___ ___ Python-bugs-list mailing list Unsubscri

[issue16360] argparse: comma in metavar causes assertion failure when formatting long usage message

2012-10-29 Thread Ben Gamari
New submission from Ben Gamari: argparse suffers from a failing assertion when formatting a long usage message with an option whose metavar contains a comma. This can be seen in the attached testcase, which fails with, Traceback (most recent call last): File "/home/ben/hi.py", l

[issue20938] Broken link to editors page in General FAQ

2014-03-15 Thread Ben W.
New submission from Ben W.: The link to http://www.python.org/editors/ at the bottom of the answer to "Is Python a good language for beginning programmers?" in the General Python FAQ is broken. -- assignee: docs@python components: Documentation messages: 213671 nosy: d

[issue21016] trace: $prefix and $exec_prefix improperly replaced on Fedora

2014-03-21 Thread Ben Boeckel
New submission from Ben Boeckel: In the --ignore-dir handling of trace.py, the following is done: s = s.replace("$prefix", os.path.join(sys.base_prefix, "lib", "python" + sys.v

[issue20951] SSLSocket.send() returns 0 for non-blocking socket

2014-03-25 Thread Ben Darnell
Ben Darnell added the comment: Giampaolo, where do you see that send() may return zero if the other side has closed? I've always gotten an error in that case (EPIPE) I vote -1 to adding a new flag to control whether it returns zero or raises and +0 to just fixing it in Python 3.5 (I

[issue21336] ntpath.splitdrive fails on None argument

2014-04-23 Thread Ben Ma
New submission from Ben Ma: >>> import ntpath >>> ntpath.splitdrive(None) Traceback (most recent call last): File "", line 1, in File "E:\python3\lib\ntpath.py", line 159, in splitdrive if p and len(p) > 1: TypeError: object of type 'None

[issue21719] Returning Windows file attribute information via os.stat()

2014-06-11 Thread Ben Hoyt
New submission from Ben Hoyt: I asked recently on python-dev [1] about adding a "st_winattrs" attribute to stat result objects on Windows, to return the full set of Windows file attribute bits, such as "hidden" or "compressed" status. Copying from that thre

[issue21719] Returning Windows file attribute information via os.stat()

2014-06-11 Thread Ben Hoyt
Ben Hoyt added the comment: Fair call -- "st_file_attributes" sounds good to me, and matches the prefix of the FILE_ATTRIBUTES_* constants better too. -- ___ Python tracker <http://bugs.python.o

[issue21719] Returning Windows file attribute information via os.stat()

2014-06-12 Thread Ben Hoyt
Ben Hoyt added the comment: I've got a patch for this. Need to finish the docs and add tests, and then I'll post here. -- ___ Python tracker <http://bugs.python.o

[issue21745] Devguide: mention requirement to install Visual Studio SP1 on Windows

2014-06-12 Thread Ben Hoyt
New submission from Ben Hoyt: Per my email on core-mentorship, the instructions for compiling CPython on Windows at https://docs.python.org/devguide/setup.html#windows are good, however I did have one issue where the dev guide didn't help. During the link step, I got this error: LINK :

[issue21745] Devguide: mention requirement to install Visual Studio SP1 on Windows

2014-06-12 Thread Ben Hoyt
Changes by Ben Hoyt : -- nosy: +r.david.murray ___ Python tracker <http://bugs.python.org/issue21745> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue21719] Returning Windows file attribute information via os.stat()

2014-06-13 Thread Ben Hoyt
Ben Hoyt added the comment: Full patch to add this to Python 3.5 attached: * code changes to posixmodule.c and _stat.c * tests added in test_os.py and test_stat.py * docs added to os.rst and stat.rst -- keywords: +patch Added file: http://bugs.python.org/file35615/issue21719.patch

[issue21745] Devguide: mention requirement to install Visual Studio SP1 on Windows

2014-06-13 Thread Ben Hoyt
Ben Hoyt added the comment: Cool, thanks for applying. Out of curiosity, how often is the online devguide HTML updated? -- ___ Python tracker <http://bugs.python.org/issue21

[issue21719] Returning Windows file attribute information via os.stat()

2014-06-13 Thread Ben Hoyt
Ben Hoyt added the comment: Updated patch attached based on code reviews. I'm replying to the code review here as when I tried to reply on bugs.python.org/review I got a Python exception, "AttributeError: NoneType has no attribute something or other". FYI, it seems Django is

[issue21719] Returning Windows file attribute information via os.stat()

2014-06-13 Thread Ben Hoyt
Ben Hoyt added the comment: > The idea is that _stat.c will use system-provided values wherever > possible, but stat.py should be as accurate as we can make it to > provide a backup for when _stat isn't around (either when it's just > not built, which isn't an issu

[issue21719] Returning Windows file attribute information via os.stat()

2014-06-14 Thread Ben Hoyt
Ben Hoyt added the comment: Uploading a (hopefully final! :-) patch to fix Zach Ware's points from the code review: 1) use stat.FILE_ATTRIBUTE_DIRECTORY constant in test_os.py 2) break line length in stat.rst doc source -- Added file: http://bugs.python.org/file35632/issue21

[issue21719] Returning Windows file attribute information via os.stat()

2014-06-19 Thread Ben Hoyt
Ben Hoyt added the comment: Great, thanks for committing! -- ___ Python tracker <http://bugs.python.org/issue21719> ___ ___ Python-bugs-list mailing list Unsub

[issue15207] mimetypes.read_windows_registry() uses the wrong regkey, creates wrong mappings

2012-12-05 Thread Ben Hoyt
Ben Hoyt added the comment: Ah, thanks for making this an issue of its own! As I commented over at Issue10551, it's a serious problem, and makes mimetypes.guess_type() unusable out of the box on Windows. Yes, the fix in Issue4969 uses "MIME\Database\Content Type", which

[issue15207] mimetypes.read_windows_registry() uses the wrong regkey, creates wrong mappings

2012-12-09 Thread Ben Hoyt
Ben Hoyt added the comment: Either way -- this needs to be reverted or fixed. It's a nasty gotcha for folks writing Python web services at the moment. I'm still for reverting, per my reasons above. Dave Chambers, I'm not for "faster but broken" but for "faster

[issue15207] mimetypes.read_windows_registry() uses the wrong regkey, creates wrong mappings

2012-12-09 Thread Ben Hoyt
Ben Hoyt added the comment: Actually, I was suggesting using the hardcoded types for Windows only (i.e., only removing read_windows_registry). Several bugs have been opened on problems with the Windows registry mimetypes, but as far as I know this isn't an issue on Linux -- in other word

[issue12004] PyZipFile.writepy gives internal error on syntax errors

2012-12-30 Thread Ben Morgan
Ben Morgan added the comment: Okay, I've emailed a contributor agreement. -- ___ Python tracker <http://bugs.python.org/issue12004> ___ ___ Python-bugs-list m

[issue12004] PyZipFile.writepy gives internal error on syntax errors

2013-01-11 Thread Ben Morgan
Ben Morgan added the comment: I've sent it again. -- ___ Python tracker <http://bugs.python.org/issue12004> ___ ___ Python-bugs-list mailing list Unsubsc

[issue15207] mimetypes.read_windows_registry() uses the wrong regkey, creates wrong mappings

2013-01-30 Thread Ben Hoyt
Ben Hoyt added the comment: Any update on this, Tim or other Windows developers? -- ___ Python tracker <http://bugs.python.org/issue15207> ___ ___ Python-bug

[issue12014] str.format parses replacement field incorrectly

2013-10-20 Thread Ben Wolfson
Changes by Ben Wolfson : -- versions: +Python 3.4 ___ Python tracker <http://bugs.python.org/issue12014> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue21719] Returning Windows file attribute information via os.stat()

2014-06-19 Thread Ben Hoyt
Ben Hoyt added the comment: BTW, thanks for the mention in "What's New in Python 3.5": https://docs.python.org/3.5/whatsnew/3.5.html#os Can I make one small suggestion for a tweak there? A link to the docs for os.stat() would be good. So maybe instead of mentioning "os.st

[issue18624] Add alias for iso-8859-8-i which is the same as iso-8859-8

2014-06-22 Thread Ben Galin
Ben Galin added the comment: Added a patch with these two 8859-8 aliases and a corresponding test in test_codecs.py (couldn't find test_encodings.py mentioned in an earlier message). The test also found a missing 'tactis' codec (issue 1251921), so I've commented it out in

<    1   2   3   4   5   6   >