<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/cpython-git.git/Lib/copy.py, branch Mariatta-patch-2</title>
<subtitle>github.com: python/cpython.git
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/'/>
<entry>
<title>bpo-40792: Make the result of PyNumber_Index() always having exact type int. (GH-20443)</title>
<updated>2020-05-28T07:33:45+00:00</updated>
<author>
<name>Serhiy Storchaka</name>
<email>storchaka@gmail.com</email>
</author>
<published>2020-05-28T07:33:45+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=5f4b229df7812f1788287095eb6b138bb21876a4'/>
<id>5f4b229df7812f1788287095eb6b138bb21876a4</id>
<content type='text'>
Previously, the result could have been an instance of a subclass of int.

Also revert bpo-26202 and make attributes start, stop and step of the range
object having exact type int.

Add private function _PyNumber_Index() which preserves the old behavior
of PyNumber_Index() for performance to use it in the conversion functions
like PyLong_AsLong().</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, the result could have been an instance of a subclass of int.

Also revert bpo-26202 and make attributes start, stop and step of the range
object having exact type int.

Add private function _PyNumber_Index() which preserves the old behavior
of PyNumber_Index() for performance to use it in the conversion functions
like PyLong_AsLong().</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-38293: Allow shallow and deep copying of property objects (GH-16438)</title>
<updated>2020-01-12T17:41:49+00:00</updated>
<author>
<name>Guðni Natan Gunnarsson</name>
<email>1493259+GudniNatan@users.noreply.github.com</email>
</author>
<published>2020-01-12T17:41:49+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=9f3fc6c5b4993f2b362263b494f84793a21aa073'/>
<id>9f3fc6c5b4993f2b362263b494f84793a21aa073</id>
<content type='text'>
Copying property objects results in a TypeError. Steps to reproduce:

```
&gt;&gt;&gt; import copy
&gt;&gt;&gt; obj = property()
&gt;&gt;&gt; copy.copy(obj)
````

This affects both shallow and deep copying.  
My idea for a fix is to add property objects to the list of "atomic" objects in the copy module.
These already include types like functions and type objects.

I also added property objects to the unit tests test_copy_atomic and test_deepcopy_atomic. This is my first PR, and it's highly likely I've made some mistake, so please be kind :)


https://bugs.python.org/issue38293</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Copying property objects results in a TypeError. Steps to reproduce:

```
&gt;&gt;&gt; import copy
&gt;&gt;&gt; obj = property()
&gt;&gt;&gt; copy.copy(obj)
````

This affects both shallow and deep copying.  
My idea for a fix is to add property objects to the list of "atomic" objects in the copy module.
These already include types like functions and type objects.

I also added property objects to the unit tests test_copy_atomic and test_deepcopy_atomic. This is my first PR, and it's highly likely I've made some mistake, so please be kind :)


https://bugs.python.org/issue38293</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-11572: Make minor improvements to copy module (GH-8208)</title>
<updated>2018-07-09T20:14:54+00:00</updated>
<author>
<name>Berker Peksag</name>
<email>berker.peksag@gmail.com</email>
</author>
<published>2018-07-09T20:14:54+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=2708578736d1aa15685495e9b94b827a8e185a8c'/>
<id>2708578736d1aa15685495e9b94b827a8e185a8c</id>
<content type='text'>
* When doing getattr lookups with a default of "None", it now
  uses an "is" comparison against None which is more correct
* Removed outdated code

Patch by Brandon Rhodes.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* When doing getattr lookups with a default of "None", it now
  uses an "is" comparison against None which is more correct
* Removed outdated code

Patch by Brandon Rhodes.</pre>
</div>
</content>
</entry>
<entry>
<title>Issue #26167: Minimized overhead in copy.copy() and copy.deepcopy().</title>
<updated>2016-03-06T12:56:57+00:00</updated>
<author>
<name>Serhiy Storchaka</name>
<email>storchaka@gmail.com</email>
</author>
<published>2016-03-06T12:56:57+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=818e18dd94611a2f0f4b0015661488ef0cd867dc'/>
<id>818e18dd94611a2f0f4b0015661488ef0cd867dc</id>
<content type='text'>
Optimized copying and deepcopying bytearrays, NotImplemented, slices,
short lists, tuples, dicts, sets.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Optimized copying and deepcopying bytearrays, NotImplemented, slices,
short lists, tuples, dicts, sets.
</pre>
</div>
</content>
</entry>
<entry>
<title>Issue #26202: copy.deepcopy() now correctly copies range() objects with</title>
<updated>2016-01-28T19:43:35+00:00</updated>
<author>
<name>Serhiy Storchaka</name>
<email>storchaka@gmail.com</email>
</author>
<published>2016-01-28T19:43:35+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=0a20bbf66913157bb54b8d6e426f540233c7ea6c'/>
<id>0a20bbf66913157bb54b8d6e426f540233c7ea6c</id>
<content type='text'>
non-atomic attributes.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
non-atomic attributes.
</pre>
</div>
</content>
</entry>
<entry>
<title>Issue #25718: Fixed copying object with state with boolean value is false.</title>
<updated>2015-11-30T15:35:40+00:00</updated>
<author>
<name>Serhiy Storchaka</name>
<email>storchaka@gmail.com</email>
</author>
<published>2015-11-30T15:35:40+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=b63015b01a07c535ef4c26fe0bc4c336295dd08e'/>
<id>b63015b01a07c535ef4c26fe0bc4c336295dd08e</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Issue #25718: Fixed copying object with state with boolean value is false.</title>
<updated>2015-11-30T15:20:02+00:00</updated>
<author>
<name>Serhiy Storchaka</name>
<email>storchaka@gmail.com</email>
</author>
<published>2015-11-30T15:20:02+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=cbbec1c53f4b6fb88b4ae984e69db2d2951cd560'/>
<id>cbbec1c53f4b6fb88b4ae984e69db2d2951cd560</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Issue #20289: The copy module now uses pickle protocol 4 (PEP 3154) and</title>
<updated>2015-03-24T16:06:42+00:00</updated>
<author>
<name>Serhiy Storchaka</name>
<email>storchaka@gmail.com</email>
</author>
<published>2015-03-24T16:06:42+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=32af7549a7cf8f112c44526a28afa6c99e67269c'/>
<id>32af7549a7cf8f112c44526a28afa6c99e67269c</id>
<content type='text'>
supports copying of instances of classes whose __new__ method takes
keyword-only arguments.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
supports copying of instances of classes whose __new__ method takes
keyword-only arguments.
</pre>
</div>
</content>
</entry>
<entry>
<title>improve idioms (closes #20642)</title>
<updated>2014-05-04T00:22:00+00:00</updated>
<author>
<name>Benjamin Peterson</name>
<email>benjamin@python.org</email>
</author>
<published>2014-05-04T00:22:00+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=4ce5f3f203c1c510bd1eff4d8fffea6198e40b4d'/>
<id>4ce5f3f203c1c510bd1eff4d8fffea6198e40b4d</id>
<content type='text'>
Patch by Claudiu Popa.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Patch by Claudiu Popa.
</pre>
</div>
</content>
</entry>
<entry>
<title>Issue #20791: copy.copy() now doesn't make a copy when the input is a bytes object.  Initial patch by Peter Otten.</title>
<updated>2014-02-27T21:14:31+00:00</updated>
<author>
<name>Antoine Pitrou</name>
<email>solipsis@pitrou.net</email>
</author>
<published>2014-02-27T21:14:31+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=dc9215f8828b23ed6c294f8e64342a55dcdf1e4c'/>
<id>dc9215f8828b23ed6c294f8e64342a55dcdf1e4c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
