Modify

Ticket #191 (new defect)

Opened 3 years ago

Last modified 3 years ago

CSafeLoader and CSafeDumper are missing a dispose method in 3.10 and trunk

Reported by: jesstess Owned by: xi
Priority: normal Component: pyyaml
Severity: normal Keywords:
Cc: jessica.mckellar@…

Description

I've attached reproducers. This was discovered in Ubuntu Oneiric, where 3.10 is the stock python-yaml package version.

Traceback (most recent call last):
  File "yaml_test.py", line 5, in <module>
    yaml.dump("Foobar", fd, Dumper=CSafeDumper)
  File "/home/jesstess/pyyaml-trunk/lib/yaml/__init__.py", line 204, in dump
    return dump_all([data], stream, Dumper=Dumper, **kwds)
  File "/home/jesstess/pyyaml-trunk/lib/yaml/__init__.py", line 195, in dump_all
    dumper.dispose()
AttributeError: 'CSafeDumper' object has no attribute 'dispose'

Attachments

pyyaml_191.py Download (430 bytes) - added by jesstess 3 years ago.

Change History

Changed 3 years ago by jesstess

comment:1 Changed 3 years ago by xi

  • Component changed from libyaml to pyyaml

It works for me. You sure you don't have some old version of _yaml.so lying around? Try:

import _yaml
print _yaml.__file__
View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as new
as The resolution will be set. Next status will be 'closed'
to The owner will be changed from xi. Next status will be 'new'
The owner will be changed from xi to anonymous. Next status will be 'assigned'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.