This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Jonathan Ng
Recipients Jonathan Ng, serhiy.storchaka
Date 2016-12-01.12:48:37
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <CAEadZoOogJ72eqKgU9QSX1JKk+Dt+N4vc_QyZr20VxiAzFOXRw@mail.gmail.com>
In-reply-to <1480596110.99.0.836686386846.issue28847@psf.upfronthosting.co.za>
Content
#1 makes sense to be backported.

On Thu, Dec 1, 2016 at 8:41 PM, Serhiy Storchaka <report@bugs.python.org>
wrote:

>
> Serhiy Storchaka added the comment:
>
> This example is too artificial.
>
> But there is a real issue: opening read-only files in read mode. Currently
> this causes a PermissionError on closing.
>
> For backward compatibility flags 'r' and 'w' are ignored. I.e. opening
> with 'r' and 'w' creates a file if it is not existing, and opening with 'r'
> allows modifying the database. Since 3.6 this emits deprecation warnings
> (issue21708). In future versions this will be an error.
>
> Proposed patch makes two changes:
>
> 1. The index file no longer written if the database was not modified. This
> increases performance and adds a support of read-only files.
>
> 2. A deprecation warning is raised when the index file is absent in 'r'
> and 'w' modes. In future versions this will be an error.
>
> May be the first change can be backported.
>
> ----------
> keywords: +patch
> stage:  -> patch review
> type: behavior -> enhancement
> versions: +Python 3.7
> Added file: http://bugs.python.org/file45722/dbm_dumb_readonly.patch
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <http://bugs.python.org/issue28847>
> _______________________________________
>
History
Date User Action Args
2016-12-01 12:48:37Jonathan Ngsetrecipients: + Jonathan Ng, serhiy.storchaka
2016-12-01 12:48:37Jonathan Nglinkissue28847 messages
2016-12-01 12:48:37Jonathan Ngcreate